diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index 4c111838..daffd23c 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -30,7 +30,10 @@ public enum NPCManager { public static void applyRuneSetEffects(Mob mob) { - EffectsBase effectsBase; + // Early exit + + if (mob.runeSetID == 0) + return;; //Apply all rune effects. @@ -61,6 +64,11 @@ public enum NPCManager { EffectsBase effectsBase; RuneBase sourceRune = RuneBase.getRuneBase(runeID); + // Race runes are in the runeset but not in runebase for some reason + + if (sourceRune == null) + return;; + for (MobBaseEffects mbe : sourceRune.getEffectsList()) { effectsBase = PowersManager.getEffectByToken(mbe.getToken()); diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 08e11072..0bc25e34 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -2106,13 +2106,7 @@ public class Mob extends AbstractIntelligenceAgent { try { NPCManager.applyRuneSetEffects(this); - - try { - this.initializeSkills(); - } catch (Exception e) { - Logger.error(e.getMessage()); - } - + initializeSkills(); recalculateStats(); this.setHealth(this.healthMax);