diff --git a/src/engine/gameManager/NPCManager.java b/src/engine/gameManager/NPCManager.java index bce31627..bc94d359 100644 --- a/src/engine/gameManager/NPCManager.java +++ b/src/engine/gameManager/NPCManager.java @@ -14,6 +14,7 @@ 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; @@ -399,4 +400,8 @@ public enum NPCManager { } } } + + public static void applyMobbaseSkills(Mob mob) { + + } } diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 38bfa974..96d88b57 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1127,6 +1127,26 @@ public class Mob extends AbstractIntelligenceAgent { this.defenseRating = 0; return; } + this.atrHandOne = (short) this.mobBase.getAttackRating(); + this.minDamageHandOne = (short) this.mobBase.getMinDmg(); + this.maxDamageHandOne = (short) this.mobBase.getMaxDmg(); + this.rangeHandOne = 6.5f; + this.speedHandOne = 20; + + this.atrHandTwo = (short) this.mobBase.getAttackRating(); + this.minDamageHandTwo = (short) this.mobBase.getMinDmg(); + this.maxDamageHandTwo = (short) this.mobBase.getMaxDmg(); + this.rangeHandTwo = 6.5f; + this.speedHandTwo = 20; + + if(this.equip.get(MBServerStatics.SLOT_MAINHAND) != null){ + //has mainhand weapon to calculate + calculateAtrDamageForWeapon(this.equip.get(MBServerStatics.SLOT_MAINHAND), true); + } + if(this.equip.get(MBServerStatics.SLOT_OFFHAND) != null && !this.equip.get(MBServerStatics.SLOT_OFFHAND).getItemBase().isShield()){ + //has offhand weapon to calculate + calculateAtrDamageForWeapon(this.equip.get(MBServerStatics.SLOT_OFFHAND), false); + } try { calculateAtrDamageForWeapon(this.equip.get(MBServerStatics.SLOT_MAINHAND), true); @@ -1666,6 +1686,7 @@ public class Mob extends AbstractIntelligenceAgent { } NPCManager.applyMobbaseEffects(this); NPCManager.applyEquipmentResists(this); + NPCManager.applyMobbaseSkills(this); this.recalculateStats(); this.setHealth(this.healthMax); diff --git a/src/engine/objects/MobBaseStats.java b/src/engine/objects/MobBaseStats.java index 38a09379..7acd1e3b 100644 --- a/src/engine/objects/MobBaseStats.java +++ b/src/engine/objects/MobBaseStats.java @@ -21,6 +21,9 @@ public class MobBaseStats { private final int baseSpi; private final int baseDex; + private final int mobbaseSkill; + private final int mobbaseSkillAmount; + /** * ResultSet Constructor @@ -31,6 +34,8 @@ public class MobBaseStats { this.baseCon = rs.getInt("Constitution"); this.baseSpi = rs.getInt("Spirit"); this.baseDex = rs.getInt("Dexterity"); + this.mobbaseSkill = rs.getInt("baseSkills"); + this.mobbaseSkillAmount = rs.getInt("skillAmount"); } /** @@ -43,6 +48,8 @@ public class MobBaseStats { this.baseCon = 0; this.baseSpi = 0; this.baseDex = 0; + this.mobbaseSkill = 0; + this.mobbaseSkillAmount = 0; } public static MobBaseStats GetGenericStats() { @@ -72,5 +79,8 @@ public class MobBaseStats { return baseDex; } + public int getBaseSkill(){return mobbaseSkill;} + + public int getBaseSkillAmount(){return mobbaseSkillAmount;} }