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

Loading…
Cancel
Save