Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Swap()

void Terraria.EquipmentLoadout.Swap ( Player player)
inline

Definition at line 65 of file EquipmentLoadout.cs.

66 {
67 Item[] armor = player.armor;
68 for (int i = 0; i < armor.Length; i++)
69 {
70 Utils.Swap(ref armor[i], ref Armor[i]);
71 }
72 Item[] dye = player.dye;
73 for (int j = 0; j < dye.Length; j++)
74 {
75 Utils.Swap(ref dye[j], ref Dye[j]);
76 }
77 bool[] hideVisibleAccessory = player.hideVisibleAccessory;
78 for (int k = 0; k < hideVisibleAccessory.Length; k++)
79 {
80 Utils.Swap(ref hideVisibleAccessory[k], ref Hide[k]);
81 }
82 }

References Terraria.EquipmentLoadout.Armor, Terraria.Player.armor, Terraria.EquipmentLoadout.Dye, Terraria.Player.dye, Terraria.EquipmentLoadout.Hide, and Terraria.Player.hideVisibleAccessory.

Referenced by Terraria.Player.TrySwitchingLoadout().