From 10ca5a9ca5d4222e5840e82f9327411b09ffd703 Mon Sep 17 00:00:00 2001 From: Rumen Nikiforov <unafraid89@gmail.com> Date: Fri, 21 Feb 2014 16:35:20 +0000 Subject: [PATCH] BETA: Fixing minor typo in admin siege time changes commands. * Reported by: Sdw * Patch by: Sdw --- .../scripts/handlers/admincommandhandlers/AdminSiege.java | 8 +++++--- .../handlers/admincommandhandlers/AdminTerritoryWar.java | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminSiege.java b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminSiege.java index b564b01dd4..6566804eef 100644 --- a/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminSiege.java +++ b/L2J_DataPack_BETA/dist/game/data/scripts/handlers/admincommandhandlers/AdminSiege.java @@ -262,6 +262,8 @@ public class AdminSiege implements IAdminCommandHandler final Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(castle.getSiegeDate().getTimeInMillis()); + val = st.nextToken(); + if ("month".equals(val)) { int month = cal.get(Calendar.MONTH) + Integer.parseInt(st.nextToken()); @@ -275,12 +277,12 @@ public class AdminSiege implements IAdminCommandHandler else if ("day".equals(val)) { int day = Integer.parseInt(st.nextToken()); - if ((cal.getActualMinimum(Calendar.DAY_OF_YEAR) > day) || (cal.getActualMaximum(Calendar.DAY_OF_YEAR) < day)) + if ((cal.getActualMinimum(Calendar.DAY_OF_MONTH) > day) || (cal.getActualMaximum(Calendar.DAY_OF_MONTH) < day)) { - activeChar.sendMessage("Unable to change Siege Date - Incorrect day value only " + cal.getActualMinimum(Calendar.DAY_OF_YEAR) + "-" + cal.getActualMaximum(Calendar.DAY_OF_YEAR) + " is accepted!"); + activeChar.sendMessage("Unable to change Siege Date - Incorrect day value only " + cal.getActualMinimum(Calendar.DAY_OF_MONTH) + "-" + cal.getActualMaximum(Calendar.DAY_OF_MONTH) + " is accepted!"); return false; } - cal.set(Calendar.DAY_OF_YEAR, day); + cal.set(Calendar.DAY_OF_MONTH, day); } else if ("hour".equals(val)) { 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 c79d41b7e2..cca7f958a1 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 @@ -76,12 +76,12 @@ public class AdminTerritoryWar implements IAdminCommandHandler else if ("day".equals(val)) { int day = Integer.parseInt(st.nextToken()); - if ((cal.getActualMinimum(Calendar.DAY_OF_YEAR) > day) || (cal.getActualMaximum(Calendar.DAY_OF_YEAR) < day)) + if ((cal.getActualMinimum(Calendar.DAY_OF_MONTH) > day) || (cal.getActualMaximum(Calendar.DAY_OF_MONTH) < day)) { - activeChar.sendMessage("Unable to change Siege Date - Incorrect day value only " + cal.getActualMinimum(Calendar.DAY_OF_YEAR) + "-" + cal.getActualMaximum(Calendar.DAY_OF_YEAR) + " is accepted!"); + activeChar.sendMessage("Unable to change Siege Date - Incorrect day value only " + cal.getActualMinimum(Calendar.DAY_OF_MONTH) + "-" + cal.getActualMaximum(Calendar.DAY_OF_MONTH) + " is accepted!"); return false; } - cal.set(Calendar.DAY_OF_YEAR, day); + cal.set(Calendar.DAY_OF_MONTH, day); } else if ("hour".equals(val)) { -- GitLab