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

◆ PurgeDD2EnergyCrystals()

void Terraria.Player.PurgeDD2EnergyCrystals ( )
inlineprivate

Definition at line 29204 of file Player.cs.

29205 {
29206 if (trashItem.type == 3822)
29207 {
29209 }
29210 if (Main.myPlayer == whoAmI && Main.mouseItem.type == 3822)
29211 {
29212 Main.mouseItem.TurnToAir();
29213 }
29214 for (int i = 0; i < 59; i++)
29215 {
29216 Item item = inventory[i];
29217 if (item.stack > 0 && item.type == 3822)
29218 {
29219 item.TurnToAir();
29220 }
29221 }
29222 if (this.chest == -2)
29223 {
29224 Chest chest = bank;
29225 for (int j = 0; j < 40; j++)
29226 {
29227 if (chest.item[j].stack > 0 && chest.item[j].type == 3822)
29228 {
29229 chest.item[j].TurnToAir();
29230 }
29231 }
29232 }
29233 if (this.chest == -4)
29234 {
29235 Chest chest2 = bank3;
29236 for (int k = 0; k < 40; k++)
29237 {
29238 if (chest2.item[k].stack > 0 && chest2.item[k].type == 3822)
29239 {
29240 chest2.item[k].TurnToAir();
29241 }
29242 }
29243 }
29244 if (this.chest == -5)
29245 {
29246 Chest chest3 = bank4;
29247 for (int l = 0; l < 40; l++)
29248 {
29249 if (chest3.item[l].stack > 0 && chest3.item[l].type == 3822)
29250 {
29251 chest3.item[l].TurnToAir();
29252 }
29253 }
29254 }
29255 if (this.chest == -3)
29256 {
29257 Chest chest4 = bank2;
29258 for (int m = 0; m < 40; m++)
29259 {
29260 if (chest4.item[m].stack > 0 && chest4.item[m].type == 3822)
29261 {
29262 chest4.item[m].TurnToAir();
29263 }
29264 }
29265 }
29266 if (this.chest <= -1)
29267 {
29268 return;
29269 }
29270 Chest chest5 = Main.chest[this.chest];
29271 for (int n = 0; n < 40; n++)
29272 {
29273 if (chest5.item[n].stack > 0 && chest5.item[n].type == 3822)
29274 {
29275 chest5.item[n].TurnToAir();
29276 if (Main.netMode == 1)
29277 {
29278 NetMessage.SendData(32, -1, -1, null, this.chest, n);
29279 }
29280 }
29281 }
29282 }
void TurnToAir(bool fullReset=false)
Definition Item.cs:49954
Item[] inventory
Definition Player.cs:1257

References Terraria.Main.chest, System.item, Terraria.Chest.item, Terraria.Main.mouseItem, Terraria.Main.myPlayer, Terraria.Main.netMode, Terraria.NetMessage.SendData(), Terraria.Item.stack, Terraria.Item.TurnToAir(), and Terraria.Item.type.