diff --git a/src/ReceiveSubcommands.cc b/src/ReceiveSubcommands.cc index 88896506..730d90fd 100644 --- a/src/ReceiveSubcommands.cc +++ b/src/ReceiveSubcommands.cc @@ -1155,9 +1155,11 @@ static void on_equip_item(shared_ptr c, uint8_t command, uint8_t flag, c auto l = c->require_lobby(); if (l->check_flag(Lobby::Flag::ITEM_TRACKING_ENABLED)) { - EquipSlot slot = static_cast(cmd.equip_slot.load()); - auto p = c->game_data.character(); - p->inventory.equip_item(cmd.item_id, slot); + if (l->base_version == GameVersion::BB) { + EquipSlot slot = static_cast(cmd.equip_slot.load()); + auto p = c->game_data.character(); + p->inventory.equip_item(cmd.item_id, slot); + } } else if (l->base_version == GameVersion::BB) { throw logic_error("item tracking not enabled in BB game"); } @@ -1174,8 +1176,10 @@ static void on_unequip_item(shared_ptr c, uint8_t command, uint8_t flag, auto l = c->require_lobby(); if (l->check_flag(Lobby::Flag::ITEM_TRACKING_ENABLED)) { - auto p = c->game_data.character(); - p->inventory.unequip_item(cmd.item_id); + if (l->base_version == GameVersion::BB) { + auto p = c->game_data.character(); + p->inventory.unequip_item(cmd.item_id); + } } else if (l->base_version == GameVersion::BB) { throw logic_error("item tracking not enabled in BB game"); }