From b06d854182ba364a29622ebba2f2490a7b6e14cb Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Thu, 13 Mar 2025 21:16:41 -0500 Subject: [PATCH] hellgates maybe? round 4 --- src/engine/gameManager/HellgateManager.java | 52 ++++++--------------- 1 file changed, 13 insertions(+), 39 deletions(-) diff --git a/src/engine/gameManager/HellgateManager.java b/src/engine/gameManager/HellgateManager.java index 814dbfbc..c6ddb3c2 100644 --- a/src/engine/gameManager/HellgateManager.java +++ b/src/engine/gameManager/HellgateManager.java @@ -38,22 +38,7 @@ public class HellgateManager { Mob mob = CreateHellgateMiniBoss(); if(mob == null) continue; - mob.setResists(new Resists("Elite")); - mob.spawnTime = 1000000000; - mob.BehaviourType = Enum.MobBehaviourType.Aggro; - mob.setLoc(realLoc); - mob.bindLoc = realLoc; - mob.healthMax = 12500; - mob.setHealth(mob.healthMax); - mob.maxDamageHandOne = 1550; - mob.minDamageHandOne = 750; - mob.atrHandOne = 1800; - mob.defenseRating = 2200; - mob.setFirstName("Hellgate Commander"); - InterestManager.setObjectDirty(mob); - WorldGrid.addObject(mob,realLoc.x,realLoc.z); - WorldGrid.updateObject(mob); - mob.runAfterLoad(); + completeMobSpawn(mob,realLoc); LootManager.GenerateStrongholdLoot(mob,true,false); hellgate.mini_bosses.add(mob); mob.setObjectUUID(mob.getObjectUUID() - (10000 + offsetUID)); @@ -63,22 +48,7 @@ public class HellgateManager { if(minion == null) continue; Vector3fImmutable offset = Vector3fImmutable.getRandomPointOnCircle(realLoc,32f); - minion.setLoc(offset); - minion.bindLoc = offset; - minion.setResists(new Resists("Elite")); - minion.spawnTime = 1000000000; - minion.BehaviourType = Enum.MobBehaviourType.Aggro; - minion.healthMax = 7500; - minion.setHealth(minion.healthMax); - minion.maxDamageHandOne = 1550; - minion.minDamageHandOne = 750; - minion.atrHandOne = 1800; - minion.defenseRating = 2200; - minion.setFirstName("Hellgate Soldier"); - WorldGrid.addObject(minion,offset.x,offset.z); - InterestManager.setObjectDirty(minion); - WorldGrid.updateObject(minion); - minion.runAfterLoad(); + completeMobSpawn(minion,offset); LootManager.GenerateStrongholdLoot(minion,false,false); hellgate.mobs.add(minion); minion.setObjectUUID(minion.getObjectUUID() - (10000 + offsetUID)); @@ -90,18 +60,22 @@ public class HellgateManager { Mob mob = CreateHellgateBoss(); if(mob == null) return; - mob.setLoc(hellgate.parent.getLoc()); - mob.bindLoc = hellgate.parent.getLoc(); + completeMobSpawn(mob,hellgate.parent.getLoc()); + LootManager.GenerateStrongholdLoot(mob,false,true); + hellgate.boss = mob; + mob.setObjectUUID(mob.getObjectUUID() - (10000 + offsetUID)); + offsetUID++; + } + + public static void completeMobSpawn(Mob mob, Vector3fImmutable loc){ + mob.setLoc(loc); + mob.bindLoc = loc; mob.spawnTime = 1000000000; mob.setResists(new Resists("Elite")); - WorldGrid.addObject(mob,hellgate.parent.getLoc().x,hellgate.parent.getLoc().z); + WorldGrid.addObject(mob,loc.x,loc.z); InterestManager.setObjectDirty(mob); WorldGrid.updateObject(mob); mob.runAfterLoad(); - LootManager.GenerateStrongholdLoot(mob,false,true); - hellgate.boss = mob; - mob.setObjectUUID(mob.getObjectUUID() - (10000 + offsetUID)); - offsetUID++; } public static Mob CreateHellgateMob(){