From 5a9f5f2ecac5c5e56f9117a9acd3613449d46dad Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 13 Sep 2023 20:22:56 -0500 Subject: [PATCH] NPCs apply runes from set --- src/engine/gameManager/NPCManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index e53a0332..43dddeea 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -462,7 +462,13 @@ public enum NPCManager { public static void applyRunesForNPC(NPC npc){ for(int runeID : _runeSetMap.get(npc.runeSetID)){ RuneBase rb = RuneBase.getRuneBase(runeID); - npc.runes.add(new CharacterRune(rb,npc.getObjectUUID())); + CharacterRune toApply = new CharacterRune(rb,npc.getObjectUUID()); + npc.runes.add(toApply); + EffectsBase effectsBase; + for(MobBaseEffects effect : toApply.getRuneBase().getEffectsList()){ + effectsBase = PowersManager.getEffectByToken(effect.getToken()); + npc.addEffectNoTimer(Integer.toString(effectsBase.getUUID()), effectsBase, effect.getRank(), true); + } } } }