implement Episode 3 download quest categories

This commit is contained in:
Martin Michelsen
2023-10-08 14:19:31 -07:00
parent 948985b057
commit ea7f655408
26 changed files with 28 additions and 18 deletions
+18 -9
View File
@@ -1719,21 +1719,30 @@ static void on_10(shared_ptr<Client> c, uint16_t, uint32_t, const string& data)
// always the download quest menu. (Episode 3 does actually have
// online quests, but they're served via a server data request
// instead of the file download paradigm that other versions use.)
vector<shared_ptr<const Quest>> quests;
uint32_t ep3_category_id = 0;
size_t num_ep3_categories = 0;
for (const auto& category : s->quest_category_index->categories) {
if (category.flags & QuestCategoryIndex::Category::Flag::EP3_DOWNLOAD) {
quests = s->quest_index->filter(category.category_id, c->quest_version());
break;
ep3_category_id = category.category_id;
num_ep3_categories++;
}
}
send_quest_menu(c, MenuID::QUEST, quests, true);
} else {
uint8_t flags = QuestCategoryIndex::Category::Flag::DOWNLOAD;
if (c->version() == GameVersion::DC || c->version() == GameVersion::PC) {
flags |= QuestCategoryIndex::Category::Flag::HIDE_ON_PRE_V3;
if (num_ep3_categories == 1) {
auto quests = s->quest_index->filter(ep3_category_id, c->quest_version());
send_quest_menu(c, MenuID::QUEST, quests, true);
break;
}
send_quest_menu(c, MenuID::QUEST_FILTER, s->quest_category_index, flags);
}
// Not Episode 3, or there are multiple Episode 3 download categories;
// send the categories menu instead
uint8_t flags = (c->flags & Client::Flag::IS_EPISODE_3)
? QuestCategoryIndex::Category::Flag::EP3_DOWNLOAD
: QuestCategoryIndex::Category::Flag::DOWNLOAD;
if (c->version() == GameVersion::DC || c->version() == GameVersion::PC) {
flags |= QuestCategoryIndex::Category::Flag::HIDE_ON_PRE_V3;
}
send_quest_menu(c, MenuID::QUEST_FILTER, s->quest_category_index, flags);
break;
}
+2 -1
View File
@@ -482,7 +482,8 @@
[0x10, "q", "gv2", "The Military's Hero", "$E$CG-Heathcliff Flowen-\n$C6Quests that follow\nthe Episode 2\nstoryline"],
[0x10, "q", "gv4", "The Meteor Impact Incident", "$E$C6Quests that follow\nthe Episode 4\nstoryline"],
[0x20, "q", "dl", "Download", "$E$C6Quests to download\nto your Memory Card"],
[0x40, "e", "", "Download", "$E$C6Quests to download\nto your Memory Card"],
[0x40, "e", "dlt", "Trial Download", "$E$C6Quests to download\nto your Memory Card\nfrom Episode 3\nTrial Edition"],
[0x40, "e", "dl", "Download", "$E$C6Quests to download\nto your Memory Card"],
],
// Cheat mode behavior. There are three values:
+1
View File
@@ -0,0 +1 @@
../../quests/e765-dlt-gc3.mnm
-1
View File
@@ -1 +0,0 @@
../../quests/e765-gc3.mnmd
+1
View File
@@ -0,0 +1 @@
../../quests/e901-dl-gc3.mnm
-1
View File
@@ -1 +0,0 @@
../../quests/e901-gc3.mnm
+1
View File
@@ -0,0 +1 @@
../../quests/e903-dl-gc3.mnm
-1
View File
@@ -1 +0,0 @@
../../quests/e903-gc3.mnm
+1
View File
@@ -0,0 +1 @@
../../quests/e904-dl-gc3.mnm
-1
View File
@@ -1 +0,0 @@
../../quests/e904-gc3.mnm
+1
View File
@@ -0,0 +1 @@
../../quests/e905-dl-gc3.mnm
-1
View File
@@ -1 +0,0 @@
../../quests/e905-gc3.mnm
+1
View File
@@ -0,0 +1 @@
../../quests/e906-dl-gc3.mnm
-1
View File
@@ -1 +0,0 @@
../../quests/e906-gc3.mnm
+1
View File
@@ -0,0 +1 @@
../../quests/e907-dl-gc3.mnm
-1
View File
@@ -1 +0,0 @@
../../quests/e907-gc3.mnm
+1
View File
@@ -0,0 +1 @@
../../quests/e908-dl-gc3.mnm
-1
View File
@@ -1 +0,0 @@
../../quests/e908-gc3.mnm