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

◆ ItemCheck_MeleeHitNPCs()

void Terraria.Player.ItemCheck_MeleeHitNPCs ( Item sItem,
Rectangle itemRectangle,
int originalDamage,
float knockBack )
inlineprivate

Definition at line 43481 of file Player.cs.

43482 {
43483 //IL_0037: Unknown result type (might be due to invalid IL or missing references)
43484 //IL_003d: Unknown result type (might be due to invalid IL or missing references)
43485 //IL_0042: Unknown result type (might be due to invalid IL or missing references)
43486 //IL_0047: Unknown result type (might be due to invalid IL or missing references)
43487 //IL_004e: Unknown result type (might be due to invalid IL or missing references)
43488 //IL_005a: Unknown result type (might be due to invalid IL or missing references)
43489 //IL_0060: Unknown result type (might be due to invalid IL or missing references)
43490 //IL_0065: Unknown result type (might be due to invalid IL or missing references)
43491 //IL_006a: Unknown result type (might be due to invalid IL or missing references)
43492 for (int i = 0; i < 200; i++)
43493 {
43494 NPC nPC = Main.npc[i];
43495 if (nPC.active && nPC.immune[whoAmI] == 0 && CanHitNPCWithMeleeHit(i) && attackCD <= 0)
43496 {
43497 nPC.position += nPC.netOffset;
43498 ProcessHitAgainstNPC(sItem, itemRectangle, originalDamage, knockBack, i);
43499 nPC.position -= nPC.netOffset;
43500 }
43501 }
43502 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
bool CanHitNPCWithMeleeHit(int npcIndex)
Definition Player.cs:43471
void ProcessHitAgainstNPC(Item sItem, Rectangle itemRectangle, int originalDamage, float knockBack, int npcIndex)
Definition Player.cs:43512

References Terraria.Player.attackCD, Terraria.Player.CanHitNPCWithMeleeHit(), Terraria.Main.npc, Terraria.Player.ProcessHitAgainstNPC(), 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: