From dc2e73d198bf38267a563a6e2b621860cc7a08fa Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Thu, 4 Jul 2024 16:24:36 -0700 Subject: [PATCH] fix item notifications for mags on GC --- src/ProxyCommands.cc | 4 +++- src/ReceiveSubcommands.cc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ProxyCommands.cc b/src/ProxyCommands.cc index 3f18a824..3306e954 100644 --- a/src/ProxyCommands.cc +++ b/src/ProxyCommands.cc @@ -1145,7 +1145,9 @@ static HandlerResult S_6x(shared_ptr ses, uint16_t, } else if (data[0] == 0x5F) { const auto& cmd = check_size_t(data, sizeof(G_DropItem_PC_V3_BB_6x5F)); - send_item_notification_if_needed(ses->require_server_state(), ses->client_channel, ses->config, cmd.item.item, true); + ItemData item = cmd.item.item; + item.decode_for_version(ses->version()); + send_item_notification_if_needed(ses->require_server_state(), ses->client_channel, ses->config, item, true); } else if ((data[0] == 0x60) || (static_cast(data[0]) == 0xA2)) { return SC_6x60_6xA2(ses, data); diff --git a/src/ReceiveSubcommands.cc b/src/ReceiveSubcommands.cc index 40fa78e7..24e0da90 100644 --- a/src/ReceiveSubcommands.cc +++ b/src/ReceiveSubcommands.cc @@ -1984,7 +1984,7 @@ static void on_box_or_enemy_item_drop_t(shared_ptr c, uint8_t command, u send_command_t(lc, command, flag, cmd); } } - send_item_notification_if_needed(s, lc->channel, lc->config, cmd.item.item, true); + send_item_notification_if_needed(s, lc->channel, lc->config, item, true); } }