From 77d31cd3b592c106fadfb6dc0becde5cc6053a20 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Sat, 6 Jun 2026 18:06:40 -0700 Subject: [PATCH] add more logs to 6xE0 handler --- src/ReceiveSubcommands.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ReceiveSubcommands.cc b/src/ReceiveSubcommands.cc index 5861e3f3..54b480a7 100644 --- a/src/ReceiveSubcommands.cc +++ b/src/ReceiveSubcommands.cc @@ -5197,12 +5197,16 @@ static void on_quest_F95E_result_bb(std::shared_ptr c, SubcommandMessage auto s = c->require_server_state(); size_t count = (cmd.type > 0x03) ? 1 : (static_cast(l->difficulty) + 1); + c->log.info_f("Creating {} F95E result items", count); for (size_t z = 0; z < count; z++) { const auto& results = s->quest_F95E_results.at(cmd.type).at(static_cast(l->difficulty)); if (results.empty()) { throw std::runtime_error("invalid result type"); } ItemData item = (results.size() == 1) ? results[0] : results[l->rand_crypt->next() % results.size()]; + if (c->log.should_log(phosg::LogLevel::L_INFO)) { + c->log.info_f("Chose F95E result item {}", item.hex()); + } if (item.data1[0] == 0x04) { // Meseta // TODO: What is the right amount of Meseta to use here? Presumably it should be random within a certain range, // but it's not obvious what that range should be. @@ -5216,6 +5220,10 @@ static void on_quest_F95E_result_bb(std::shared_ptr c, SubcommandMessage item.id = l->generate_item_id(0xFF); l->add_item(cmd.floor, item, cmd.pos, nullptr, nullptr, 0x100F); + if (c->log.should_log(phosg::LogLevel::L_INFO)) { + c->log.info_f("Item created as {}", item.hex()); + } + send_drop_stacked_item_to_lobby(l, item, cmd.floor, cmd.pos); } }