mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-23 09:37:39 +01:00
Fix delays breaking reach-location objectives, fixes #505
This commit is contained in:
parent
441cd7ef28
commit
81a6c7a772
@ -414,6 +414,7 @@ public class Quester {
|
|||||||
msg = msg.replace("<quest>", q.name);
|
msg = msg.replace("<quest>", q.name);
|
||||||
getPlayer().sendMessage(ChatColor.GOLD + msg);
|
getPlayer().sendMessage(ChatColor.GOLD + msg);
|
||||||
for (String s : getObjectivesReal(q)) {
|
for (String s : getObjectivesReal(q)) {
|
||||||
|
try {
|
||||||
// TODO ensure all applicable strings are translated
|
// TODO ensure all applicable strings are translated
|
||||||
String sbegin = s.substring(s.indexOf(ChatColor.AQUA.toString()) + 2);
|
String sbegin = s.substring(s.indexOf(ChatColor.AQUA.toString()) + 2);
|
||||||
String serial = sbegin.substring(0, sbegin.indexOf(ChatColor.GREEN.toString()));
|
String serial = sbegin.substring(0, sbegin.indexOf(ChatColor.GREEN.toString()));
|
||||||
@ -438,6 +439,9 @@ public class Quester {
|
|||||||
} else {
|
} else {
|
||||||
player.sendMessage(s);
|
player.sendMessage(s);
|
||||||
}
|
}
|
||||||
|
} catch (IndexOutOfBoundsException e) {
|
||||||
|
player.sendMessage(s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
String stageStartMessage = stage.startMessage;
|
String stageStartMessage = stage.startMessage;
|
||||||
if (stageStartMessage != null) {
|
if (stageStartMessage != null) {
|
||||||
|
@ -53,12 +53,12 @@ public class StageTimer implements Runnable {
|
|||||||
}
|
}
|
||||||
quester.hardStagePut(quest, stageNum);
|
quester.hardStagePut(quest, stageNum);
|
||||||
quester.addEmptiesFor(quest, 0);
|
quester.addEmptiesFor(quest, 0);
|
||||||
|
quester.getCurrentStage(quest).delay = -1; // Line added to fix Github issue #505
|
||||||
quester.getQuestData(quest).delayStartTime = 0;
|
quester.getQuestData(quest).delayStartTime = 0;
|
||||||
quester.getQuestData(quest).delayTimeLeft = -1;
|
quester.getQuestData(quest).delayTimeLeft = -1;
|
||||||
String msg = Lang.get(player, "questObjectivesTitle");
|
String msg = Lang.get(player, "questObjectivesTitle");
|
||||||
msg = msg.replaceAll("<quest>", quest.name);
|
msg = msg.replace("<quest>", quest.name);
|
||||||
player.sendMessage(ChatColor.GOLD + msg);
|
player.sendMessage(ChatColor.GOLD + msg);
|
||||||
player.sendMessage(ChatColor.GOLD + Lang.get(player, "questObjectivesTitle"));
|
|
||||||
for (String s : quester.getObjectivesReal(quest)) {
|
for (String s : quester.getObjectivesReal(quest)) {
|
||||||
player.sendMessage(s);
|
player.sendMessage(s);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user