add more logs to 6xE0 handler

This commit is contained in:
Martin Michelsen
2026-06-06 18:06:40 -07:00
parent 5f7032f920
commit 77d31cd3b5
+8
View File
@@ -5197,12 +5197,16 @@ static void on_quest_F95E_result_bb(std::shared_ptr<Client> c, SubcommandMessage
auto s = c->require_server_state();
size_t count = (cmd.type > 0x03) ? 1 : (static_cast<size_t>(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<size_t>(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<Client> 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);
}
}