UpdateVanitySet() публичный Метод

public UpdateVanitySet ( Player player ) : void
player Terraria.Player
Результат void
Пример #1
0
        //in Terraria.Player.PlayerFrame after armor sets creating dust call this
        internal static void UpdateVanitySet(Player player)
        {
            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.UpdateVanitySet(player);
            }
            if (bodyTexture != null && bodyTexture.IsVanitySet(player.head, player.body, player.legs))
            {
                bodyTexture.UpdateVanitySet(player);
            }
            if (legTexture != null && legTexture.IsVanitySet(player.head, player.body, player.legs))
            {
                legTexture.UpdateVanitySet(player);
            }
            foreach (GlobalItem globalItem in globalItems)
            {
                string set = globalItem.IsVanitySet(player.head, player.body, player.legs);
                if (set.Length > 0)
                {
                    globalItem.UpdateVanitySet(player, set);
                }
            }
        }