diff --git a/src/CommandFormats.hh b/src/CommandFormats.hh index cb7657f7..d901b69d 100644 --- a/src/CommandFormats.hh +++ b/src/CommandFormats.hh @@ -5253,7 +5253,7 @@ struct G_EnemyKilled_BB_6xC8 { struct G_MesetaRewardRequest_BB_6xC9 { G_UnusedHeader header; - le_uint32_t amount; + le_int32_t amount; } __packed__; // 6xCA: Item reward from quest (BB; handled by server) diff --git a/src/ReceiveSubcommands.cc b/src/ReceiveSubcommands.cc index 4db01182..4e501ea9 100644 --- a/src/ReceiveSubcommands.cc +++ b/src/ReceiveSubcommands.cc @@ -1509,7 +1509,7 @@ void on_meseta_reward_request_bb(shared_ptr, auto p = c->game_data.player(); if (cmd.amount < 0) { - if (-cmd.amount > p->disp.meseta) { + if (-cmd.amount > static_cast(p->disp.meseta.load())) { p->disp.meseta = 0; } else { p->disp.meseta += cmd.amount; @@ -1517,7 +1517,7 @@ void on_meseta_reward_request_bb(shared_ptr, } else { PlayerInventoryItem item; item.data.data1[0] = 0x04; - item.data.data2d = cmd.amount; + item.data.data2d = cmd.amount.load(); item.data.id = l->generate_item_id(0xFF); c->game_data.player()->add_item(item); send_create_inventory_item(l, c, item.data);