Browse Source

initialize runes array list for NPC

feature-region-set
FatBoy-DOTC 1 year ago
parent
commit
1fdd0a1b32
  1. 2
      src/engine/devcmd/cmds/PrintEffectsCmd.java
  2. 1
      src/engine/gameManager/NPCManager.java

2
src/engine/devcmd/cmds/PrintEffectsCmd.java

@ -45,7 +45,7 @@ public class PrintEffectsCmd extends AbstractDevCmd {
tar = (AbstractCharacter) target; tar = (AbstractCharacter) target;
String newline = "\r\n "; String newline = "\r\n ";
String output = "Applied Runes For Character: " + tar.getName() + newline; String output = "Effects For Character: " + tar.getName() + newline;
for(String effect : tar.effects.keySet()){ for(String effect : tar.effects.keySet()){
output += effect + newline; output += effect + newline;

1
src/engine/gameManager/NPCManager.java

@ -460,6 +460,7 @@ public enum NPCManager {
} }
public static void applyRunesForNPC(NPC npc){ public static void applyRunesForNPC(NPC npc){
npc.runes = new ArrayList<>();
for(int runeID : _runeSetMap.get(npc.runeSetID)){ for(int runeID : _runeSetMap.get(npc.runeSetID)){
RuneBase rb = RuneBase.getRuneBase(runeID); RuneBase rb = RuneBase.getRuneBase(runeID);
CharacterRune toApply = new CharacterRune(rb,npc.getObjectUUID()); CharacterRune toApply = new CharacterRune(rb,npc.getObjectUUID());

Loading…
Cancel
Save