Browse Source

mob resist issue

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
e0beab2dc5
  1. 20
      src/engine/db/handlers/dbMobBaseHandler.java
  2. 106
      src/engine/objects/Mob.java
  3. 1
      src/engine/objects/MobBase.java

20
src/engine/db/handlers/dbMobBaseHandler.java

@ -112,6 +112,26 @@ public class dbMobBaseHandler extends dbHandlerBase {
return mobBaseStats; 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) { public void LOAD_ALL_MOBBASE_SPEEDS(MobBase mobBase) {
if (mobBase.getLoadID() == 0) if (mobBase.getLoadID() == 0)

106
src/engine/objects/Mob.java

@ -214,7 +214,113 @@ public class Mob extends AbstractIntelligenceAgent {
if(mob.getNameOverride().length() > 1){ if(mob.getNameOverride().length() > 1){
mob.resists = Resists.getResists(3); 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;
}
} }
} }

1
src/engine/objects/MobBase.java

@ -53,6 +53,7 @@ public class MobBase extends AbstractGameObject {
private float run = 0; private float run = 0;
private float walkCombat = 0; private float walkCombat = 0;
private float runCombat = 0; private float runCombat = 0;
public String raceType = "Human";
/** /**
* ResultSet Constructor * ResultSet Constructor

Loading…
Cancel
Save