From 3a675402120ece6c4b3969791146b53c34dd095f Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Tue, 9 Jul 2024 19:31:49 -0500 Subject: [PATCH] stronghold attack messages --- src/engine/gameManager/StrongholdManager.java | 7 +++++++ src/engine/objects/Mob.java | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/engine/gameManager/StrongholdManager.java b/src/engine/gameManager/StrongholdManager.java index 828546ca..7e025215 100644 --- a/src/engine/gameManager/StrongholdManager.java +++ b/src/engine/gameManager/StrongholdManager.java @@ -6,6 +6,7 @@ import engine.InterestManagement.WorldGrid; import engine.math.Vector3f; import engine.math.Vector3fImmutable; import engine.objects.*; +import org.pmw.tinylog.Logger; import java.util.ArrayList; import java.util.HashMap; @@ -63,6 +64,7 @@ public class StrongholdManager { MobBase guardBase = MobBase.getMobBase(getStrongholdGuardianID(tower.meshUUID)); Mob guard = Mob.createMob(guardBase.getLoadID(), loc, Guild.getErrantGuild(),true,mineZone,null,0, guardBase.getFirstName(),65); if(guard != null){ + guard.parentZone = mine.getParentZone(); guard.bindLoc = loc; guard.setLoc(loc); guard.equipmentSetID = getStrongholdMobEquipSetID(guard.getMobBaseID()); @@ -89,6 +91,7 @@ public class StrongholdManager { MobBase commanderBase = MobBase.getMobBase(getStrongholdCommanderID(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(); commander.bindLoc = loc; commander.setLoc(loc); commander.equipmentSetID = getStrongholdMobEquipSetID(commander.getMobBaseID()); @@ -119,6 +122,8 @@ public class StrongholdManager { tower.getBounds().setRegions(tower); InterestManager.setObjectDirty(tower); WorldGrid.updateObject(tower); + ChatManager.chatSystemChannel(mine.getZoneName() + "'s Stronghold Has Begun!"); + Logger.info(mine.getZoneName() + "'s Stronghold Has Begun!"); } public static void EndStronghold(Mine mine){ @@ -156,6 +161,8 @@ public class StrongholdManager { tower.getBounds().setRegions(tower); InterestManager.setObjectDirty(tower); WorldGrid.updateObject(tower); + ChatManager.chatSystemChannel(mine.getZoneName() + "'s Stronghold Has Concluded!"); + Logger.info(mine.getZoneName() + "'s Stronghold Has Concluded!"); } public static int getStrongholdMeshID(Zone parent){ diff --git a/src/engine/objects/Mob.java b/src/engine/objects/Mob.java index 228b1c05..4e9e7f6b 100644 --- a/src/engine/objects/Mob.java +++ b/src/engine/objects/Mob.java @@ -1291,6 +1291,8 @@ public class Mob extends AbstractIntelligenceAgent { Dispatch dispatch; try { + if(this.StrongholdGuardian || this.StrongholdCommander) + ChatManager.chatSystemChannel(this.parentZone.getName() + "'s Stronghold Is Under Attack!"); //resync corpses //this.setLoc(this.getMovementLoc()); if (this.isSiege) {