diff --git a/zone/bot.cpp b/zone/bot.cpp index 013f08a74..bde330f03 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -15456,7 +15456,7 @@ bool EntityList::Bot_AICheckCloseBeneficialSpells(Bot* caster, uint8 iChance, fl // according to Rogean, Live NPCs will just cast through walls/floors, no problem.. // // This check was put in to address an idle-mob CPU issue - _log(AI__ERROR, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!"); + logger.Log(EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!"); return(false); } diff --git a/zone/client.cpp b/zone/client.cpp index cd62b3331..abb7725ba 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -8296,11 +8296,11 @@ std::string Client::TextLink::GenerateLink() if ((m_Link.length() == 0) || (m_Link.length() > 250)) { m_Error = true; m_Link = ""; - _log(CHANNELS__ERROR, "TextLink::GenerateLink() failed to generate a useable text link (LinkType: %i, Lengths: {link: %u, body: %u, text: %u})", + logger.Log(EQEmuLogSys::Error, "TextLink::GenerateLink() failed to generate a useable text link (LinkType: %i, Lengths: {link: %u, body: %u, text: %u})", m_LinkType, m_Link.length(), m_LinkBody.length(), m_LinkText.length()); #if EQDEBUG >= 5 - _log(CHANNELS__ERROR, ">> LinkBody: %s", m_LinkBody.c_str()); - _log(CHANNELS__ERROR, ">> LinkText: %s", m_LinkText.c_str()); + logger.Log(EQEmuLogSys::Error, ">> LinkBody: %s", m_LinkBody.c_str()); + logger.Log(EQEmuLogSys::Error, ">> LinkText: %s", m_LinkText.c_str()); #endif } diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 33f597fff..c6f8fce39 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -6893,7 +6893,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app) { if ((Action != GuildBankDeposit) && (Action != GuildBankViewItem) && (Action != GuildBankWithdraw)) { - _log(GUILDS__BANK_ERROR, "Suspected hacking attempt on guild bank from %s", GetName()); + logger.Log(EQEmuLogSys::Error, "Suspected hacking attempt on guild bank from %s", GetName()); GuildBankAck(); @@ -7054,7 +7054,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app) if (!IsGuildBanker() && !GuildBanks->AllowedToWithdraw(GuildID(), gbwis->Area, gbwis->SlotID, GetName())) { - _log(GUILDS__BANK_ERROR, "Suspected attempted hack on the guild bank from %s", GetName()); + logger.Log(EQEmuLogSys::Error, "Suspected attempted hack on the guild bank from %s", GetName()); GuildBankAck(); @@ -7125,7 +7125,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app) { Message(13, "Unexpected GuildBank action."); - _log(GUILDS__BANK_ERROR, "Received unexpected guild bank action code %i from %s", Action, GetName()); + logger.Log(EQEmuLogSys::Error, "Received unexpected guild bank action code %i from %s", Action, GetName()); } } } diff --git a/zone/guild_mgr.cpp b/zone/guild_mgr.cpp index 5d42846e4..50c37aded 100644 --- a/zone/guild_mgr.cpp +++ b/zone/guild_mgr.cpp @@ -261,7 +261,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) { switch(pack->opcode) { case ServerOP_RefreshGuild: { if(pack->size != sizeof(ServerGuildRefresh_Struct)) { - _log(GUILDS__ERROR, "Received ServerOP_RefreshGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildRefresh_Struct)); + logger.Log(EQEmuLogSys::Error, "Received ServerOP_RefreshGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildRefresh_Struct)); return; } ServerGuildRefresh_Struct *s = (ServerGuildRefresh_Struct *) pack->pBuffer; @@ -295,7 +295,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) { case ServerOP_GuildCharRefresh: { if(pack->size != sizeof(ServerGuildCharRefresh_Struct)) { - _log(GUILDS__ERROR, "Received ServerOP_RefreshGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildCharRefresh_Struct)); + logger.Log(EQEmuLogSys::Error, "Received ServerOP_RefreshGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildCharRefresh_Struct)); return; } ServerGuildCharRefresh_Struct *s = (ServerGuildCharRefresh_Struct *) pack->pBuffer; @@ -338,7 +338,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) { { if(pack->size != sizeof(ServerGuildRankUpdate_Struct)) { - _log(GUILDS__ERROR, "Received ServerOP_RankUpdate of incorrect size %d, expected %d", + logger.Log(EQEmuLogSys::Error, "Received ServerOP_RankUpdate of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildRankUpdate_Struct)); return; @@ -364,7 +364,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) { case ServerOP_DeleteGuild: { if(pack->size != sizeof(ServerGuildID_Struct)) { - _log(GUILDS__ERROR, "Received ServerOP_DeleteGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildID_Struct)); + logger.Log(EQEmuLogSys::Error, "Received ServerOP_DeleteGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildID_Struct)); return; } ServerGuildID_Struct *s = (ServerGuildID_Struct *) pack->pBuffer; @@ -603,7 +603,7 @@ bool GuildBankManager::Load(uint32 guildID) "FROM `guild_bank` WHERE `guildid` = %i", guildID); auto results = database.QueryDatabase(query); if(!results.Success()) { - _log(GUILDS__BANK_ERROR, "Error Loading guild bank: %s, %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error Loading guild bank: %s, %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -684,7 +684,7 @@ void GuildBankManager::SendGuildBank(Client *c) if(Iterator == Banks.end()) { - _log(GUILDS__BANK_ERROR, "Unable to find guild bank for guild ID %i", c->GuildID()); + logger.Log(EQEmuLogSys::Error, "Unable to find guild bank for guild ID %i", c->GuildID()); return; } @@ -800,7 +800,7 @@ bool GuildBankManager::AddItem(uint32 GuildID, uint8 Area, uint32 ItemID, int32 if(Iterator == Banks.end()) { - _log(GUILDS__BANK_ERROR, "Unable to find guild bank for guild ID %i", GuildID); + logger.Log(EQEmuLogSys::Error, "Unable to find guild bank for guild ID %i", GuildID); return false; } @@ -846,7 +846,7 @@ bool GuildBankManager::AddItem(uint32 GuildID, uint8 Area, uint32 ItemID, int32 if(Slot < 0) { - _log(GUILDS__BANK_ERROR, "No space to add item to the guild bank."); + logger.Log(EQEmuLogSys::Error, "No space to add item to the guild bank."); return false; } @@ -857,7 +857,7 @@ bool GuildBankManager::AddItem(uint32 GuildID, uint8 Area, uint32 ItemID, int32 GuildID, Area, Slot, ItemID, QtyOrCharges, Donator, Permissions, WhoFor); auto results = database.QueryDatabase(query); if(!results.Success()) { - _log(GUILDS__BANK_ERROR, "Insert Error: %s : %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Insert Error: %s : %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -922,7 +922,7 @@ int GuildBankManager::Promote(uint32 guildID, int slotID) "LIMIT 1", mainSlot, guildID, slotID); auto results = database.QueryDatabase(query); if (!results.Success()) { - _log(GUILDS__BANK_ERROR, "error promoting item: %s : %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "error promoting item: %s : %s", query.c_str(), results.ErrorMessage().c_str()); return -1; } @@ -974,7 +974,7 @@ void GuildBankManager::SetPermissions(uint32 guildID, uint16 slotID, uint32 perm auto results = database.QueryDatabase(query); if(!results.Success()) { - _log(GUILDS__BANK_ERROR, "error changing permissions: %s : %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "error changing permissions: %s : %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -1124,7 +1124,7 @@ bool GuildBankManager::DeleteItem(uint32 guildID, uint16 area, uint16 slotID, ui guildID, area, slotID); auto results = database.QueryDatabase(query); if(!results.Success()) { - _log(GUILDS__BANK_ERROR, "Delete item failed. %s : %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Delete item failed. %s : %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -1136,7 +1136,7 @@ bool GuildBankManager::DeleteItem(uint32 guildID, uint16 area, uint16 slotID, ui BankArea[slotID].Quantity - quantity, guildID, area, slotID); auto results = database.QueryDatabase(query); if(!results.Success()) { - _log(GUILDS__BANK_ERROR, "Update item failed. %s : %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Update item failed. %s : %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -1299,7 +1299,7 @@ void GuildBankManager::UpdateItemQuantity(uint32 guildID, uint16 area, uint16 sl quantity, guildID, area, slotID); auto results = database.QueryDatabase(query); if(!results.Success()) { - _log(GUILDS__BANK_ERROR, "Update item quantity failed. %s : %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Update item quantity failed. %s : %s", query.c_str(), results.ErrorMessage().c_str()); return; } diff --git a/zone/inventory.cpp b/zone/inventory.cpp index 6dfaa28c2..19fca9f47 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -2594,7 +2594,7 @@ void Client::SetBandolier(const EQApplicationPacket *app) { if(MoveItemToInventory(InvItem)) database.SaveInventory(character_id, 0, WeaponSlot); else - _log(INVENTORY__BANDOLIER, "Char: %s, ERROR returning %s to inventory", GetName(), + logger.Log(EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(), InvItem->GetItem()->Name); safe_delete(InvItem); } @@ -2629,7 +2629,7 @@ void Client::SetBandolier(const EQApplicationPacket *app) { if(InvItem) { // If there was already an item in that weapon slot that we replaced, find a place to put it if(!MoveItemToInventory(InvItem)) - _log(INVENTORY__BANDOLIER, "Char: %s, ERROR returning %s to inventory", GetName(), + logger.Log(EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(), InvItem->GetItem()->Name); safe_delete(InvItem); } @@ -2646,7 +2646,7 @@ void Client::SetBandolier(const EQApplicationPacket *app) { if(MoveItemToInventory(InvItem)) database.SaveInventory(character_id, 0, WeaponSlot); else - _log(INVENTORY__BANDOLIER, "Char: %s, ERROR returning %s to inventory", GetName(), + logger.Log(EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(), InvItem->GetItem()->Name); safe_delete(InvItem); } @@ -2865,7 +2865,7 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool } if (log) { - _log(INVENTORY__ERROR, "Target interrogate inventory flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE")); + logger.Log(EQEmuLogSys::Error, "Target interrogate inventory flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE")); logger.LogDebug(EQEmuLogSys::Detail, "[CLIENT] Client::InterrogateInventory() -- End"); } if (!silent) { @@ -2910,7 +2910,7 @@ void Client::InterrogateInventory_(bool errorcheck, Client* requester, int16 hea else { e = ""; } if (log) - _log(INVENTORY__ERROR, "Head: %i, Depth: %i, Instance: %s, Parent: %s%s", + logger.Log(EQEmuLogSys::Error, "Head: %i, Depth: %i, Instance: %s, Parent: %s%s", head, depth, i.c_str(), p.c_str(), e.c_str()); if (!silent) requester->Message(1, "%i:%i - inst: %s - parent: %s%s", diff --git a/zone/merc.cpp b/zone/merc.cpp index 0d9a225f2..f482ab71a 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -1873,7 +1873,7 @@ bool EntityList::Merc_AICheckCloseBeneficialSpells(Merc* caster, uint8 iChance, // according to Rogean, Live NPCs will just cast through walls/floors, no problem.. // // This check was put in to address an idle-mob CPU issue - _log(AI__ERROR, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!"); + logger.Log(EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!"); return(false); } diff --git a/zone/mob_ai.cpp b/zone/mob_ai.cpp index 5802bfd93..e359194b5 100644 --- a/zone/mob_ai.cpp +++ b/zone/mob_ai.cpp @@ -355,7 +355,7 @@ bool EntityList::AICheckCloseBeneficialSpells(NPC* caster, uint8 iChance, float // according to Rogean, Live NPCs will just cast through walls/floors, no problem.. // // This check was put in to address an idle-mob CPU issue - _log(AI__ERROR, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!"); + logger.Log(EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!"); return(false); } diff --git a/zone/net.cpp b/zone/net.cpp index c339e393f..a26a7c1fa 100644 --- a/zone/net.cpp +++ b/zone/net.cpp @@ -150,7 +150,7 @@ int main(int argc, char** argv) { _log(ZONE__INIT, "Loading server configuration.."); if (!ZoneConfig::LoadConfig()) { - _log(ZONE__INIT_ERR, "Loading server configuration failed."); + logger.Log(EQEmuLogSys::Error, "Loading server configuration failed."); return 1; } const ZoneConfig *Config=ZoneConfig::get(); @@ -169,7 +169,7 @@ int main(int argc, char** argv) { Config->DatabasePassword.c_str(), Config->DatabaseDB.c_str(), Config->DatabasePort)) { - _log(ZONE__INIT_ERR, "Cannot continue without a database connection."); + logger.Log(EQEmuLogSys::Error, "Cannot continue without a database connection."); return 1; } guild_mgr.SetDatabase(&database); @@ -192,16 +192,16 @@ int main(int argc, char** argv) { * Setup nice signal handlers */ if (signal(SIGINT, CatchSignal) == SIG_ERR) { - _log(ZONE__INIT_ERR, "Could not set signal handler"); + logger.Log(EQEmuLogSys::Error, "Could not set signal handler"); return 1; } if (signal(SIGTERM, CatchSignal) == SIG_ERR) { - _log(ZONE__INIT_ERR, "Could not set signal handler"); + logger.Log(EQEmuLogSys::Error, "Could not set signal handler"); return 1; } #ifndef WIN32 if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) { - _log(ZONE__INIT_ERR, "Could not set signal handler"); + logger.Log(EQEmuLogSys::Error, "Could not set signal handler"); return 1; } #endif @@ -220,25 +220,25 @@ int main(int argc, char** argv) { database.LoadZoneNames(); _log(ZONE__INIT, "Loading items"); if (!database.LoadItems()) { - _log(ZONE__INIT_ERR, "Loading items FAILED!"); - _log(ZONE__INIT, "Failed. But ignoring error and going on..."); + logger.Log(EQEmuLogSys::Error, "Loading items FAILED!"); + logger.Log(EQEmuLogSys::Error, "Failed. But ignoring error and going on..."); } _log(ZONE__INIT, "Loading npc faction lists"); if (!database.LoadNPCFactionLists()) { - _log(ZONE__INIT_ERR, "Loading npcs faction lists FAILED!"); + logger.Log(EQEmuLogSys::Error, "Loading npcs faction lists FAILED!"); CheckEQEMuErrorAndPause(); return 1; } _log(ZONE__INIT, "Loading loot tables"); if (!database.LoadLoot()) { - _log(ZONE__INIT_ERR, "Loading loot FAILED!"); + logger.Log(EQEmuLogSys::Error, "Loading loot FAILED!"); CheckEQEMuErrorAndPause(); return 1; } _log(ZONE__INIT, "Loading skill caps"); if (!database.LoadSkillCaps()) { - _log(ZONE__INIT_ERR, "Loading skill caps FAILED!"); + logger.Log(EQEmuLogSys::Error, "Loading skill caps FAILED!"); CheckEQEMuErrorAndPause(); return 1; } @@ -249,7 +249,7 @@ int main(int argc, char** argv) { _log(ZONE__INIT, "Loading base data"); if (!database.LoadBaseData()) { - _log(ZONE__INIT_ERR, "Loading base data FAILED!"); + logger.Log(EQEmuLogSys::Error, "Loading base data FAILED!"); CheckEQEMuErrorAndPause(); return 1; } @@ -269,7 +269,7 @@ int main(int argc, char** argv) { _log(ZONE__INIT, "Loading commands"); int retval=command_init(); if(retval<0) - _log(ZONE__INIT_ERR, "Command loading FAILED"); + logger.Log(EQEmuLogSys::Error, "Command loading FAILED"); else _log(ZONE__INIT, "%d commands loaded", retval); @@ -279,7 +279,7 @@ int main(int argc, char** argv) { if (database.GetVariable("RuleSet", tmp, sizeof(tmp)-1)) { _log(ZONE__INIT, "Loading rule set '%s'", tmp); if(!RuleManager::Instance()->LoadRules(&database, tmp)) { - _log(ZONE__INIT_ERR, "Failed to load ruleset '%s', falling back to defaults.", tmp); + logger.Log(EQEmuLogSys::Error, "Failed to load ruleset '%s', falling back to defaults.", tmp); } } else { if(!RuleManager::Instance()->LoadRules(&database, "default")) { @@ -318,7 +318,7 @@ int main(int argc, char** argv) { LogFile->SetAllCallbacks(ClientLogs::EQEmuIO_pva); #endif if (!worldserver.Connect()) { - _log(ZONE__INIT_ERR, "worldserver.Connect() FAILED!"); + logger.Log(EQEmuLogSys::Error, "worldserver.Connect() FAILED!"); } Timer InterserverTimer(INTERSERVER_TIMER); // does MySQL pings and auto-reconnect @@ -331,7 +331,7 @@ int main(int argc, char** argv) { if (!strlen(zone_name) || !strcmp(zone_name,".")) { _log(ZONE__INIT, "Entering sleep mode"); } else if (!Zone::Bootup(database.GetZoneID(zone_name), 0, true)) { //todo: go above and fix this to allow cmd line instance - _log(ZONE__INIT_ERR, "Zone bootup FAILED!"); + logger.Log(EQEmuLogSys::Error, "Zone bootup FAILED!"); zone = 0; } @@ -368,7 +368,7 @@ int main(int argc, char** argv) { // log_sys.StartZoneLogs(StringFormat("%s_ver-%u_instid-%u_port-%u", zone->GetShortName(), zone->GetInstanceVersion(), zone->GetInstanceID(), ZoneConfig::get()->ZonePort)); if (!eqsf.Open(Config->ZonePort)) { - _log(ZONE__INIT_ERR, "Failed to open port %d",Config->ZonePort); + logger.Log(EQEmuLogSys::Error, "Failed to open port %d",Config->ZonePort); ZoneConfig::SetZonePort(0); worldserver.Disconnect(); worldwasconnected = false; diff --git a/zone/spawngroup.cpp b/zone/spawngroup.cpp index d6745ed6b..bc1e21451 100644 --- a/zone/spawngroup.cpp +++ b/zone/spawngroup.cpp @@ -149,7 +149,6 @@ bool ZoneDatabase::LoadSpawnGroups(const char* zone_name, uint16 version, SpawnG "AND spawn2.version = %u and zone = '%s'", version, zone_name); auto results = QueryDatabase(query); if (!results.Success()) { - _log(ZONE__SPAWNS, "Error2 in PopulateZoneLists query '%s' ", query.c_str()); return false; } @@ -168,7 +167,7 @@ bool ZoneDatabase::LoadSpawnGroups(const char* zone_name, uint16 version, SpawnG "AND zone = '%s'", zone_name); results = QueryDatabase(query); if (!results.Success()) { - _log(ZONE__SPAWNS, "Error2 in PopulateZoneLists query '%'", query.c_str()); + logger.Log(EQEmuLogSys::Error, "Error2 in PopulateZoneLists query '%'", query.c_str()); return false; } @@ -177,7 +176,6 @@ bool ZoneDatabase::LoadSpawnGroups(const char* zone_name, uint16 version, SpawnG SpawnGroup *sg = spawn_group_list->GetSpawnGroup(atoi(row[0])); if (!sg) { - _log(ZONE__SPAWNS, "Error in LoadSpawnGroups %s ", query.c_str()); continue; } @@ -197,7 +195,7 @@ bool ZoneDatabase::LoadSpawnGroupsByID(int spawngroupid, SpawnGroupList* spawn_g "FROM spawngroup WHERE spawngroup.ID = '%i'", spawngroupid); auto results = QueryDatabase(query); if (!results.Success()) { - _log(ZONE__SPAWNS, "Error2 in PopulateZoneLists query %s", query.c_str()); + logger.Log(EQEmuLogSys::Error, "Error2 in PopulateZoneLists query %s", query.c_str()); return false; } @@ -212,7 +210,7 @@ bool ZoneDatabase::LoadSpawnGroupsByID(int spawngroupid, SpawnGroupList* spawn_g "ORDER BY chance", spawngroupid); results = QueryDatabase(query); if (!results.Success()) { - _log(ZONE__SPAWNS, "Error3 in PopulateZoneLists query '%s'", query.c_str()); + logger.Log(EQEmuLogSys::Error, "Error3 in PopulateZoneLists query '%s'", query.c_str()); return false; } @@ -220,7 +218,6 @@ bool ZoneDatabase::LoadSpawnGroupsByID(int spawngroupid, SpawnGroupList* spawn_g SpawnEntry* newSpawnEntry = new SpawnEntry( atoi(row[1]), atoi(row[2]), row[3]?atoi(row[3]):0); SpawnGroup *sg = spawn_group_list->GetSpawnGroup(atoi(row[0])); if (!sg) { - _log(ZONE__SPAWNS, "Error in SpawngroupID: %s ", row[0]); continue; } diff --git a/zone/trading.cpp b/zone/trading.cpp index eb8399ac8..41f9047e2 100644 --- a/zone/trading.cpp +++ b/zone/trading.cpp @@ -2515,7 +2515,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) { Quantity = i; break; } - _log(TRADING__BARTER, "Unexpected error while moving item from seller to buyer."); + logger.Log(EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer."); Message(13, "Internal error while processing transaction."); return; } @@ -2523,7 +2523,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) { ItemInst* ItemToTransfer = m_inv.PopItem(SellerSlot); if(!ItemToTransfer || !Buyer->MoveItemToInventory(ItemToTransfer, true)) { - _log(TRADING__BARTER, "Unexpected error while moving item from seller to buyer."); + logger.Log(EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer."); Message(13, "Internal error while processing transaction."); if(ItemToTransfer) @@ -2561,7 +2561,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) { int16 SellerSlot = m_inv.HasItem(ItemID, 1, invWhereWorn|invWherePersonal|invWhereCursor); if (SellerSlot == INVALID_INDEX) { - _log(TRADING__BARTER, "Unexpected error while moving item from seller to buyer."); + logger.Log(EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer."); Message(13, "Internal error while processing transaction."); return; } @@ -2569,7 +2569,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) { ItemInst* ItemToTransfer = m_inv.PopItem(SellerSlot); if(!ItemToTransfer) { - _log(TRADING__BARTER, "Unexpected error while moving item from seller to buyer."); + logger.Log(EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer."); Message(13, "Internal error while processing transaction."); return; } @@ -2581,7 +2581,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) { QuantityMoved += ItemToTransfer->GetCharges(); if(!Buyer->MoveItemToInventory(ItemToTransfer, true)) { - _log(TRADING__BARTER, "Unexpected error while moving item from seller to buyer."); + logger.Log(EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer."); Message(13, "Internal error while processing transaction."); safe_delete(ItemToTransfer); return; @@ -2616,7 +2616,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) { ItemToTransfer->SetCharges(QuantityToRemoveFromStack); if(!Buyer->MoveItemToInventory(ItemToTransfer, true)) { - _log(TRADING__BARTER, "Unexpected error while moving item from seller to buyer."); + logger.Log(EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer."); Message(13, "Internal error while processing transaction."); safe_delete(ItemToTransfer); return; diff --git a/zone/worldserver.cpp b/zone/worldserver.cpp index 41220437a..f8d4ff63e 100644 --- a/zone/worldserver.cpp +++ b/zone/worldserver.cpp @@ -394,7 +394,7 @@ void WorldServer::Process() { } } else - _log(ZONE__WORLD_ERR, "WhoAllReturnStruct: Could not get return struct!"); + logger.Log(EQEmuLogSys::Error, "WhoAllReturnStruct: Could not get return struct!"); break; } case ServerOP_EmoteMessage: { @@ -2064,7 +2064,7 @@ uint32 WorldServer::NextGroupID() { if(cur_groupid >= last_groupid) { //this is an error... This means that 50 groups were created before //1 packet could make the zone->world->zone trip... so let it error. - _log(ZONE__WORLD_ERR, "Ran out of group IDs before the server sent us more."); + logger.Log(EQEmuLogSys::Error, "Ran out of group IDs before the server sent us more."); return(0); } if(cur_groupid > (last_groupid - /*50*/995)) {