bane commander NPC
This commit is contained in:
@@ -392,9 +392,9 @@ public class ManageCityAssetsMsg extends ClientNetMsg {
|
|||||||
writer.putInt(bane.getSiegePhase().ordinal()); //1 challenge //2 standoff //3 war
|
writer.putInt(bane.getSiegePhase().ordinal()); //1 challenge //2 standoff //3 war
|
||||||
writer.put((byte) 0);
|
writer.put((byte) 0);
|
||||||
|
|
||||||
if (!bane.isAccepted() && this.assetManager.getGuild() == banedCity.getGuild() && GuildStatusController.isInnerCouncil(this.assetManager.getGuildStatus()))
|
//if (!bane.isAccepted() && this.assetManager.getGuild() == banedCity.getGuild() && GuildStatusController.isInnerCouncil(this.assetManager.getGuildStatus()))
|
||||||
writer.put((byte) 1); //canSetTime
|
// writer.put((byte) 1); //canSetTime
|
||||||
else
|
//else
|
||||||
writer.put((byte) 0);
|
writer.put((byte) 0);
|
||||||
|
|
||||||
DateTime placedOn = bane.getLiveDate();
|
DateTime placedOn = bane.getLiveDate();
|
||||||
|
|||||||
@@ -505,6 +505,9 @@ public final class Bane {
|
|||||||
return liveDate;
|
return liveDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLiveDate_NEW(DateTime baneTime) {
|
||||||
|
|
||||||
|
}
|
||||||
public void setLiveDate(DateTime baneTime) {
|
public void setLiveDate(DateTime baneTime) {
|
||||||
|
|
||||||
if (DbManager.BaneQueries.SET_BANE_TIME(baneTime, this.getCity().getObjectUUID())) {
|
if (DbManager.BaneQueries.SET_BANE_TIME(baneTime, this.getCity().getObjectUUID())) {
|
||||||
|
|||||||
@@ -351,11 +351,21 @@ public class Contract extends AbstractGameObject {
|
|||||||
if (updateBaneDay > 0) {
|
if (updateBaneDay > 0) {
|
||||||
if(DbManager.BaneQueries.SET_BANE_DAY_NEW(updateBaneDay,bane.getCityUUID())){
|
if(DbManager.BaneQueries.SET_BANE_DAY_NEW(updateBaneDay,bane.getCityUUID())){
|
||||||
bane.daySet = true;
|
bane.daySet = true;
|
||||||
|
if(bane.getLiveDate() == null) {
|
||||||
|
bane.setLiveDate_NEW(bane.getPlacementDate().plusDays(updateBaneDay));
|
||||||
|
}else{
|
||||||
|
bane.setLiveDate_NEW(bane.getLiveDate().plusDays(updateBaneDay));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (updateBaneTime > 0) {
|
if (updateBaneTime > 0) {
|
||||||
if(DbManager.BaneQueries.SET_BANE_TIME_NEW(updateBaneTime,bane.getCityUUID())){
|
if(DbManager.BaneQueries.SET_BANE_TIME_NEW(updateBaneTime,bane.getCityUUID())){
|
||||||
bane.timeSet = true;
|
bane.timeSet = true;
|
||||||
|
if(bane.getLiveDate() == null) {
|
||||||
|
bane.setLiveDate_NEW(bane.getPlacementDate().withHourOfDay(12 + updateBaneTime));
|
||||||
|
}else{
|
||||||
|
bane.setLiveDate_NEW(bane.getLiveDate().withHourOfDay(12 + updateBaneTime));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (updateBaneCap > 0) {
|
if (updateBaneCap > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user