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

◆ CanBeHitByNPC()

virtual bool Terraria.ModLoader.GlobalNPC.CanBeHitByNPC ( NPC npc,
NPC attacker )
inlinevirtualinherited

Allows you to determine whether a friendly NPC can be hit by an NPC. Return false to block the attacker from hitting the NPC, and return true to use the vanilla code for whether the target can be hit. Returns true by default.

Parameters
npc
attacker
Returns

Definition at line 345 of file GlobalNPC.cs.

346 {
347 return true;
348 }