mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
[Performance] Reworked how all log calls are made in the source, see changelog.txt for more details
This commit is contained in:
@@ -49,11 +49,11 @@ bool BotDatabase::Connect(const char* host, const char* user, const char* passwd
|
||||
uint32 errnum = 0;
|
||||
char errbuf[MYSQL_ERRMSG_SIZE];
|
||||
if (!Open(host, user, passwd, database, port, &errnum, errbuf)) {
|
||||
Log.Out(Logs::General, Logs::Error, "Failed to connect to bot database: Error: %s", errbuf);
|
||||
Log(Logs::General, Logs::Error, "Failed to connect to bot database: Error: %s", errbuf);
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
Log.Out(Logs::General, Logs::Status, "Using bot database '%s' at %s:%d", database, host, port);
|
||||
Log(Logs::General, Logs::Status, "Using bot database '%s' at %s:%d", database, host, port);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1143,7 +1143,7 @@ bool BotDatabase::LoadItems(const uint32 bot_id, EQEmu::InventoryProfile& invent
|
||||
(uint32)atoul(row[14])
|
||||
);
|
||||
if (!item_inst) {
|
||||
Log.Out(Logs::General, Logs::Error, "Warning: bot_id '%i' has an invalid item_id '%i' in inventory slot '%i'", bot_id, item_id, slot_id);
|
||||
Log(Logs::General, Logs::Error, "Warning: bot_id '%i' has an invalid item_id '%i' in inventory slot '%i'", bot_id, item_id, slot_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1196,7 +1196,7 @@ bool BotDatabase::LoadItems(const uint32 bot_id, EQEmu::InventoryProfile& invent
|
||||
item_inst->SetOrnamentHeroModel((uint32)atoul(row[8]));
|
||||
|
||||
if (inventory_inst.PutItem(slot_id, *item_inst) == INVALID_INDEX)
|
||||
Log.Out(Logs::General, Logs::Error, "Warning: Invalid slot_id for item in inventory: bot_id = '%i', item_id = '%i', slot_id = '%i'", bot_id, item_id, slot_id);
|
||||
Log(Logs::General, Logs::Error, "Warning: Invalid slot_id for item in inventory: bot_id = '%i', item_id = '%i', slot_id = '%i'", bot_id, item_id, slot_id);
|
||||
|
||||
safe_delete(item_inst);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user