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

◆ CanPlayerHitNPCWithItem()

static ? bool Terraria.ModLoader.CombinedHooks.CanPlayerHitNPCWithItem ( Player player,
Item item,
NPC npc )
inlinestatic

Definition at line 112 of file CombinedHooks.cs.

113 {
114 bool? ret = null;
115 if (Update(PlayerLoader.CanHitNPCWithItem(player, item, npc)) && Update(ItemLoader.CanHitNPC(item, player, npc)))
116 {
117 Update(NPCLoader.CanBeHitByItem(npc, player, item));
118 }
119 else
120 _ = 0;
121 return ret;
122 bool Update(bool? b)
123 {
124 return !((!(ret ?? (ret = b))) ?? false);
125 }
126 }

References Terraria.ModLoader.NPCLoader.CanBeHitByItem(), Terraria.ModLoader.ItemLoader.CanHitNPC(), and Terraria.ModLoader.PlayerLoader.CanHitNPCWithItem().

Referenced by Terraria.Player.ProcessHitAgainstNPC().

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