mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-14 14:45:41 +01:00
Properly load redo-delay cooldowns, alternative to #49
This commit is contained in:
parent
0cde844152
commit
a5ba267f11
@ -1868,6 +1868,7 @@ public class Quester {
|
|||||||
for (String s : completedTimes.keySet()) {
|
for (String s : completedTimes.keySet()) {
|
||||||
questTimeNames.add(s);
|
questTimeNames.add(s);
|
||||||
questTimes.add(completedTimes.get(s));
|
questTimes.add(completedTimes.get(s));
|
||||||
|
System.out.println("Saving = " + s + " " + completedTimes.get(s));
|
||||||
}
|
}
|
||||||
data.set("completedRedoableQuests", questTimeNames);
|
data.set("completedRedoableQuests", questTimeNames);
|
||||||
data.set("completedQuestTimes", questTimes);
|
data.set("completedQuestTimes", questTimes);
|
||||||
@ -1911,17 +1912,17 @@ public class Quester {
|
|||||||
}
|
}
|
||||||
hardClear();
|
hardClear();
|
||||||
if (data.contains("completedRedoableQuests")) {
|
if (data.contains("completedRedoableQuests")) {
|
||||||
for (String s : data.getStringList("completedRedoableQuests")) {
|
List<String> redoNames = data.getStringList("completedRedoableQuests");
|
||||||
for (Object o : data.getList("completedQuestTimes")) {
|
List<Long> redoTimes = data.getLongList("completedQuestTimes");
|
||||||
|
for (String s : redoNames) {
|
||||||
for (Quest q : plugin.quests) {
|
for (Quest q : plugin.quests) {
|
||||||
if (q.name.equalsIgnoreCase(s)) {
|
if (q.name.equalsIgnoreCase(s)) {
|
||||||
completedTimes.put(q.name, (Long) o);
|
completedTimes.put(q.name, redoTimes.get(redoNames.indexOf(s)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (data.contains("amountsCompletedQuests")) {
|
if (data.contains("amountsCompletedQuests")) {
|
||||||
List<String> list1 = data.getStringList("amountsCompletedQuests");
|
List<String> list1 = data.getStringList("amountsCompletedQuests");
|
||||||
List<Integer> list2 = data.getIntegerList("amountsCompleted");
|
List<Integer> list2 = data.getIntegerList("amountsCompleted");
|
||||||
|
Loading…
Reference in New Issue
Block a user