From 2a0e78030631480b5c022f95cd850744458e5a85 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Wed, 12 Mar 2025 20:11:54 -0500 Subject: [PATCH] add mob adding stronghold mobs --- src/engine/devcmd/cmds/AddMobCmd.java | 37 +++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/src/engine/devcmd/cmds/AddMobCmd.java b/src/engine/devcmd/cmds/AddMobCmd.java index ac2fbfa8..a721d384 100644 --- a/src/engine/devcmd/cmds/AddMobCmd.java +++ b/src/engine/devcmd/cmds/AddMobCmd.java @@ -9,12 +9,17 @@ package engine.devcmd.cmds; +import engine.Enum; import engine.Enum.GameObjectType; +import engine.InterestManagement.InterestManager; +import engine.InterestManagement.WorldGrid; import engine.devcmd.AbstractDevCmd; import engine.gameManager.ChatManager; import engine.gameManager.DbManager; +import engine.gameManager.LootManager; import engine.gameManager.ZoneManager; import engine.math.Vector3fImmutable; +import engine.mobileAI.utilities.MovementUtilities; import engine.objects.*; import org.pmw.tinylog.Logger; @@ -83,13 +88,41 @@ public class AddMobCmd extends AbstractDevCmd { } - Mob mob = Mob.createMob(loadID, pc.getLoc(), - null, true, zone, null, 0, "", 1); + //Mob mob = Mob.createMob(loadID, pc.getLoc(),null, true, zone, null, 0, "", 1); + Mob mob = Mob.createStrongholdMob(loadID,pc.loc,Guild.getErrantGuild(),true,zone,null,0,"Whitehorn Militant",75); if (mob != null) { mob.updateDatabase(); ChatManager.chatSayInfo(pc, "Mob with ID " + mob.getDBID() + " added"); this.setResult(String.valueOf(mob.getDBID())); + + mob.parentZone = zone; + mob.bindLoc = pc.loc; + mob.setLoc(pc.loc); + mob.StrongholdGuardian = true; + mob.equipmentSetID = 6327; + mob.runAfterLoad(); + mob.setLevel((short)75); + mob.setResists(new Resists("Elite")); + mob.spawnTime = 1000000000; + mob.BehaviourType = Enum.MobBehaviourType.Aggro; + zone.zoneMobSet.add(mob); + LootManager.GenerateStrongholdLoot(mob,false,false); + mob.healthMax = 12500; + mob.setHealth(mob.healthMax); + mob.maxDamageHandOne = 1550; + mob.minDamageHandOne = 750; + mob.atrHandOne = 1800; + mob.defenseRating = 2200; + mob.setFirstName("Elite Guardian"); + InterestManager.setObjectDirty(mob); + WorldGrid.addObject(mob,pc.loc.x,pc.loc.z); + WorldGrid.updateObject(mob); + //guard.stronghold = mine; + mob.mobPowers.clear(); + mob.mobPowers.put(429399948,20); // find weakness + + } else { throwbackError(pc, "Failed to create mob of type " + loadID); Logger.error("Failed to create mob of type "