mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-24 03:25:20 +01:00
Save the Planner cooldown/repeat-cycle as integer, fixes #1161
This commit is contained in:
parent
9305905d41
commit
d36893ef0e
@ -1843,9 +1843,9 @@ public class QuestFactory implements ConversationAbandonedListener {
|
|||||||
pln.set("end", context.getSessionData(CK.PLN_END_DATE) != null
|
pln.set("end", context.getSessionData(CK.PLN_END_DATE) != null
|
||||||
? (String) context.getSessionData(CK.PLN_END_DATE) : null);
|
? (String) context.getSessionData(CK.PLN_END_DATE) : null);
|
||||||
pln.set("repeat", context.getSessionData(CK.PLN_REPEAT_CYCLE) != null
|
pln.set("repeat", context.getSessionData(CK.PLN_REPEAT_CYCLE) != null
|
||||||
? (Long) context.getSessionData(CK.PLN_REPEAT_CYCLE) : null);
|
? ((Long) context.getSessionData(CK.PLN_REPEAT_CYCLE) / 1000) : null);
|
||||||
pln.set("cooldown", context.getSessionData(CK.PLN_COOLDOWN) != null
|
pln.set("cooldown", context.getSessionData(CK.PLN_COOLDOWN) != null
|
||||||
? (Long) context.getSessionData(CK.PLN_COOLDOWN) : null);
|
? ((Long) context.getSessionData(CK.PLN_COOLDOWN) / 1000) : null);
|
||||||
if (pln.getKeys(false).isEmpty()) {
|
if (pln.getKeys(false).isEmpty()) {
|
||||||
section.set("planner", null);
|
section.set("planner", null);
|
||||||
}
|
}
|
||||||
|
@ -97,13 +97,13 @@ public class PlannerPrompt extends QuestsEditorNumericPrompt {
|
|||||||
if (context.getSessionData(CK.PLN_START_DATE) == null) {
|
if (context.getSessionData(CK.PLN_START_DATE) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.YELLOW + " - " + getPrettyDate((String) context.getSessionData(CK.PLN_START_DATE));
|
return "\n" + ChatColor.YELLOW + " - " + getPrettyDate((String) context.getSessionData(CK.PLN_START_DATE));
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
if (context.getSessionData(CK.PLN_END_DATE) == null) {
|
if (context.getSessionData(CK.PLN_END_DATE) == null) {
|
||||||
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
return ChatColor.GRAY + "(" + Lang.get("noneSet") + ")";
|
||||||
} else {
|
} else {
|
||||||
return ChatColor.YELLOW + " - "
|
return "\n" + ChatColor.YELLOW + " - "
|
||||||
+ getPrettyDate((String) context.getSessionData(CK.PLN_END_DATE));
|
+ getPrettyDate((String) context.getSessionData(CK.PLN_END_DATE));
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
|
Loading…
Reference in New Issue
Block a user