diff --git a/src/engine/db/handlers/dbMobBaseHandler.java b/src/engine/db/handlers/dbMobBaseHandler.java index 0337ff76..270ae5d0 100644 --- a/src/engine/db/handlers/dbMobBaseHandler.java +++ b/src/engine/db/handlers/dbMobBaseHandler.java @@ -112,6 +112,26 @@ public class dbMobBaseHandler extends dbHandlerBase { return mobBaseStats; } + public void LOAD_ALL_MOBBASE_RACES() { + + try (Connection connection = DbManager.getConnection(); + PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM `static_npc_mobbase_race`")) { + + ResultSet rs = preparedStatement.executeQuery(); + + while (rs.next()) { + int id = rs.getInt("loadID"); + MobBase mobbase = MobBase.getMobBase(id); + if(mobbase != null){ + mobbase.raceType = rs.getString("raceType"); + } + } + + } catch (SQLException e) { + Logger.error(e); + } + } + public void LOAD_ALL_MOBBASE_SPEEDS(MobBase mobBase) { if (mobBase.getLoadID() == 0) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index ff11af12..7299a9f7 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -214,7 +214,113 @@ public class Mob extends AbstractIntelligenceAgent { if(mob.getNameOverride().length() > 1){ mob.resists = Resists.getResists(3); } + switch(mob.mobBase.raceType){ + case "Aelfborn": + break; + case "All": + + break; + case "Animal": + + break; + case "Aracoix": + + break; + case "Celestial": + + break; + case "Centaur": + + break; + case "Construct": + + break; + case "CSR": + + break; + case "Dragon": + + break; + case "Dwarf": + + break; + case "Elf": + + break; + case "Giant": + + break; + case "Goblin": + + break; + case "Grave": + + break; + case "HalfGiant": + + break; + case "Human": + + break; + case "Infernal": + + break; + case "Insect": + + break; + case "Irekei": + + break; + case "Minotaur": + + break; + case "Monster": + + break; + case "NecroPet": + + break; + case "NPC": + + break; + case "Pet": + + break; + case "Plant": + + break; + case "Rat": + + break; + case "Reptile": + + break; + case "Shade": + + break; + case "Siege": + + break; + case "Summoned": + + break; + case "Troll": + + break; + case "Undead": + + break; + case "Nephilim": + + break; + case "Vampire": + + break; + case "SiegeEngineer": + + break; + } } } diff --git a/src/engine/objects/MobBase.java b/src/engine/objects/MobBase.java index a58276c4..16d469ee 100644 --- a/src/engine/objects/MobBase.java +++ b/src/engine/objects/MobBase.java @@ -53,6 +53,7 @@ public class MobBase extends AbstractGameObject { private float run = 0; private float walkCombat = 0; private float runCombat = 0; + public String raceType = "Human"; /** * ResultSet Constructor