From 97165bbdfe9d4dda5bfdfa29e100e34f18febbc6 Mon Sep 17 00:00:00 2001 From: MagicBot Date: Sun, 9 Apr 2023 13:55:46 -0400 Subject: [PATCH] Aggro fields combined in RunAfterLoad --- src/engine/objects/Mob.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index aa5e6f76..804de497 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1968,6 +1968,18 @@ public class Mob extends AbstractIntelligenceAgent { this.equip = new HashMap<>(0); } + // Combine mobbase and mob aggro arrays into one bitvector + + this.notEnemy.addAll(this.getMobBase().notEnemy); + + if (this.notEnemy.size() > 1) + this.notEnemy.remove(MonsterType.NONE); + + this.enemy.addAll(this.getMobBase().enemy); + + if (this.enemy.size() > 1) + this.enemy.remove(MonsterType.NONE); + try { NPCManager.applyRuneSetEffects(this); recalculateStats();