Prechádzať zdrojové kódy

The attack target can still be an NPC without being an instance of Player.

Sean Porter 11 rokov pred
rodič
commit
a87bd14342

+ 1 - 1
src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java

@@ -302,7 +302,7 @@ public final class CombatUtils {
         else if (attacker instanceof Player) {
         else if (attacker instanceof Player) {
             Player player = (Player) attacker;
             Player player = (Player) attacker;
 
 
-            if (Misc.isNPCEntity(player)) {
+            if (Misc.isNPCEntity(player) || Misc.isNPCEntity(target)) {
                 return;
                 return;
             }
             }