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

◆ ItemCheck_TryDestroyingDrones()

void Terraria.Player.ItemCheck_TryDestroyingDrones ( Item sItem)
inlineprivate

Definition at line 44978 of file Player.cs.

44979 {
44980 if (sItem.type != 5451 || ownedProjectileCounts[1020] <= 0 || !controlUseItem || !ItemTimeIsZero || mouseInterface)
44981 {
44982 return;
44983 }
44984 for (int i = 0; i < 1000; i++)
44985 {
44986 Projectile projectile = Main.projectile[i];
44987 if (projectile.owner == whoAmI && projectile.type == 1020)
44988 {
44989 projectile.Kill();
44990 }
44991 }
44992 releaseUseItem = false;
44993 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
bool ItemTimeIsZero
Definition Player.cs:4402
bool mouseInterface
Definition Player.cs:1616
bool releaseUseItem
Definition Player.cs:1926
int[] ownedProjectileCounts
Provides efficient access to the number of projectiles of the specified type owned by this player cur...
Definition Player.cs:3105
bool controlUseItem
Definition Player.cs:1904

References Terraria.Player.controlUseItem, Terraria.Player.ItemTimeIsZero, Terraria.Projectile.Kill(), Terraria.Player.mouseInterface, Terraria.Player.ownedProjectileCounts, Terraria.Projectile.owner, Terraria.Main.projectile, Terraria.Player.releaseUseItem, Terraria.Projectile.type, and Terraria.Entity.whoAmI.

Referenced by Terraria.Player.ItemCheck_OwnerOnlyCode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: