|
|
@ -171,14 +171,28 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
|
|
|
|
|
|
|
|
public static void setResistsForMob(Mob mob){ |
|
|
|
public static void setResistsForMob(Mob mob){ |
|
|
|
Resists resists = new Resists("Generic"); |
|
|
|
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); |
|
|
|
int realmID = RealmMap.getRealmIDAtLocation(mob.bindLoc); |
|
|
|
Realm realm = Realm.getRealm(realmID); |
|
|
|
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) { |
|
|
|
if(realm != null) { |
|
|
|
switch (realm.getRealmName()) { |
|
|
|
switch (realm.getRealmName()) { |
|
|
|
//ice generics
|
|
|
|
//ice generics
|
|
|
@ -213,26 +227,6 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
resists.addResists(Resists.getResists(5)); |
|
|
|
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; |
|
|
|
break; |
|
|
|
case "Aracoix": |
|
|
|
case "Aracoix": |
|
|
|
resists.addResists(Resists.getResists(22)); |
|
|
|
resists.addResists(Resists.getResists(22)); |
|
|
@ -1760,8 +1754,8 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
//TODO set these correctly later
|
|
|
|
//TODO set these correctly later
|
|
|
|
this.rangeHandOne = this.mobBase.getAttackRange(); |
|
|
|
this.rangeHandOne = this.mobBase.getAttackRange(); |
|
|
|
this.rangeHandTwo = -1; |
|
|
|
this.rangeHandTwo = -1; |
|
|
|
this.minDamageHandOne = (int)this.mobBase.getMinDmg(); |
|
|
|
this.minDamageHandOne = (int) this.mobBase.getMinDmg(); |
|
|
|
this.maxDamageHandOne = (int)this.mobBase.getMaxDmg(); |
|
|
|
this.maxDamageHandOne = (int) this.mobBase.getMaxDmg(); |
|
|
|
this.minDamageHandTwo = 0; |
|
|
|
this.minDamageHandTwo = 0; |
|
|
|
this.maxDamageHandTwo = 0; |
|
|
|
this.maxDamageHandTwo = 0; |
|
|
|
this.atrHandOne = this.mobBase.getAtr(); |
|
|
|
this.atrHandOne = this.mobBase.getAtr(); |
|
|
@ -1841,10 +1835,10 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
try { |
|
|
|
try { |
|
|
|
NPCManager.applyRuneSetEffects(this); |
|
|
|
NPCManager.applyRuneSetEffects(this); |
|
|
|
recalculateStats(); |
|
|
|
recalculateStats(); |
|
|
|
if(this.mobBase.getLevel() > 80){ |
|
|
|
if (this.mobBase.getLevel() > 80) { |
|
|
|
if(this.getMobBaseID() == 14319){//ithriana
|
|
|
|
if (this.getMobBaseID() == 14319) {//ithriana
|
|
|
|
this.healthMax = 5400000; |
|
|
|
this.healthMax = 5400000; |
|
|
|
} else{ |
|
|
|
} else { |
|
|
|
this.healthMax = 1500000; |
|
|
|
this.healthMax = 1500000; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1868,22 +1862,38 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
Logger.error(e.getMessage()); |
|
|
|
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; |
|
|
|
this.behaviourType = MobBehaviourType.Aggro; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for(MobEquipment equipped: this.equip.values()){ |
|
|
|
for (MobEquipment equipped : this.equip.values()) { |
|
|
|
if(equipped.getItemBase().isVorg() && this.getMobBaseID() != 14062 && this.getMobBaseID() != 14163){ |
|
|
|
if (equipped.getItemBase().isVorg() && this.getMobBaseID() != 14062 && this.getMobBaseID() != 14163) { |
|
|
|
this.dropper = true; |
|
|
|
this.dropper = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
for(Item item : this.charItemManager.getInventory()){ |
|
|
|
for (Item item : this.charItemManager.getInventory()) { |
|
|
|
if(item.getItemBase().isDiscRune() && this.level < 75){ |
|
|
|
if (item.getItemBase().isDiscRune() && this.level < 75) { |
|
|
|
this.dropper = true; |
|
|
|
this.dropper = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
switch (this.getObjectUUID()) { |
|
|
|
if(this.dropper){ |
|
|
|
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.level = 65; |
|
|
|
this.atrHandOne *= 2; |
|
|
|
this.atrHandOne *= 2; |
|
|
|
this.atrHandTwo *= 2; |
|
|
|
this.atrHandTwo *= 2; |
|
|
@ -1893,19 +1903,10 @@ public class Mob extends AbstractIntelligenceAgent { |
|
|
|
this.minDamageHandOne *= 2; |
|
|
|
this.minDamageHandOne *= 2; |
|
|
|
this.minDamageHandTwo *= 2; |
|
|
|
this.minDamageHandTwo *= 2; |
|
|
|
this.mobResists = new Resists("Dropper"); |
|
|
|
this.mobResists = new Resists("Dropper"); |
|
|
|
} else{ |
|
|
|
} else { |
|
|
|
setResistsForMob(this); |
|
|
|
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 |
|
|
|
@Override |
|
|
|