From 048e90fb8f5437faa27fda708a06fed44e468e3a Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 13 Sep 2023 21:56:18 -0500 Subject: [PATCH] NPC all apply "shopkeeper" rune --- src/engine/gameManager/NPCManager.java | 13 +++++++++---- src/engine/objects/NPC.java | 4 +--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index 76112b05..da125cd9 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -461,10 +461,15 @@ public enum NPCManager { public static void applyRunesForNPC(NPC npc){ npc.runes = new ArrayList<>(); - for(int runeID : _runeSetMap.get(npc.runeSetID)){ - RuneBase rb = RuneBase.getRuneBase(runeID); - CharacterRune toApply = new CharacterRune(rb,npc.getObjectUUID()); - npc.runes.add(toApply); + RuneBase shopkeeperBase = RuneBase.getRuneBase(252620); + CharacterRune shopkeeper = new CharacterRune(shopkeeperBase,npc.getObjectUUID()); + npc.runes.add(shopkeeper); + if(NPCManager._runeSetMap.containsKey(npc.runeSetID)) { + for (int runeID : _runeSetMap.get(npc.runeSetID)) { + RuneBase rb = RuneBase.getRuneBase(runeID); + CharacterRune toApply = new CharacterRune(rb, npc.getObjectUUID()); + npc.runes.add(toApply); + } } } } diff --git a/src/engine/objects/NPC.java b/src/engine/objects/NPC.java index 10d8884f..7e2701d5 100644 --- a/src/engine/objects/NPC.java +++ b/src/engine/objects/NPC.java @@ -973,9 +973,7 @@ public class NPC extends AbstractCharacter { npcBounds.setBounds(this.getLoc()); //apply NPC rune effects - if(NPCManager._runeSetMap.containsKey(this.runeSetID)){ - NPCManager.applyRunesForNPC(this); - } + NPCManager.applyRunesForNPC(this); } catch (Exception e) { Logger.error(e.getMessage());