bane commander NPC
This commit is contained in:
@@ -10,10 +10,9 @@
|
|||||||
package engine.db.handlers;
|
package engine.db.handlers;
|
||||||
|
|
||||||
import engine.gameManager.DbManager;
|
import engine.gameManager.DbManager;
|
||||||
import engine.objects.Bane;
|
import engine.gameManager.ZoneManager;
|
||||||
import engine.objects.Building;
|
import engine.math.Vector3fImmutable;
|
||||||
import engine.objects.City;
|
import engine.objects.*;
|
||||||
import engine.objects.PlayerCharacter;
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
import org.pmw.tinylog.Logger;
|
import org.pmw.tinylog.Logger;
|
||||||
|
|
||||||
|
|||||||
@@ -101,6 +101,8 @@ public final class Bane {
|
|||||||
JobScheduler.getInstance().scheduleJob(abtj, this.liveDate.getMillis());
|
JobScheduler.getInstance().scheduleJob(abtj, this.liveDate.getMillis());
|
||||||
this.activateBaneJob = abtj;
|
this.activateBaneJob = abtj;
|
||||||
|
|
||||||
|
//add bane commander NPC
|
||||||
|
summonBaneCommander(this);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,13 +268,19 @@ public final class Bane {
|
|||||||
BaneRecord baneRecord = BaneRecord.borrow(bane, Enum.RecordEventType.PENDING);
|
BaneRecord baneRecord = BaneRecord.borrow(bane, Enum.RecordEventType.PENDING);
|
||||||
DataWarehouse.pushToWarehouse(baneRecord);
|
DataWarehouse.pushToWarehouse(baneRecord);
|
||||||
|
|
||||||
|
|
||||||
//add bane commander NPC
|
//add bane commander NPC
|
||||||
int contractID = 1502042;
|
summonBaneCommander(bane);
|
||||||
NPC.createNPC("Bane Commander",contractID,Vector3fImmutable.getRandomPointOnCircle(stone.loc,15),targetCity.getGuild(),cityZone,(short)70,stone);
|
|
||||||
return true;
|
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) {
|
public static Bane getBane(int cityUUID) {
|
||||||
|
|
||||||
Bane outBane;
|
Bane outBane;
|
||||||
|
|||||||
Reference in New Issue
Block a user