From 15bc99d216ec796d4c0955d64ce4736ee2dcaecc Mon Sep 17 00:00:00 2001 From: FatBoy-DOTC Date: Mon, 30 Dec 2024 16:29:16 -0600 Subject: [PATCH] bane commander NPC work --- src/engine/objects/Bane.java | 2 ++ src/engine/objects/Contract.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/engine/objects/Bane.java b/src/engine/objects/Bane.java index 7709c253..921e3f7d 100644 --- a/src/engine/objects/Bane.java +++ b/src/engine/objects/Bane.java @@ -289,6 +289,8 @@ public final class Bane { //add bane commander NPC int contractID = 1502042; baneCommander = NPC.createNPC("Bane Commander", contractID, spawnLoc, bane.getCity().getGuild(), ZoneManager.findSmallestZone(bane.getStone().loc), (short) 70, bane.getStone()); + WorldGrid.addObject(baneCommander,spawnLoc.x,spawnLoc.z); + WorldGrid.updateObject(baneCommander); } else { diff --git a/src/engine/objects/Contract.java b/src/engine/objects/Contract.java index cf249773..5d8e39fd 100644 --- a/src/engine/objects/Contract.java +++ b/src/engine/objects/Contract.java @@ -208,6 +208,12 @@ public class Contract extends AbstractGameObject { City city = ZoneManager.getCityAtLocation(npc.loc); if(city != null){ bane = city.getBane(); + if(!city.getGuild().equals(pc.guild)) + return vd; + + if(!GuildStatusController.isInnerCouncil(pc.getGuildStatus()) && !GuildStatusController.isGuildLeader(pc.getGuildStatus())){ + return vd; + } } } if(bane == null){