Browse Source

r8 resists

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

99
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));
@ -1760,8 +1754,8 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1760,8 +1754,8 @@ public class Mob extends AbstractIntelligenceAgent {
//TODO set these correctly later
this.rangeHandOne = this.mobBase.getAttackRange();
this.rangeHandTwo = -1;
this.minDamageHandOne = (int)this.mobBase.getMinDmg();
this.maxDamageHandOne = (int)this.mobBase.getMaxDmg();
this.minDamageHandOne = (int) this.mobBase.getMinDmg();
this.maxDamageHandOne = (int) this.mobBase.getMaxDmg();
this.minDamageHandTwo = 0;
this.maxDamageHandTwo = 0;
this.atrHandOne = this.mobBase.getAtr();
@ -1841,10 +1835,10 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1841,10 +1835,10 @@ public class Mob extends AbstractIntelligenceAgent {
try {
NPCManager.applyRuneSetEffects(this);
recalculateStats();
if(this.mobBase.getLevel() > 80){
if(this.getMobBaseID() == 14319){//ithriana
if (this.mobBase.getLevel() > 80) {
if (this.getMobBaseID() == 14319) {//ithriana
this.healthMax = 5400000;
} else{
} else {
this.healthMax = 1500000;
}
}
@ -1868,22 +1862,38 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1868,22 +1862,38 @@ public class Mob extends AbstractIntelligenceAgent {
Logger.error(e.getMessage());
}
if(this.behaviourType.equals(MobBehaviourType.HamletGuard) && this.getMobBaseID() == 14104) {//guards
if (this.behaviourType.equals(MobBehaviourType.HamletGuard) && this.getMobBaseID() == 14104) {//guards
this.behaviourType = MobBehaviourType.Aggro;
}
for(MobEquipment equipped: this.equip.values()){
if(equipped.getItemBase().isVorg() && this.getMobBaseID() != 14062 && this.getMobBaseID() != 14163){
for (MobEquipment equipped : this.equip.values()) {
if (equipped.getItemBase().isVorg() && this.getMobBaseID() != 14062 && this.getMobBaseID() != 14163) {
this.dropper = true;
}
}
for(Item item : this.charItemManager.getInventory()){
if(item.getItemBase().isDiscRune() && this.level < 75){
for (Item item : this.charItemManager.getInventory()) {
if (item.getItemBase().isDiscRune() && this.level < 75) {
this.dropper = true;
}
}
if(this.dropper){
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;
this.atrHandTwo *= 2;
@ -1893,19 +1903,10 @@ public class Mob extends AbstractIntelligenceAgent { @@ -1893,19 +1903,10 @@ public class Mob extends AbstractIntelligenceAgent {
this.minDamageHandOne *= 2;
this.minDamageHandTwo *= 2;
this.mobResists = new Resists("Dropper");
} else{
} 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