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

◆ CanHitPlayer()

virtual bool Terraria.ModLoader.ModNPC.CanHitPlayer ( Player target,
ref int cooldownSlot )
inlinevirtual

Allows you to determine whether this NPC can hit the given player. Return false to block this NPC from hitting the target. Returns true by default. CooldownSlot determines which of the player's cooldown counters to use (-1, 0, or 1), and defaults to -1.

Parameters
target
cooldownSlot
Returns

Definition at line 404 of file ModNPC.cs.

405 {
406 return true;
407 }