diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java index bacb84734e..df2326a551 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminQuest.java @@ -261,7 +261,7 @@ public class AdminQuest implements IAdminCommandHandler { for (QuestTimer timer : list) { - timers += "
" + timer.getName() + ": Active: " + timer.isActive() + " Repeatable: " + timer.isRepeating() + " Player: " + timer.getPlayer() + " Npc: " + timer.getNpc() + "
"; + timers += "
" + timer.toString() + ": Active: " + timer.isActive() + " Repeatable: " + timer.isRepeating() + " Player: " + timer.getPlayer() + " Npc: " + timer.getNpc() + "
"; counter++; if (counter > 10) { diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/quest/Quest.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/quest/Quest.java index 1662357cb7..3614d11658 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/quest/Quest.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/quest/Quest.java @@ -329,7 +329,7 @@ public class Quest extends AbstractScript implements IIdentifiable { for (QuestTimer timer : timers) { - if ((timer != null) && timer.isMatch(this, name, npc, player)) + if ((timer != null) && timer.equals(this, name, npc, player)) { return timer; } @@ -387,7 +387,7 @@ public class Quest extends AbstractScript implements IIdentifiable final QuestTimer timer = getQuestTimer(name, npc, player); if (timer != null) { - timer.cancelAndRemove(); + timer.cancel(); } } @@ -400,7 +400,7 @@ public class Quest extends AbstractScript implements IIdentifiable { if ((timer != null) && (_questTimers != null)) { - final List timers = getQuestTimers().get(timer.getName()); + final List timers = getQuestTimers().get(timer.toString()); if (timers != null) { _writeLock.lock(); diff --git a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/quest/QuestState.java b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/quest/QuestState.java index 4481431f46..8f15192bcf 100644 --- a/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/quest/QuestState.java +++ b/L2J_Mobius_1.0_Ertheia/java/org/l2jmobius/gameserver/model/quest/QuestState.java @@ -136,31 +136,29 @@ public class QuestState /** * @param state the new state of the quest to set - * @return {@code true} if state was changed, {@code false} otherwise * @see #setState(byte state, boolean saveInDb) * @see org.l2jmobius.gameserver.model.quest.State */ - public boolean setState(byte state) + public void setState(byte state) { - return setState(state, true); + setState(state, true); } /** * Change the state of this quest to the specified value. * @param state the new state of the quest to set * @param saveInDb if {@code true}, will save the state change in the database - * @return {@code true} if state was changed, {@code false} otherwise * @see org.l2jmobius.gameserver.model.quest.State */ - public boolean setState(byte state, boolean saveInDb) + public void setState(byte state, boolean saveInDb) { if (_simulated) { - return false; + return; } if (_state == state) { - return false; + return; } final boolean newQuest = isCreated(); _state = state; @@ -177,20 +175,18 @@ public class QuestState } _player.sendPacket(new QuestList(_player)); - return true; } /** * Add parameter used in quests. * @param var String pointing out the name of the variable for quest * @param value String pointing out the value of the variable for quest - * @return String (equal to parameter "value") */ - public String setInternal(String var, String value) + public void setInternal(String var, String value) { if (_simulated) { - return null; + return; } if (_vars == null) @@ -204,16 +200,15 @@ public class QuestState } _vars.put(var, value); - return value; } - public String set(String var, int value) + public void set(String var, int value) { if (_simulated) { - return null; + return; } - return set(var, Integer.toString(value)); + set(var, Integer.toString(value)); } /** @@ -229,13 +224,12 @@ public class QuestState *