From 7c007d1b1e6866e3c38819c2832c1af4e9cc96a6 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 13 Jun 2026 10:18:19 -0700 Subject: [PATCH] fix payment item handling in 6xDA --- src/ReceiveSubcommands.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ReceiveSubcommands.cc b/src/ReceiveSubcommands.cc index 54b480a7..0665e148 100644 --- a/src/ReceiveSubcommands.cc +++ b/src/ReceiveSubcommands.cc @@ -5479,8 +5479,9 @@ static void on_upgrade_weapon_attribute_bb(std::shared_ptr c, Subcommand throw std::runtime_error("bonus value exceeds 100"); } - p->remove_item(payment_item.id, cmd.payment_count, *s->item_stack_limits(c->version())); - send_destroy_item_to_lobby(c, payment_item.id, cmd.payment_count); + auto removed_payment_item = p->remove_item( + payment_item.id, cmd.payment_count, *s->item_stack_limits(c->version())); + send_destroy_item_to_lobby(c, removed_payment_item.id, cmd.payment_count); item.data1[attribute_index] = cmd.attribute; item.data1[attribute_index + 1] = new_attr_value;