Browse Source

mob resist issue

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

21
src/engine/objects/Mob.java

@ -173,46 +173,50 @@ public class Mob extends AbstractIntelligenceAgent { @@ -173,46 +173,50 @@ public class Mob extends AbstractIntelligenceAgent {
public static void setResistsForMob(Mob mob){
mob.resists = new Resists("Generic");
Zone MacroParent = null;
Zone parentMacro = null;
for(Zone zone : ZoneManager.getAllZonesIn(mob.loc)){
if(zone.isMacroZone() == false)
continue;
switch(zone.getName()){
parentMacro = zone;
}
if(parentMacro != null) {
switch (parentMacro.getName()) {
//ice generics
case "Ymur's Crown":
case "Kralgaar Holm":
case "Ecklund Wilds":
case "Aurrochs Skrae":
mob.resists = Resists.getResists(28);
mob.resists.addResists(Resists.getResists(28));
break;
//Desert Generics
case "Leth'khalivar Desert":
case "Kharsoom":
case "Vale of Nar Addad":
case "The Blood Sands":
mob.resists = Resists.getResists(2);
mob.resists.addResists(Resists.getResists(2));
break;
//Swamp Generics
case "Thollok Marsh":
case "The Black Bog":
case "Sevaath Mere":
mob.resists = Resists.getResists(8);
mob.resists.addResists(Resists.getResists(8));
break;
//Oblivion Generics
case "Plain of Ashes":
case "Bone Marches":
case "The Doomplain":
case "Greensward Pyre":
mob.resists = Resists.getResists(4);
mob.resists.addResists(Resists.getResists(4));
break;
//Maelstrom Generics
case "Pandemonium":
case "Western Battleground":
mob.resists = Resists.getResists(32);
mob.resists.addResists(Resists.getResists(32));
break;
}
}
if(mob.getNameOverride().length() > 1){
mob.resists = Resists.getResists(3);
mob.resists.addResists(Resists.getResists(3));
}
switch(mob.mobBase.raceType){
case "Aelfborn":
@ -322,7 +326,6 @@ public class Mob extends AbstractIntelligenceAgent { @@ -322,7 +326,6 @@ public class Mob extends AbstractIntelligenceAgent {
break;
}
}
}
public static void serializeMobForClientMsgOtherPlayer(Mob mob, ByteBufferWriter writer) throws SerializationException {
Mob.serializeForClientMsgOtherPlayer(mob, writer);

Loading…
Cancel
Save