Terraria.ModLoader.EquipTexture.IsVanitySet C# (CSharp) Method

IsVanitySet() public method

public IsVanitySet ( int head, int body, int legs ) : bool
head int
body int
legs int
return bool
        public virtual bool IsVanitySet(int head, int body, int legs)
        {
            if (item == null)
            {
                return false;
            }
            return item.IsVanitySet(head, body, legs);
        }

Usage Example

Ejemplo n.º 1
0
        //in Terraria.Main.DrawPlayers after armor combinations setting flags call
        //  ItemLoader.ArmorSetShadows(player, ref flag, ref flag2, ref flag3, ref flag4);
        internal static void ArmorSetShadows(Player player, ref bool longTrail, ref bool smallPulse, ref bool largePulse, ref bool shortTrail)
        {
            EquipTexture headTexture = EquipLoader.GetEquipTexture(EquipType.Head, player.head);
            EquipTexture bodyTexture = EquipLoader.GetEquipTexture(EquipType.Body, player.body);
            EquipTexture legTexture  = EquipLoader.GetEquipTexture(EquipType.Legs, player.legs);

            if (headTexture != null && headTexture.IsVanitySet(player.head, player.body, player.legs))
            {
                headTexture.ArmorSetShadows(player, ref longTrail, ref smallPulse, ref largePulse, ref shortTrail);
            }
            if (bodyTexture != null && bodyTexture.IsVanitySet(player.head, player.body, player.legs))
            {
                bodyTexture.ArmorSetShadows(player, ref longTrail, ref smallPulse, ref largePulse, ref shortTrail);
            }
            if (legTexture != null && legTexture.IsVanitySet(player.head, player.body, player.legs))
            {
                legTexture.ArmorSetShadows(player, ref longTrail, ref smallPulse, ref largePulse, ref shortTrail);
            }
            foreach (GlobalItem globalItem in globalItems)
            {
                string set = globalItem.IsVanitySet(player.head, player.body, player.legs);
                if (set.Length > 0)
                {
                    globalItem.ArmorSetShadows(player, set, ref longTrail, ref smallPulse, ref largePulse, ref shortTrail);
                }
            }
        }
All Usage Examples Of Terraria.ModLoader.EquipTexture::IsVanitySet