Browse Source

mob resists

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

57
src/engine/objects/Mob.java

@ -12,6 +12,7 @@ package engine.objects; @@ -12,6 +12,7 @@ package engine.objects;
import ch.claude_martin.enumbitset.EnumBitSet;
import engine.Enum;
import engine.Enum.*;
import engine.InterestManagement.RealmMap;
import engine.InterestManagement.WorldGrid;
import engine.exception.SerializationException;
import engine.gameManager.*;
@ -175,54 +176,54 @@ public class Mob extends AbstractIntelligenceAgent { @@ -175,54 +176,54 @@ public class Mob extends AbstractIntelligenceAgent {
public static void setResistsForMob(Mob mob){
Resists resists = new Resists("Generic");
Zone parentMacro = null;
for(Zone zone : ZoneManager.getAllZonesIn(mob.loc)){
if(zone.isMacroZone() == false)
continue;
parentMacro = zone;
}
if(parentMacro != null) {
switch (parentMacro.getName()) {
int realmID = RealmMap.getRealmIDAtLocation(mob.loc);
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
case "Ymur's Crown":
case "Kralgaar Holm":
case "Ecklund Wilds":
case "Aurrochs Skrae":
case "Hethlund":
case "Hregenlund":
case "Ecklund":
case "Kralgaard":
resists.addResists(Resists.getResists(28));
break;
//Desert Generics
case "Leth'khalivar Desert":
case "Kharsoom":
case "Vale of Nar Addad":
case "The Blood Sands":
case "Letharuun":
case "Adduram":
case "Neshraa":
resists.addResists(Resists.getResists(2));
break;
//Swamp Generics
case "Thollok Marsh":
case "The Black Bog":
case "Sevaath Mere":
case "Aeglund":
case "Thollmar":
resists.addResists(Resists.getResists(8));
break;
//Oblivion Generics
case "Plain of Ashes":
case "Bone Marches":
case "The Doomplain":
case "Greensward Pyre":
case "Oblivion":
case "Vandernoch":
resists.addResists(Resists.getResists(4));
break;
//Maelstrom Generics
case "Pandemonium":
case "Western Battleground":
case "Maelstrom":
resists.addResists(Resists.getResists(32));
break;
case "Valkos":
case "Ulward":
resists.addResists(Resists.getResists(5));
}
}
if(MobBase.mobbase_race_types.size() == 0){
DbManager.MobBaseQueries.LOAD_ALL_MOBBASE_RACES();
}
int mobbaseID = mob.getMobBaseID();
if(mobbaseID != 0) {
switch (MobBase.mobbase_race_types.get(mobbaseID)) {
String raceType = MobBase.mobbase_race_types.get(mob.getMobBaseID());
if(raceType != null) {
switch (raceType) {
case "Aelfborn":
case "NPC":
case "Rat":

Loading…
Cancel
Save