Terraria.ModLoader.BuffLoader.GetBuff C# (CSharp) Method

GetBuff() public static method

public static GetBuff ( int type ) : ModBuff
type int
return ModBuff
        public static ModBuff GetBuff(int type)
        {
            return type >= BuffID.Count && type < BuffCount ? buffs[type - BuffID.Count] : null;
        }

Usage Example

Ejemplo n.º 1
0
 /// <summary>
 /// Gets the ModBuff instance with the given type. If no ModBuff with the given type exists, returns null.
 /// </summary>
 public static ModBuff GetModBuff(int type) => BuffLoader.GetBuff(type);