Browse Source

bane commander NPC

lakebane2
FatBoy-DOTC 3 weeks ago
parent
commit
36481a53d9
  1. 7
      src/engine/db/handlers/dbBaneHandler.java
  2. 14
      src/engine/objects/Bane.java

7
src/engine/db/handlers/dbBaneHandler.java

@ -10,10 +10,9 @@ @@ -10,10 +10,9 @@
package engine.db.handlers;
import engine.gameManager.DbManager;
import engine.objects.Bane;
import engine.objects.Building;
import engine.objects.City;
import engine.objects.PlayerCharacter;
import engine.gameManager.ZoneManager;
import engine.math.Vector3fImmutable;
import engine.objects.*;
import org.joda.time.DateTime;
import org.pmw.tinylog.Logger;

14
src/engine/objects/Bane.java

@ -101,6 +101,8 @@ public final class Bane { @@ -101,6 +101,8 @@ public final class Bane {
JobScheduler.getInstance().scheduleJob(abtj, this.liveDate.getMillis());
this.activateBaneJob = abtj;
//add bane commander NPC
summonBaneCommander(this);
break;
}
@ -266,13 +268,19 @@ public final class Bane { @@ -266,13 +268,19 @@ public final class Bane {
BaneRecord baneRecord = BaneRecord.borrow(bane, Enum.RecordEventType.PENDING);
DataWarehouse.pushToWarehouse(baneRecord);
//add bane commander NPC
int contractID = 1502042;
NPC.createNPC("Bane Commander",contractID,Vector3fImmutable.getRandomPointOnCircle(stone.loc,15),targetCity.getGuild(),cityZone,(short)70,stone);
summonBaneCommander(bane);
return true;
}
public static void summonBaneCommander(Bane bane){
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());
}
}
public static Bane getBane(int cityUUID) {
Bane outBane;

Loading…
Cancel
Save