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

◆ CanPlayerMeleeAttackCollideWithNPC()

static ? bool Terraria.ModLoader.CombinedHooks.CanPlayerMeleeAttackCollideWithNPC ( Player player,
Item item,
Rectangle meleeAttackHitbox,
NPC target )
inlinestatic

Definition at line 244 of file CombinedHooks.cs.

245 {
246 //IL_000f: Unknown result type (might be due to invalid IL or missing references)
247 //IL_0020: Unknown result type (might be due to invalid IL or missing references)
248 //IL_0034: Unknown result type (might be due to invalid IL or missing references)
249 bool? ret = null;
250 if (Update(PlayerLoader.CanMeleeAttackCollideWithNPC(player, item, meleeAttackHitbox, target)) && Update(ItemLoader.CanMeleeAttackCollideWithNPC(item, meleeAttackHitbox, player, target)))
251 {
252 Update(NPCLoader.CanCollideWithPlayerMeleeAttack(target, player, item, meleeAttackHitbox));
253 }
254 else
255 _ = 0;
256 return ret;
257 bool Update(bool? b)
258 {
259 return !((!(ret ?? (ret = b))) ?? false);
260 }
261 }

References Terraria.ModLoader.NPCLoader.CanCollideWithPlayerMeleeAttack(), Terraria.ModLoader.ItemLoader.CanMeleeAttackCollideWithNPC(), and Terraria.ModLoader.PlayerLoader.CanMeleeAttackCollideWithNPC().

Referenced by Terraria.Player.ProcessHitAgainstNPC().

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