1
0
mirror of https://github.com/PikaMug/Quests.git synced 2024-12-23 01:27:35 +01:00

Fix delays breaking reach-location objectives, fixes

This commit is contained in:
HappyPikachu 2018-11-07 02:22:56 -05:00
parent 441cd7ef28
commit 81a6c7a772
2 changed files with 28 additions and 24 deletions
src/main/java/me/blackvein/quests

View File

@ -414,6 +414,7 @@ public class Quester {
msg = msg.replace("<quest>", q.name);
getPlayer().sendMessage(ChatColor.GOLD + msg);
for (String s : getObjectivesReal(q)) {
try {
// TODO ensure all applicable strings are translated
String sbegin = s.substring(s.indexOf(ChatColor.AQUA.toString()) + 2);
String serial = sbegin.substring(0, sbegin.indexOf(ChatColor.GREEN.toString()));
@ -438,6 +439,9 @@ public class Quester {
} else {
player.sendMessage(s);
}
} catch (IndexOutOfBoundsException e) {
player.sendMessage(s);
}
}
String stageStartMessage = stage.startMessage;
if (stageStartMessage != null) {

View File

@ -53,12 +53,12 @@ public class StageTimer implements Runnable {
}
quester.hardStagePut(quest, stageNum);
quester.addEmptiesFor(quest, 0);
quester.getCurrentStage(quest).delay = -1; // Line added to fix Github issue #505
quester.getQuestData(quest).delayStartTime = 0;
quester.getQuestData(quest).delayTimeLeft = -1;
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 + Lang.get(player, "questObjectivesTitle"));
for (String s : quester.getObjectivesReal(quest)) {
player.sendMessage(s);
}