make logging less verbose
This commit is contained in:
+8
-8
@@ -1046,30 +1046,30 @@ void Client::use_character_bank(ssize_t index) {
|
||||
}
|
||||
}
|
||||
|
||||
void Client::print_inventory(FILE* stream) const {
|
||||
void Client::print_inventory() const {
|
||||
auto s = this->require_server_state();
|
||||
auto p = this->character();
|
||||
phosg::fwrite_fmt(stream, "[PlayerInventory] Meseta: {}\n", p->disp.stats.meseta);
|
||||
phosg::fwrite_fmt(stream, "[PlayerInventory] {} items\n", p->inventory.num_items);
|
||||
this->log.info_f("[PlayerInventory] Meseta: {}\n", p->disp.stats.meseta);
|
||||
this->log.info_f("[PlayerInventory] {} items\n", p->inventory.num_items);
|
||||
for (size_t x = 0; x < p->inventory.num_items; x++) {
|
||||
const auto& item = p->inventory.items[x];
|
||||
auto hex = item.data.hex();
|
||||
auto name = s->describe_item(this->version(), item.data, false);
|
||||
phosg::fwrite_fmt(stream, "[PlayerInventory] {:2}: [+{:08X}] {} ({})\n", x, item.flags, hex, name);
|
||||
this->log.info_f("[PlayerInventory] {:2}: [+{:08X}] {} ({})\n", x, item.flags, hex, name);
|
||||
}
|
||||
}
|
||||
|
||||
void Client::print_bank(FILE* stream) const {
|
||||
void Client::print_bank() const {
|
||||
auto s = this->require_server_state();
|
||||
auto bank = this->current_bank();
|
||||
phosg::fwrite_fmt(stream, "[PlayerBank] Meseta: {}\n", bank.meseta);
|
||||
phosg::fwrite_fmt(stream, "[PlayerBank] {} items\n", bank.num_items);
|
||||
this->log.info_f("[PlayerBank] Meseta: {}\n", bank.meseta);
|
||||
this->log.info_f("[PlayerBank] {} items\n", bank.num_items);
|
||||
for (size_t x = 0; x < bank.num_items; x++) {
|
||||
const auto& item = bank.items[x];
|
||||
const char* present_token = item.present ? "" : " (missing present flag)";
|
||||
auto hex = item.data.hex();
|
||||
auto name = s->describe_item(this->version(), item.data, false);
|
||||
phosg::fwrite_fmt(stream, "[PlayerBank] {:3}: {} ({}) (x{}){}\n", x, hex, name, item.amount, present_token);
|
||||
this->log.info_f("[PlayerBank] {:3}: {} ({}) (x{}){}\n", x, hex, name, item.amount, present_token);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user