Finally should fix aggressiveness smh (#165)

closes #160

Let me know if this doesn't work, but hoping it does. My local testing had it working perfectly
This commit is contained in:
Mr Extremez
2019-11-10 21:09:54 -06:00
committed by Daniel Ginovker
parent 679fad7b18
commit d53ed61064
2 changed files with 18 additions and 13 deletions
@@ -415,8 +415,8 @@ public class NpcHandler {
Client client = (Client) PlayerHandler.players[NpcData.getCloseRandomPlayer(i)];
if (client != null) {
boolean aggressive = (NpcAggressive.isAggressive(i) && getNpcListCombat(npcs[i].npcType) * 2 > client.combatLevel) || npcs[i].inWild();
if (aggressive && !npcs[i].underAttack && !npcs[i].isDead) {
boolean aggressive = (NpcAggressive.isAggressive(i) || getNpcListCombat(npcs[i].npcType) * 2 > client.combatLevel);
if (aggressive && !npcs[i].underAttack && !npcs[i].isDead && npcs[i].MaxHP > 0) {
npcs[i].killerId = NpcData.getCloseRandomPlayer(i);
}
}