mob resist issue
This commit is contained in:
@@ -38,6 +38,7 @@ import java.util.LinkedHashMap;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
|
||||
import static engine.gameManager.NPCManager._runeSetMap;
|
||||
import static engine.net.client.msg.ErrorPopupMsg.sendErrorPopup;
|
||||
|
||||
public class Mob extends AbstractIntelligenceAgent {
|
||||
@@ -161,14 +162,62 @@ public class Mob extends AbstractIntelligenceAgent {
|
||||
|
||||
this.agentType = AIAgentType.MOBILE;
|
||||
|
||||
this.setResists(Resists.getResists(rs.getInt("mob_spawnType")));
|
||||
//this.setResists(Resists.getResists(rs.getInt("mob_spawnType")));
|
||||
|
||||
setResistsForMob(this);
|
||||
} catch (Exception e) {
|
||||
Logger.error(e + " " + this.dbID);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void setResistsForMob(Mob mob){
|
||||
mob.resists = new Resists("Generic");
|
||||
Zone MacroParent = null;
|
||||
for(Zone zone : ZoneManager.getAllZonesIn(mob.loc)){
|
||||
if(zone.isMacroZone() == false)
|
||||
continue;
|
||||
switch(zone.getName()){
|
||||
//ice generics
|
||||
case "Ymur's Crown":
|
||||
case "Kralgaar Holm":
|
||||
case "Ecklund Wilds":
|
||||
case "Aurrochs Skrae":
|
||||
mob.resists = 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);
|
||||
break;
|
||||
//Swamp Generics
|
||||
case "Thollok Marsh":
|
||||
case "The Black Bog":
|
||||
case "Sevaath Mere":
|
||||
mob.resists = Resists.getResists(10);
|
||||
break;
|
||||
//Oblivion Generics
|
||||
case "Plain of Ashes":
|
||||
case "Bone Marches":
|
||||
case "The Doomplain":
|
||||
case "Greensward Pyre":
|
||||
mob.resists = 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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void serializeMobForClientMsgOtherPlayer(Mob mob, ByteBufferWriter writer) throws SerializationException {
|
||||
Mob.serializeForClientMsgOtherPlayer(mob, writer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user