Move inventory log calls to LogInventory

This commit is contained in:
Akkadius
2019-09-02 02:50:39 -05:00
parent 674dfc5fac
commit c8e673c6d4
6 changed files with 102 additions and 104 deletions
+5 -5
View File
@@ -943,7 +943,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a
}
Log(Logs::Moderate, Logs::Inventory, "MakeLootRequestPackets() LootRequestType %u for %s", loot_request_type, client->GetName());
LogInventory("MakeLootRequestPackets() LootRequestType [{}] for [{}]", (int) loot_request_type, client->GetName());
if (loot_request_type == LootRequestType::Forbidden) {
SendLootReqErrorPacket(client, LootResponse::NotAtThisTime);
@@ -1027,13 +1027,13 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a
if (pkitem->RecastDelay)
pkinst->SetRecastTimestamp(timestamps.count(pkitem->RecastType) ? timestamps.at(pkitem->RecastType) : 0);
Log(Logs::Detail, Logs::Inventory, "MakeLootRequestPackets() Slot %u, Item '%s'", EQEmu::invslot::CORPSE_BEGIN, pkitem->Name);
LogInventory("MakeLootRequestPackets() Slot [{}], Item [{}]", EQEmu::invslot::CORPSE_BEGIN, pkitem->Name);
client->SendItemPacket(EQEmu::invslot::CORPSE_BEGIN, pkinst, ItemPacketLoot);
safe_delete(pkinst);
}
else {
Log(Logs::General, Logs::Inventory, "MakeLootRequestPackets() PlayerKillItem %i not found", pkitemid);
LogInventory("MakeLootRequestPackets() PlayerKillItem [{}] not found", pkitemid);
client->Message(Chat::Red, "PlayerKillItem (id: %i) could not be found!", pkitemid);
}
@@ -1083,7 +1083,7 @@ void Corpse::MakeLootRequestPackets(Client* client, const EQApplicationPacket* a
if (item->RecastDelay)
inst->SetRecastTimestamp(timestamps.count(item->RecastType) ? timestamps.at(item->RecastType) : 0);
Log(Logs::Moderate, Logs::Inventory, "MakeLootRequestPackets() Slot %i, Item '%s'", loot_slot, item->Name);
LogInventory("MakeLootRequestPackets() Slot [{}], Item [{}]", loot_slot, item->Name);
client->SendItemPacket(loot_slot, inst, ItemPacketLoot);
safe_delete(inst);
@@ -1107,7 +1107,7 @@ void Corpse::LootItem(Client *client, const EQApplicationPacket *app)
auto lootitem = (LootingItem_Struct *)app->pBuffer;
Log(Logs::Moderate, Logs::Inventory, "LootItem() LootRequestType %u, Slot %u for %s", loot_request_type, lootitem->slot_id, client->GetName());
LogInventory("LootItem() LootRequestType [{}], Slot [{}] for [{}]", (int) loot_request_type, lootitem->slot_id, client->GetName());
if (loot_request_type < LootRequestType::GMAllowed) { // LootRequestType::Forbidden and LootRequestType::GMPeek
client->QueuePacket(app);