From 0581cab5cb4c3714c9d0627a59ed4837fcf3903f Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Fri, 17 May 2024 17:49:54 -0500 Subject: [PATCH] mob resists --- src/engine/objects/Mob.java | 10 ++++------ src/engine/objects/Resists.java | 16 +++------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 0fd965d8..50873aac 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -95,7 +95,6 @@ public class Mob extends AbstractIntelligenceAgent { this.bindLoc = Vector3fImmutable.ZERO; this.gridObjectType = GridObjectType.DYNAMIC; this.agentType = AIAgentType.MOBILE; - setResistsForMob(this); } @@ -164,10 +163,6 @@ public class Mob extends AbstractIntelligenceAgent { this.currentID = this.dbID; this.agentType = AIAgentType.MOBILE; - - //this.setResists(Resists.getResists(rs.getInt("mob_spawnType"))); - - setResistsForMob(this); } catch (Exception e) { Logger.error(e + " " + this.dbID); } @@ -176,7 +171,7 @@ public class Mob extends AbstractIntelligenceAgent { public static void setResistsForMob(Mob mob){ Resists resists = new Resists("Generic"); - int realmID = RealmMap.getRealmIDAtLocation(mob.loc); + int realmID = RealmMap.getRealmIDAtLocation(mob.bindLoc); Realm realm = Realm.getRealm(realmID); //Zone parentMacro = null; //for(Zone zone : ZoneManager.getAllZonesIn(mob.loc)){ @@ -1897,6 +1892,9 @@ public class Mob extends AbstractIntelligenceAgent { this.maxDamageHandTwo *= 2; this.minDamageHandOne *= 2; this.minDamageHandTwo *= 2; + this.mobResists = new Resists("Dropper"); + } else{ + setResistsForMob(this); } //for(Item loot : this.charItemManager.getInventory()){ // if(loot.getItemBase().isDiscRune() && this.level < 80){ diff --git a/src/engine/objects/Resists.java b/src/engine/objects/Resists.java index d27489eb..c4f12dec 100644 --- a/src/engine/objects/Resists.java +++ b/src/engine/objects/Resists.java @@ -46,6 +46,9 @@ public class Resists { case "Mine": setMineResists(); break; + case "Dropper": + setDropperResists(); + break; default: setGenericResists(); break; @@ -67,19 +70,6 @@ public class Resists { this.resists.put(DamageType.Fire, 75f); this.resists.put(DamageType.Cold, 75f); this.resists.put(DamageType.Healing, 75f); - this.immuneTo.put(DamageType.Slash, false); - this.immuneTo.put(DamageType.Crush, false); - this.immuneTo.put(DamageType.Pierce, false); - this.immuneTo.put(DamageType.Magic, false); - this.immuneTo.put(DamageType.Bleed, false); - this.immuneTo.put(DamageType.Poison, false); - this.immuneTo.put(DamageType.Mental, false); - this.immuneTo.put(DamageType.Holy, false); - this.immuneTo.put(DamageType.Unholy, false); - this.immuneTo.put(DamageType.Lightning, false); - this.immuneTo.put(DamageType.Fire, false); - this.immuneTo.put(DamageType.Cold, false); - this.immuneTo.put(DamageType.Siege, false); } public Resists(Resists r) {