Browse Source

bane commander NPC work

lakebane2
FatBoy-DOTC 3 weeks ago
parent
commit
15bc99d216
  1. 2
      src/engine/objects/Bane.java
  2. 6
      src/engine/objects/Contract.java

2
src/engine/objects/Bane.java

@ -289,6 +289,8 @@ public final class Bane {
//add bane commander NPC //add bane commander NPC
int contractID = 1502042; int contractID = 1502042;
baneCommander = NPC.createNPC("Bane Commander", contractID, spawnLoc, 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());
WorldGrid.addObject(baneCommander,spawnLoc.x,spawnLoc.z);
WorldGrid.updateObject(baneCommander);
} }
else else
{ {

6
src/engine/objects/Contract.java

@ -208,6 +208,12 @@ public class Contract extends AbstractGameObject {
City city = ZoneManager.getCityAtLocation(npc.loc); City city = ZoneManager.getCityAtLocation(npc.loc);
if(city != null){ if(city != null){
bane = city.getBane(); 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){ if(bane == null){

Loading…
Cancel
Save