diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index bc94d359..4ece92d9 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -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 { } } - 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())); } } diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 96d88b57..04059f1b 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -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);