mirror of
https://github.com/YouHaveTrouble/GuildMaster.git
synced 2026-05-12 06:26:59 +00:00
fix mistake preventing quests from being removed after completion
This commit is contained in:
+2
-4
@@ -97,6 +97,7 @@ export default defineComponent({
|
|||||||
adventurer.busy = false;
|
adventurer.busy = false;
|
||||||
}
|
}
|
||||||
missive.adventurers = [];
|
missive.adventurers = [];
|
||||||
|
console.log(missive.rank, missive.rank.toString(), missive.id)
|
||||||
delete this.missives[missive.rank.toString() as QuestRank][missive.id];
|
delete this.missives[missive.rank.toString() as QuestRank][missive.id];
|
||||||
},
|
},
|
||||||
getRandomQuest(rank: QuestRank): Quest | null {
|
getRandomQuest(rank: QuestRank): Quest | null {
|
||||||
@@ -139,13 +140,11 @@ export default defineComponent({
|
|||||||
|
|
||||||
const missives = {} as { [key: string]: { [key: string]: Quest } };
|
const missives = {} as { [key: string]: { [key: string]: Quest } };
|
||||||
|
|
||||||
console.log(saveData.missives)
|
|
||||||
|
|
||||||
for (const id in saveData.missives) {
|
for (const id in saveData.missives) {
|
||||||
const missiveRank = {} as { [key: string]: Quest }
|
const missiveRank = {} as { [key: string]: Quest }
|
||||||
for (const questId in saveData.missives[id]) {
|
for (const questId in saveData.missives[id]) {
|
||||||
const data = saveData.missives[id][questId];
|
const data = saveData.missives[id][questId];
|
||||||
const quest = new Quest(id, getFromString(data.rank), data.title, data.text, data.maxProgress, data.expReward, data.goldReward);
|
const quest = new Quest(questId, getFromString(data.rank), data.title, data.text, data.maxProgress, data.expReward, data.goldReward);
|
||||||
quest.progressPoints = data.progressPoints;
|
quest.progressPoints = data.progressPoints;
|
||||||
if (data.adventurers.length > 0) {
|
if (data.adventurers.length > 0) {
|
||||||
quest.adventurers.push(this.adventurers[data.adventurers[0].id])
|
quest.adventurers.push(this.adventurers[data.adventurers[0].id])
|
||||||
@@ -174,7 +173,6 @@ export default defineComponent({
|
|||||||
this.updateMissives();
|
this.updateMissives();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
|
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
const keys = Object.keys(this.missives[QuestRank.F]);
|
const keys = Object.keys(this.missives[QuestRank.F]);
|
||||||
if (keys.length >= 5) return;
|
if (keys.length >= 5) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user