PreUpdateVanitySet() public method

public PreUpdateVanitySet ( Player player ) : void
player Terraria.Player
return void
Beispiel #1
0
        //in Terraria.Player.PlayerFrame after setting armor effects fields call this
        internal static void PreUpdateVanitySet(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.PreUpdateVanitySet(player);
            }
            if (bodyTexture != null && bodyTexture.IsVanitySet(player.head, player.body, player.legs))
            {
                bodyTexture.PreUpdateVanitySet(player);
            }
            if (legTexture != null && legTexture.IsVanitySet(player.head, player.body, player.legs))
            {
                legTexture.PreUpdateVanitySet(player);
            }
            foreach (GlobalItem globalItem in globalItems)
            {
                string set = globalItem.IsVanitySet(player.head, player.body, player.legs);
                if (set.Length > 0)
                {
                    globalItem.PreUpdateVanitySet(player, set);
                }
            }
        }