diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminTerritoryWar.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminTerritoryWar.java index d0fc113a32427b0c85f3c00d43713adbd8af5748..2548d6c243c74d47486dfaa69c78d6762c428dbf 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminTerritoryWar.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminTerritoryWar.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.StringTokenizer; import com.l2jserver.gameserver.handler.IAdminCommandHandler; +import com.l2jserver.gameserver.instancemanager.GlobalVariablesManager; import com.l2jserver.gameserver.instancemanager.TerritoryWarManager; import com.l2jserver.gameserver.model.TerritoryWard; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; @@ -109,6 +110,7 @@ public class AdminTerritoryWar implements IAdminCommandHandler else if (cal.getTimeInMillis() != TerritoryWarManager.getInstance().getTWStartTimeInMillis()) { TerritoryWarManager.getInstance().setTWStartTimeInMillis(cal.getTimeInMillis()); + GlobalVariablesManager.getInstance().set(TerritoryWarManager.GLOBAL_VARIABLE, cal.getTimeInMillis()); } } showSiegeTimePage(activeChar); diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/quests/TerritoryWarScripts/TerritoryWarSuperClass.java b/L2J_DataPack_BETA/dist/game/data/scripts/quests/TerritoryWarScripts/TerritoryWarSuperClass.java index e91f999f0e4bb0ac82bdfe6aef5b4c968b986471..77a70d5545706c3948e804fecfbb580ab76b50aa 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/quests/TerritoryWarScripts/TerritoryWarSuperClass.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/quests/TerritoryWarScripts/TerritoryWarSuperClass.java @@ -79,7 +79,7 @@ public class TerritoryWarSuperClass extends Quest // Calculate next TW date final Calendar cal = Calendar.getInstance(); - final long nextSiegeDate = GlobalVariablesManager.getInstance().getLong("nextTWStartDate", 0); + final long nextSiegeDate = GlobalVariablesManager.getInstance().getLong(TerritoryWarManager.GLOBAL_VARIABLE, 0); if (nextSiegeDate > System.currentTimeMillis()) { cal.setTimeInMillis(nextSiegeDate); @@ -101,6 +101,7 @@ public class TerritoryWarSuperClass extends Quest { cal.add(Calendar.WEEK_OF_YEAR, 2); } + GlobalVariablesManager.getInstance().set(TerritoryWarManager.GLOBAL_VARIABLE, cal.getTimeInMillis()); } TerritoryWarManager.getInstance().setTWStartTimeInMillis(cal.getTimeInMillis()); _log.info(getClass().getSimpleName() + ": Siege date: " + cal.getTime());