Fix call to NpcAggressive.isAggressive (#472)

This commit is contained in:
Nick Gal
2021-01-28 22:43:30 -08:00
committed by GitHub
parent 12951be954
commit fa167bacd3
@@ -557,7 +557,7 @@ public class NpcHandler {
Player client = (Client) PlayerHandler.players[NpcData.getCloseRandomPlayer(i)];
if (client != null) {
boolean aggressive = (NpcAggressive.isAggressive(npcs[i].npcType) || getNpcListCombat(npcs[i].npcType) * 2 > client.combatLevel && getNpcListAggressive(npcs[i].npcType));
boolean aggressive = (NpcAggressive.isAggressive(i) || getNpcListCombat(npcs[i].npcType) * 2 > client.combatLevel && getNpcListAggressive(npcs[i].npcType));
if (aggressive && !npcs[i].underAttack && !npcs[i].isDead && npcs[i].MaxHP > 0) {
npcs[i].killerId = NpcData.getCloseRandomPlayer(i);
}