From fb0790a7335841a5c0987c0d5c8e6ddc2620d4aa Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 9 Jul 2024 20:28:56 -0500 Subject: [PATCH] epic encounter after clearing a stronghold --- src/engine/gameManager/StrongholdManager.java | 6 ++---- src/engine/objects/Mine.java | 2 -- src/engine/objects/Mob.java | 12 ++++++------ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/engine/gameManager/StrongholdManager.java b/src/engine/gameManager/StrongholdManager.java index 021ce24d..bfa336c4 100644 --- a/src/engine/gameManager/StrongholdManager.java +++ b/src/engine/gameManager/StrongholdManager.java @@ -254,8 +254,6 @@ public class StrongholdManager { } public static void CheckToEndStronghold(Mine mine) { - if (!mine.isStronghold) - return; boolean stillAlive = false; for (Mob mob : mine.strongholdMobs) @@ -272,7 +270,7 @@ public class StrongholdManager { Zone mineZone = ZoneManager.findSmallestZone(tower.loc); Vector3fImmutable loc = tower.loc; - MobBase commanderBase = MobBase.getMobBase(getStrongholdCommanderID(tower.meshUUID)); + MobBase commanderBase = MobBase.getMobBase(getStrongholdGuardianID(tower.meshUUID)); Mob commander = Mob.createMob(commanderBase.getLoadID(), loc, Guild.getErrantGuild(), true, mineZone, null, 0, commanderBase.getFirstName(), 75); if (commander != null) { commander.parentZone = mine.getParentZone(); @@ -289,7 +287,7 @@ public class StrongholdManager { commander.mobPowers.put(429032838, 40); // gravechill commander.mobPowers.put(429413547, 40); // grasp of thurin mine.strongholdMobs.add(commander); - LootManager.GenerateStrongholdLoot(commander, true, false); + LootManager.GenerateStrongholdLoot(commander, true, true); commander.healthMax = 250000; commander.setHealth(commander.healthMax); commander.maxDamageHandOne = 5000; diff --git a/src/engine/objects/Mine.java b/src/engine/objects/Mine.java index 72d3c0e5..cc24fe7e 100644 --- a/src/engine/objects/Mine.java +++ b/src/engine/objects/Mine.java @@ -66,8 +66,6 @@ public class Mine extends AbstractGameObject { public ArrayList strongholdMobs; public HashMap oldBuildings; - public Mob epicEncounter = null; - /** * ResultSet Constructor */ diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 2a594389..33660de5 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1229,6 +1229,12 @@ public class Mob extends AbstractIntelligenceAgent { @Override public void killCharacter(AbstractCharacter attacker) { + if(this.StrongholdGuardian || this.StrongholdCommander) { + ChatManager.chatSystemChannel(this.parentZone.getParent().getName() + "'s Stronghold Is Under Attack!"); + StrongholdManager.CheckToEndStronghold(this.stronghold); + } + if(this.StrongholdEpic) + StrongholdManager.EndStronghold(this.stronghold); this.stopMovement(this.getMovementLoc()); @@ -1423,12 +1429,6 @@ public class Mob extends AbstractIntelligenceAgent { WorldGrid.RemoveWorldObject(this); this.charItemManager.clearInventory(); - if(this.StrongholdGuardian || this.StrongholdCommander) { - ChatManager.chatSystemChannel(this.parentZone.getParent().getName() + "'s Stronghold Is Under Attack!"); - StrongholdManager.CheckToEndStronghold(this.stronghold); - } - if(this.StrongholdEpic) - StrongholdManager.EndStronghold(this.stronghold); } @Override