Browse Source

r8 resists

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
a821f7f7e4
  1. 75
      src/engine/objects/Mob.java

75
src/engine/objects/Mob.java

@ -171,14 +171,28 @@ public class Mob extends AbstractIntelligenceAgent { @@ -171,14 +171,28 @@ public class Mob extends AbstractIntelligenceAgent {
public static void setResistsForMob(Mob mob){
Resists resists = new Resists("Generic");
if(MobBase.mobbase_race_types.size() == 0){
DbManager.MobBaseQueries.LOAD_ALL_MOBBASE_RACES();
}
String raceType = MobBase.mobbase_race_types.get(mob.getMobBaseID());
if(raceType != null) {
switch (raceType) {
case "Aelfborn":
case "NPC":
case "Rat":
case "Reptile":
case "Grave":
case "Human":
case "Goblin":
case "CSR":
case "Construct":
case "Celestial":
case "Animal":
case "All":
case "SiegeEngineer":
int realmID = RealmMap.getRealmIDAtLocation(mob.bindLoc);
Realm realm = Realm.getRealm(realmID);
//Zone parentMacro = null;
//for(Zone zone : ZoneManager.getAllZonesIn(mob.loc)){
// if(zone.isMacroZone() == false)
// continue;
// parentMacro = zone;
//}
if(realm != null) {
switch (realm.getRealmName()) {
//ice generics
@ -213,26 +227,6 @@ public class Mob extends AbstractIntelligenceAgent { @@ -213,26 +227,6 @@ public class Mob extends AbstractIntelligenceAgent {
resists.addResists(Resists.getResists(5));
}
}
if(MobBase.mobbase_race_types.size() == 0){
DbManager.MobBaseQueries.LOAD_ALL_MOBBASE_RACES();
}
String raceType = MobBase.mobbase_race_types.get(mob.getMobBaseID());
if(raceType != null) {
switch (raceType) {
case "Aelfborn":
case "NPC":
case "Rat":
case "Reptile":
case "Grave":
case "Human":
case "Goblin":
case "CSR":
case "Construct":
case "Celestial":
case "Animal":
case "All":
case "SiegeEngineer":
resists.addResists(new Resists("Generic"));
break;
case "Aracoix":
resists.addResists(Resists.getResists(22));
@ -1882,7 +1876,23 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1882,7 +1876,23 @@ public class Mob extends AbstractIntelligenceAgent {
this.dropper = true;
}
}
switch (this.getObjectUUID()) {
case 40551://ithrianna
this.mobResists = Resists.getResists(14);
break;
case 11297: // mordoth
this.mobResists = Resists.getResists(16);
break;
case 19842://vranaxxas
this.mobResists = Resists.getResists(37);
break;
case 6407://draug tovald
this.mobResists = Resists.getResists(15);
break;
case 30959://shuggroth mael
this.mobResists = Resists.getResists(17);
break;
default:
if (this.dropper) {
this.level = 65;
this.atrHandOne *= 2;
@ -1896,16 +1906,7 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1896,16 +1906,7 @@ public class Mob extends AbstractIntelligenceAgent {
} else {
setResistsForMob(this);
}
//for(Item loot : this.charItemManager.getInventory()){
// if(loot.getItemBase().isDiscRune() && this.level < 80){
// if(this.firstSpawn) {
// this.killCharacter("first spawn");
// this.firstSpawn = false;
// if(this.despawned == false)
// this.despawn();
// }
// }
//}
}
}
@Override

Loading…
Cancel
Save