From 1b72e7d6b77dc8d64cdab6e7dca8f967626d3957 Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Sat, 28 Dec 2024 05:28:27 -0600 Subject: [PATCH] bane commander NPC --- src/engine/objects/Bane.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/engine/objects/Bane.java b/src/engine/objects/Bane.java index f031a012..3f6776d2 100644 --- a/src/engine/objects/Bane.java +++ b/src/engine/objects/Bane.java @@ -273,10 +273,18 @@ public final class Bane { } public static void summonBaneCommander(Bane bane){ + Vector3fImmutable spawnLoc = Vector3fImmutable.getRandomPointOnCircle(bane.getStone().loc,15); + NPC baneCommander; if(bane.getStone().getHirelings().isEmpty()) { //add bane commander NPC int contractID = 1502042; - NPC.createNPC("Bane Commander", contractID, Vector3fImmutable.getRandomPointOnCircle(bane.getStone().loc, 15), bane.getCity().getGuild(), ZoneManager.findSmallestZone(bane.getStone().loc), (short) 70, bane.getStone()); + baneCommander = NPC.createNPC("Bane Commander", contractID, spawnLoc, bane.getCity().getGuild(), ZoneManager.findSmallestZone(bane.getStone().loc), (short) 70, bane.getStone()); + baneCommander.setLoc(spawnLoc); + baneCommander.setGuild(bane.getCity().getGuild()); + }else{ + baneCommander = (NPC)bane.getStone().getHirelings().keySet().iterator().next(); + baneCommander.setLoc(spawnLoc); + baneCommander.setGuild(bane.getCity().getGuild()); } }