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

◆ CanBeHitByProjectile()

static ? bool Terraria.ModLoader.NPCLoader.CanBeHitByProjectile ( NPC npc,
Projectile projectile )
inlinestatic

Definition at line 1057 of file NPCLoader.cs.

1058 {
1059 bool? flag = null;
1061 while (enumerator.MoveNext())
1062 {
1063 bool? canHit2 = enumerator.Current.CanBeHitByProjectile(npc, projectile);
1064 if (canHit2.HasValue && !canHit2.Value)
1065 {
1066 return false;
1067 }
1068 if (canHit2.HasValue)
1069 {
1070 flag = canHit2.Value;
1071 }
1072 }
1073 if (npc.ModNPC != null)
1074 {
1075 bool? canHit = npc.ModNPC.CanBeHitByProjectile(projectile);
1076 if (canHit.HasValue && !canHit.Value)
1077 {
1078 return false;
1079 }
1080 if (canHit.HasValue)
1081 {
1082 flag = canHit.Value;
1083 }
1084 }
1085 return flag;
1086 }
static GlobalHookList< GlobalNPC > HookCanBeHitByProjectile
Definition NPCLoader.cs:184

References Terraria.ModLoader.NPCLoader.HookCanBeHitByProjectile, and Terraria.NPC.ModNPC.

Referenced by Terraria.ModLoader.CombinedHooks.CanHitNPCWithProj().

+ Here is the caller graph for this function: