From af1b92969eaf54c66447158a70199f715cfb89a4 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Wed, 1 Jun 2022 22:22:29 -0700 Subject: [PATCH] don't use information menu command on GC --- src/ReceiveCommands.cc | 19 +++++++++---------- src/SendCommands.hh | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/ReceiveCommands.cc b/src/ReceiveCommands.cc index fdf722f3..ad343bc2 100644 --- a/src/ReceiveCommands.cc +++ b/src/ReceiveCommands.cc @@ -113,7 +113,7 @@ void process_login_complete(shared_ptr s, shared_ptr c) { (c->flags & Client::Flag::NO_MESSAGE_BOX_CLOSE_CONFIRMATION) || !(c->flags & Client::Flag::AT_WELCOME_MESSAGE)) { c->flags &= ~Client::Flag::AT_WELCOME_MESSAGE; - send_menu(c, s->name.c_str(), MenuID::MAIN, s->main_menu, false); + send_menu(c, s->name.c_str(), MenuID::MAIN, s->main_menu); } else { send_message_box(c, s->welcome_message.c_str()); } @@ -556,9 +556,9 @@ void process_message_box_closed(shared_ptr s, shared_ptr c, check_size_v(data.size(), 0); if (c->flags & Client::Flag::IN_INFORMATION_MENU) { send_menu(c, u"Information", MenuID::INFORMATION, - *s->information_menu_for_version(c->version), false); + *s->information_menu_for_version(c->version)); } else if (c->flags & Client::Flag::AT_WELCOME_MESSAGE) { - send_menu(c, s->name.c_str(), MenuID::MAIN, s->main_menu, false); + send_menu(c, s->name.c_str(), MenuID::MAIN, s->main_menu); c->flags &= ~Client::Flag::AT_WELCOME_MESSAGE; send_update_client_config(c); } @@ -743,13 +743,13 @@ void process_menu_selection(shared_ptr s, shared_ptr c, case MainMenuItemID::INFORMATION: send_menu(c, u"Information", MenuID::INFORMATION, - *s->information_menu_for_version(c->version), true); + *s->information_menu_for_version(c->version)); c->flags |= Client::Flag::IN_INFORMATION_MENU; break; case MainMenuItemID::PROXY_DESTINATIONS: send_menu(c, u"Proxy server", MenuID::PROXY_DESTINATIONS, - s->proxy_destinations_menu_for_version(c->version), false); + s->proxy_destinations_menu_for_version(c->version)); break; case MainMenuItemID::DOWNLOAD_QUESTS: @@ -776,8 +776,7 @@ void process_menu_selection(shared_ptr s, shared_ptr c, break; case MainMenuItemID::PROGRAMS: - send_menu(c, u"Programs", MenuID::PROGRAMS, - s->dol_file_index->menu(), false); + send_menu(c, u"Programs", MenuID::PROGRAMS, s->dol_file_index->menu()); break; case MainMenuItemID::DISCONNECT: @@ -794,7 +793,7 @@ void process_menu_selection(shared_ptr s, shared_ptr c, case MenuID::INFORMATION: { if (cmd.item_id == InformationMenuItemID::GO_BACK) { c->flags &= ~Client::Flag::IN_INFORMATION_MENU; - send_menu(c, s->name.c_str(), MenuID::MAIN, s->main_menu, false); + send_menu(c, s->name.c_str(), MenuID::MAIN, s->main_menu); } else { try { @@ -808,7 +807,7 @@ void process_menu_selection(shared_ptr s, shared_ptr c, case MenuID::PROXY_DESTINATIONS: { if (cmd.item_id == ProxyDestinationsMenuItemID::GO_BACK) { - send_menu(c, s->name.c_str(), MenuID::MAIN, s->main_menu, false); + send_menu(c, s->name.c_str(), MenuID::MAIN, s->main_menu); } else { const pair* dest = nullptr; @@ -1028,7 +1027,7 @@ void process_menu_selection(shared_ptr s, shared_ptr c, case MenuID::PROGRAMS: if (cmd.item_id == ProgramsMenuItemID::GO_BACK) { - send_menu(c, s->name.c_str(), MenuID::MAIN, s->main_menu, false); + send_menu(c, s->name.c_str(), MenuID::MAIN, s->main_menu); } else { if (c->flags & Client::Flag::DOES_NOT_SUPPORT_SEND_FUNCTION_CALL) { diff --git a/src/SendCommands.hh b/src/SendCommands.hh index 2421886d..3dc3bab4 100644 --- a/src/SendCommands.hh +++ b/src/SendCommands.hh @@ -166,7 +166,7 @@ void send_card_search_result( void send_guild_card(std::shared_ptr c, std::shared_ptr source); void send_menu(std::shared_ptr c, const std::u16string& menu_name, - uint32_t menu_id, const std::vector& items, bool is_info_menu); + uint32_t menu_id, const std::vector& items, bool is_info_menu = false); void send_game_menu(std::shared_ptr c, std::shared_ptr s); void send_quest_menu(std::shared_ptr c, uint32_t menu_id, const std::vector>& quests, bool is_download_menu);