refine meet user extension structure
This commit is contained in:
@@ -868,9 +868,12 @@ struct C_GuildCardSearch_40 {
|
||||
|
||||
template <typename CharT>
|
||||
struct SC_MeetUserExtension {
|
||||
le_uint32_t menu_id = 0;
|
||||
le_uint32_t lobby_id = 0;
|
||||
parray<uint8_t, 0x3C> unknown_a1;
|
||||
struct LobbyReference {
|
||||
le_uint32_t menu_id = 0;
|
||||
le_uint32_t item_id = 0;
|
||||
} __packed__;
|
||||
parray<LobbyReference, 8> lobby_refs;
|
||||
le_uint32_t unknown_a2 = 0;
|
||||
ptext<CharT, 0x20> player_name;
|
||||
} __packed__;
|
||||
|
||||
|
||||
@@ -185,8 +185,6 @@ static HandlerResult S_G_9A(shared_ptr<ServerState>,
|
||||
cmd.name = session.character_name;
|
||||
}
|
||||
cmd.client_config.data = session.remote_client_config_data;
|
||||
cmd.extension.menu_id = 0;
|
||||
cmd.extension.lobby_id = 0;
|
||||
|
||||
// If there's a guild card number, a shorter 9E is sent that ends
|
||||
// right after the client config data
|
||||
@@ -392,8 +390,6 @@ static HandlerResult S_V123P_02_17(
|
||||
cmd.name = session.character_name;
|
||||
}
|
||||
cmd.client_config.data = session.remote_client_config_data;
|
||||
cmd.extension.menu_id = 0;
|
||||
cmd.extension.lobby_id = 0;
|
||||
session.server_channel.send(0x9E, 0x01, &cmd, sizeof(C_Login_GC_9E));
|
||||
return HandlerResult::Type::SUPPRESS;
|
||||
|
||||
|
||||
+10
-10
@@ -401,8 +401,8 @@ static void on_8B_DCNTE(shared_ptr<ServerState> s, shared_ptr<Client> c,
|
||||
|
||||
if (cmd.is_extended) {
|
||||
const auto& ext_cmd = check_size_t<C_LoginExtended_DCNTE_8B>(data);
|
||||
if (ext_cmd.extension.menu_id == MenuID::LOBBY) {
|
||||
c->preferred_lobby_id = ext_cmd.extension.lobby_id;
|
||||
if (ext_cmd.extension.lobby_refs[0].menu_id == MenuID::LOBBY) {
|
||||
c->preferred_lobby_id = ext_cmd.extension.lobby_refs[0].item_id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -482,8 +482,8 @@ static void on_93_DC(shared_ptr<ServerState> s, shared_ptr<Client> c,
|
||||
|
||||
if (cmd.is_extended) {
|
||||
const auto& ext_cmd = check_size_t<C_LoginExtendedV1_DC_93>(data);
|
||||
if (ext_cmd.extension.menu_id == MenuID::LOBBY) {
|
||||
c->preferred_lobby_id = ext_cmd.extension.lobby_id;
|
||||
if (ext_cmd.extension.lobby_refs[0].menu_id == MenuID::LOBBY) {
|
||||
c->preferred_lobby_id = ext_cmd.extension.lobby_refs[0].item_id;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -619,13 +619,13 @@ static void on_9D_9E(shared_ptr<ServerState> s, shared_ptr<Client> c,
|
||||
if (base_cmd->is_extended) {
|
||||
if (c->version() == GameVersion::PC) {
|
||||
const auto& cmd = check_size_t<C_LoginExtended_PC_9D>(data);
|
||||
if (cmd.extension.menu_id == MenuID::LOBBY) {
|
||||
c->preferred_lobby_id = cmd.extension.lobby_id;
|
||||
if (cmd.extension.lobby_refs[0].menu_id == MenuID::LOBBY) {
|
||||
c->preferred_lobby_id = cmd.extension.lobby_refs[0].item_id;
|
||||
}
|
||||
} else {
|
||||
const auto& cmd = check_size_t<C_LoginExtended_DC_GC_9D>(data);
|
||||
if (cmd.extension.menu_id == MenuID::LOBBY) {
|
||||
c->preferred_lobby_id = cmd.extension.lobby_id;
|
||||
if (cmd.extension.lobby_refs[0].menu_id == MenuID::LOBBY) {
|
||||
c->preferred_lobby_id = cmd.extension.lobby_refs[0].item_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -650,8 +650,8 @@ static void on_9D_9E(shared_ptr<ServerState> s, shared_ptr<Client> c,
|
||||
base_cmd = &cmd;
|
||||
if (cmd.is_extended) {
|
||||
const auto& cmd = check_size_t<C_LoginExtended_GC_9E>(data);
|
||||
if (cmd.extension.menu_id == MenuID::LOBBY) {
|
||||
c->preferred_lobby_id = cmd.extension.lobby_id;
|
||||
if (cmd.extension.lobby_refs[0].menu_id == MenuID::LOBBY) {
|
||||
c->preferred_lobby_id = cmd.extension.lobby_refs[0].item_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -902,8 +902,8 @@ void send_card_search_result_t(
|
||||
result_lobby->lobby_id, encoded_server_name.c_str());
|
||||
}
|
||||
cmd.location_string = location_string;
|
||||
cmd.extension.menu_id = MenuID::LOBBY;
|
||||
cmd.extension.lobby_id = result->lobby_id;
|
||||
cmd.extension.lobby_refs[0].menu_id = MenuID::LOBBY;
|
||||
cmd.extension.lobby_refs[0].item_id = result->lobby_id;
|
||||
cmd.extension.player_name = result->game_data.player()->disp.name;
|
||||
|
||||
send_command_t(c, 0x41, 0x00, cmd);
|
||||
|
||||
Reference in New Issue
Block a user