Browse Source

mob resist issue

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

237
src/engine/objects/Mob.java

@ -173,155 +173,158 @@ public class Mob extends AbstractIntelligenceAgent { @@ -173,155 +173,158 @@ 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);
break;
}
if(mob.getNameOverride().length() > 1){
mob.resists = Resists.getResists(3);
}
switch(mob.mobBase.raceType){
case "Aelfborn":
mob.resists.addResists(Resists.getResists(0));
break;
case "All":
mob.resists.addResists(Resists.getResists(0));
break;
case "Animal":
mob.resists.addResists(Resists.getResists(0));
break;
case "Aracoix":
mob.resists.addResists(Resists.getResists(22));
break;
case "Celestial":
mob.resists.addResists(Resists.getResists(0));
break;
case "Centaur":
mob.resists.addResists(Resists.getResists(24));
break;
case "Construct":
mob.resists.addResists(Resists.getResists(0));
break;
case "CSR":
mob.resists.addResists(Resists.getResists(0));
break;
case "Dragon":
mob.resists.addResists(Resists.getResists(10));
break;
case "Dwarf":
mob.resists.addResists(Resists.getResists(25));
break;
case "Elf":
mob.resists.addResists(Resists.getResists(5));
break;
case "Giant":
mob.resists.addResists(Resists.getResists(34));
break;
case "Goblin":
mob.resists.addResists(Resists.getResists(0));
break;
case "Grave":
mob.resists.addResists(Resists.getResists(0));
break;
case "HalfGiant":
mob.resists.addResists(Resists.getResists(6));
break;
case "Human":
mob.resists.addResists(Resists.getResists(0));
break;
case "Infernal":
mob.resists.addResists(Resists.getResists(18));
break;
case "Insect":
mob.resists.addResists(Resists.getResists(19));
break;
case "Irekei":
mob.resists.addResists(Resists.getResists(12));
break;
case "Minotaur":
mob.resists.addResists(Resists.getResists(13));
break;
case "Monster":
mob.resists.addResists(Resists.getResists(35));
break;
case "NecroPet":
mob.resists.addResists(Resists.getResists(23));
break;
case "NPC":
mob.resists.addResists(Resists.getResists(0));
break;
case "Pet":
mob.resists.addResists(Resists.getResists(19));
break;
case "Plant":
mob.resists.addResists(Resists.getResists(36));
break;
case "Rat":
mob.resists.addResists(Resists.getResists(0));
break;
case "Reptile":
mob.resists.addResists(Resists.getResists(0));
break;
case "Shade":
mob.resists.addResists(Resists.getResists(26));
break;
case "Siege":
mob.resists.addResists(Resists.getResists(38));
break;
case "Summoned":
mob.resists.addResists(Resists.getResists(19));
break;
case "Troll":
mob.resists.addResists(Resists.getResists(33));
break;
case "Undead":
mob.resists.addResists(Resists.getResists(27));
break;
case "Nephilim":
mob.resists.addResists(Resists.getResists(7));
break;
case "Vampire":
mob.resists.addResists(Resists.getResists(11));
break;
case "SiegeEngineer":
mob.resists.addResists(Resists.getResists(0));
mob.resists.addResists(Resists.getResists(32));
break;
}
}
if(mob.getNameOverride().length() > 1){
mob.resists.addResists(Resists.getResists(3));
}
switch(mob.mobBase.raceType){
case "Aelfborn":
mob.resists.addResists(Resists.getResists(0));
break;
case "All":
mob.resists.addResists(Resists.getResists(0));
break;
case "Animal":
mob.resists.addResists(Resists.getResists(0));
break;
case "Aracoix":
mob.resists.addResists(Resists.getResists(22));
break;
case "Celestial":
mob.resists.addResists(Resists.getResists(0));
break;
case "Centaur":
mob.resists.addResists(Resists.getResists(24));
break;
case "Construct":
mob.resists.addResists(Resists.getResists(0));
break;
case "CSR":
mob.resists.addResists(Resists.getResists(0));
break;
case "Dragon":
mob.resists.addResists(Resists.getResists(10));
break;
case "Dwarf":
mob.resists.addResists(Resists.getResists(25));
break;
case "Elf":
mob.resists.addResists(Resists.getResists(5));
break;
case "Giant":
mob.resists.addResists(Resists.getResists(34));
break;
case "Goblin":
mob.resists.addResists(Resists.getResists(0));
break;
case "Grave":
mob.resists.addResists(Resists.getResists(0));
break;
case "HalfGiant":
mob.resists.addResists(Resists.getResists(6));
break;
case "Human":
mob.resists.addResists(Resists.getResists(0));
break;
case "Infernal":
mob.resists.addResists(Resists.getResists(18));
break;
case "Insect":
mob.resists.addResists(Resists.getResists(19));
break;
case "Irekei":
mob.resists.addResists(Resists.getResists(12));
break;
case "Minotaur":
mob.resists.addResists(Resists.getResists(13));
break;
case "Monster":
mob.resists.addResists(Resists.getResists(35));
break;
case "NecroPet":
mob.resists.addResists(Resists.getResists(23));
break;
case "NPC":
mob.resists.addResists(Resists.getResists(0));
break;
case "Pet":
mob.resists.addResists(Resists.getResists(19));
break;
case "Plant":
mob.resists.addResists(Resists.getResists(36));
break;
case "Rat":
mob.resists.addResists(Resists.getResists(0));
break;
case "Reptile":
mob.resists.addResists(Resists.getResists(0));
break;
case "Shade":
mob.resists.addResists(Resists.getResists(26));
break;
case "Siege":
mob.resists.addResists(Resists.getResists(38));
break;
case "Summoned":
mob.resists.addResists(Resists.getResists(19));
break;
case "Troll":
mob.resists.addResists(Resists.getResists(33));
break;
case "Undead":
mob.resists.addResists(Resists.getResists(27));
break;
case "Nephilim":
mob.resists.addResists(Resists.getResists(7));
break;
case "Vampire":
mob.resists.addResists(Resists.getResists(11));
break;
case "SiegeEngineer":
mob.resists.addResists(Resists.getResists(0));
break;
}
}
public static void serializeMobForClientMsgOtherPlayer(Mob mob, ByteBufferWriter writer) throws SerializationException {

Loading…
Cancel
Save