repeatable quests: redo timer isn't working
Belegalgar opened this issue · 1 comments
Hello,
we have an issue regarding repeatable quests with a redo timer:
Every time a player disconnects from our server and reconnects the timer will reset to an older value from another repeatable quest.
Let me show an example:
At the beginning, before joining the server, my .yml will look like:
currentQuests: none
currentStages: none
quest-points: 0
completed-Quests:
- Metzger
- Startquest-Holzfäller
- Holzfäller
- Startquest-Jäger
- Jäger
- Startquest-Metzger
completedRedoableQuests:
- Startquest-Jäger
- Startquest-Holzfäller
- Holzfäller
- Metzger
- Startquest-Metzger
- Jäger
completedQuestTimes:
- 1442478672601
- 1442478672602
- 1442478672603
- 1442478672604
- 1442478672605
- 1442478672606
hasJournal: false
lastKnownName: Belegalgar
I'm connecting to the server and start the quest Metzger which is configured:
M7:
name: Metzger
npc-giver-id: 79
redo-delay: 72000
ask-message: Hallo Metzger. Bring dem Lagermeister am Hafen täglich 64 Rindfleisch. Wir werden dir Ratschläge geben bis du in deinem Beruf besser geworden bist. Danach kannst du Hein den Händler aufsuchen - aber wirklich erst dann.
finish-message: '&dJa, das sieht doch wieder einmal besser aus. Wenn du so weiter machst kannst du schon recht bald zu Hein dem Händler gehen. (Ab Berufslevel 50)'
gui-display: name-RAW_BEEF:amount-1:displayname-§5Metzger-Quest
requirements:
permissions:
- quest.berufe.metzger.7
fail-requirement-message: Du bist kein Metzger, oder dein Level ist nicht hoch genug! (Level 7 benötigt)
stages:
ordered:
'1':
items-to-deliver:
- name-RAW_BEEF:amount-64
npc-delivery-ids:
- 78
delivery-messages:
- Danke für die Ware!
rewards:
commands:
- jobs grantxp <player> metzger 500
- taler geben <player> 500
Without disconnecting my .yml looks like:
currentQuests:
- Metzger
currentStages:
- 0
quest-points: 0
questData:
Metzger:
item-delivery-amounts:
- 0
completed-Quests:
- Metzger
- Startquest-Holzfäller
- Holzfäller
- Startquest-Jäger
- Jäger
- Startquest-Metzger
completedRedoableQuests:
- Startquest-Jäger
- Startquest-Holzfäller
- Holzfäller
- Metzger
- Jäger
- Startquest-Metzger
completedQuestTimes:
- 1442478672606
- 1442478672606
- 1442478672606
- 1442478672606
- 1442478672606
- 1442478672606
hasJournal: false
lastKnownName: Belegalgar
Here you can already see, that all values in completedQuestTimes have been overwritten with the value from the last line (1442478672606).
After completing the Metzger-Quest my .yml looks like:
currentQuests: none
currentStages: none
quest-points: 0
completed-Quests:
- Metzger
- Startquest-Holzfäller
- Holzfäller
- Startquest-Jäger
- Jäger
- Startquest-Metzger
- null
completedRedoableQuests:
- Startquest-Jäger
- Startquest-Holzfäller
- Holzfäller
- Metzger
- Jäger
- Startquest-Metzger
completedQuestTimes:
- 1442478672606
- 1442478672606
- 1442478672606
- 1445358833203
- 1442478672606
- 1442478672606
hasJournal: false
lastKnownName: Belegalgar
As you can see the time when i completed the Quest is written at the 4th line of completedQuestTimes, which probably responds to the 4th line "- Metzger" at completedRedoableQuests
As long as i don't disconnect i can't redo the quest Metzger (i have to wait 20 hours).
If i disconnect now, the .yml still looks like
currentQuests: none
currentStages: none
quest-points: 0
completed-Quests:
- Metzger
- Startquest-Holzfäller
- Holzfäller
- Startquest-Jäger
- Jäger
- Startquest-Metzger
- null
completedRedoableQuests:
- Startquest-Jäger
- Startquest-Holzfäller
- Holzfäller
- Metzger
- Jäger
- Startquest-Metzger
completedQuestTimes:
- 1442478672606
- 1442478672606
- 1442478672606
- 1445358833203
- 1442478672606
- 1442478672606
hasJournal: false
lastKnownName: Belegalgar
If i now reconnect to the server - without doing anything on the server - and quit directly after connecting - .yml will again look like:
urrentQuests: none
currentStages: none
quest-points: 0
completed-Quests:
- Metzger
- Startquest-Holzfäller
- Holzfäller
- Startquest-Jäger
- Jäger
- Startquest-Metzger
completedRedoableQuests:
- Startquest-Jäger
- Startquest-Holzfäller
- Holzfäller
- Metzger
- Startquest-Metzger
- Jäger
completedQuestTimes:
- 1442478672606
- 1442478672606
- 1442478672606
- 1442478672606
- 1442478672606
- 1442478672606
hasJournal: false
lastKnownName: Belegalgar
Again, the last line from completedQuestTimes overwrote all other values, even the 4th line with the last time i've completed the Metzger quest. Thus the player can request the Metzger quest before the redo delay expires.
Even without doing a quest, if i just disconnect, reconnect and disconnect again my completedQuestTimes is overwritten in all lines with 1442478672606 (value from last line).
The issue occurred with the Metzger quest but I don’t have any reason to assume that it is exclusively related to this quest.
I'm running Quests 2.5.2-b90 with CraftBukkit version git-Spigot-76236cb-62a2169 (MC: 1.8.8)
Thanks
Belegalgar
( I've accidentally posted this issue first at Blackvein's repo )
Duplicate of #67