Browse Source

load and apply mobbaseSkill

feature-workorder
FatBoy-DOTC 1 year ago
parent
commit
95c203b0ed
  1. 7
      src/engine/gameManager/NPCManager.java
  2. 2
      src/engine/objects/Mob.java

7
src/engine/gameManager/NPCManager.java

@ -14,7 +14,6 @@ import org.pmw.tinylog.Logger; @@ -14,7 +14,6 @@ import org.pmw.tinylog.Logger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ThreadLocalRandom;
import static engine.math.FastMath.acos;
@ -401,7 +400,9 @@ public enum NPCManager { @@ -401,7 +400,9 @@ public enum NPCManager {
}
}
public static void applyMobbaseSkills(Mob mob) {
public static void applyMobbaseSkill(Mob mob) {
SkillsBase baseSkill = DbManager.SkillsBaseQueries.GET_BASE_BY_TOKEN(mob.mobBase.getMobBaseStats().getBaseSkill());
if(baseSkill != null)
mob.getSkills().put(baseSkill.getName(),new CharacterSkill(baseSkill,mob,mob.mobBase.getMobBaseStats().getBaseSkillAmount()));
}
}

2
src/engine/objects/Mob.java

@ -1686,7 +1686,7 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1686,7 +1686,7 @@ public class Mob extends AbstractIntelligenceAgent {
}
NPCManager.applyMobbaseEffects(this);
NPCManager.applyEquipmentResists(this);
NPCManager.applyMobbaseSkills(this);
NPCManager.applyMobbaseSkill(this);
this.recalculateStats();
this.setHealth(this.healthMax);

Loading…
Cancel
Save