public static CanHitNPC ( Player player, System.Item item, NPC target ) : bool? | ||
player | Player | |
item | System.Item | |
target | NPC | |
Результат | bool? |
public static bool?CanPlayerHitNPCWithItem(Player player, Item item, NPC npc) { bool?result = null; bool ModifyResult(bool?nbool) { if (nbool.HasValue) { result = nbool.Value; } return(result != false); } if (!ModifyResult(PlayerHooks.CanHitNPC(player, item, npc))) { return(false); } if (!ModifyResult(ItemLoader.CanHitNPC(item, player, npc))) { return(false); } if (!ModifyResult(NPCLoader.CanBeHitByItem(npc, player, item))) { return(false); } return(result); }