add $si command

This commit is contained in:
Martin Michelsen
2023-12-23 10:23:40 -08:00
parent cf7c4674d6
commit 3823fc94f1
12 changed files with 89 additions and 8 deletions
+12 -6
View File
@@ -2959,12 +2959,18 @@ static void on_quest_F960_result_bb(shared_ptr<Client> c, uint8_t, uint8_t, void
G_SetMesetaSlotPrizeResult_BB_6xE3 cmd_6xE3 = {{0xE3, sizeof(G_SetMesetaSlotPrizeResult_BB_6xE3) >> 2, 0x0000}, item};
send_command_t(c, 0x60, 0x00, cmd_6xE3);
p->add_item(item);
send_create_inventory_item_to_lobby(c, c->lobby_client_id, item);
if (c->log.should_log(LogLevel::INFO)) {
string name = s->item_name_index->describe_item(c->version(), item);
c->log.info("Awarded item %s", name.c_str());
try {
p->add_item(item);
send_create_inventory_item_to_lobby(c, c->lobby_client_id, item);
if (c->log.should_log(LogLevel::INFO)) {
string name = s->item_name_index->describe_item(c->version(), item);
c->log.info("Awarded item %s", name.c_str());
}
} catch (const out_of_range&) {
if (c->log.should_log(LogLevel::INFO)) {
string name = s->item_name_index->describe_item(c->version(), item);
c->log.info("Attempted to award item %s, but inventory was full", name.c_str());
}
}
}
}