mirror of
https://github.com/2006-Scape/2006Scape.git
synced 2026-07-06 00:32:01 +00:00
Bootleg fix for NPC aggro crash
This commit is contained in:
+9
-5
@@ -20,12 +20,16 @@ public class NpcAggressive {
|
|||||||
};
|
};
|
||||||
|
|
||||||
public static boolean isAggressive(int i) {
|
public static boolean isAggressive(int i) {
|
||||||
boolean aggressive = NpcHandler.npcs[i].inWild() || PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || FightCaves.isFightCaveNpc(i);
|
try {
|
||||||
for (int element : AGGRESSIVE_MONSTERS) {
|
boolean aggressive = NpcHandler.npcs[i].inWild() || PestControl.npcIsPCMonster(NpcHandler.npcs[i].npcType) || FightCaves.isFightCaveNpc(i);
|
||||||
if (NpcHandler.npcs[i].npcType == element || aggressive) {
|
for (int element : AGGRESSIVE_MONSTERS) {
|
||||||
return true;
|
if (NpcHandler.npcs[i].npcType == element || aggressive) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
} catch (NullPointerException) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user