Browse Source

NPC all apply "shopkeeper" rune

feature-region-set
FatBoy-DOTC 1 year ago
parent
commit
048e90fb8f
  1. 13
      src/engine/gameManager/NPCManager.java
  2. 4
      src/engine/objects/NPC.java

13
src/engine/gameManager/NPCManager.java

@ -461,10 +461,15 @@ public enum NPCManager {
public static void applyRunesForNPC(NPC npc){ public static void applyRunesForNPC(NPC npc){
npc.runes = new ArrayList<>(); npc.runes = new ArrayList<>();
for(int runeID : _runeSetMap.get(npc.runeSetID)){ RuneBase shopkeeperBase = RuneBase.getRuneBase(252620);
RuneBase rb = RuneBase.getRuneBase(runeID); CharacterRune shopkeeper = new CharacterRune(shopkeeperBase,npc.getObjectUUID());
CharacterRune toApply = new CharacterRune(rb,npc.getObjectUUID()); npc.runes.add(shopkeeper);
npc.runes.add(toApply); 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);
}
} }
} }
} }

4
src/engine/objects/NPC.java

@ -973,9 +973,7 @@ public class NPC extends AbstractCharacter {
npcBounds.setBounds(this.getLoc()); npcBounds.setBounds(this.getLoc());
//apply NPC rune effects //apply NPC rune effects
if(NPCManager._runeSetMap.containsKey(this.runeSetID)){ NPCManager.applyRunesForNPC(this);
NPCManager.applyRunesForNPC(this);
}
} catch (Exception e) { } catch (Exception e) {
Logger.error(e.getMessage()); Logger.error(e.getMessage());

Loading…
Cancel
Save