diff --git a/zone/aa.cpp b/zone/aa.cpp index b3f626b93..6ee33ee1c 100644 --- a/zone/aa.cpp +++ b/zone/aa.cpp @@ -445,7 +445,7 @@ void Client::HandleAAAction(aaID activate) { break; default: - logger.Log(EQEmuLogSys::Error,"Unknown AA nonspell action type %d", caa->action); + logger.Log(EQEmuLogSys::Error, "Unknown AA nonspell action type %d", caa->action); return; } @@ -501,7 +501,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u PetRecord record; if(!database.GetPetEntry(spells[spell_id].teleport_zone, &record)) { - logger.Log(EQEmuLogSys::Error,"Unknown swarm pet spell id: %d, check pets table", spell_id); + logger.Log(EQEmuLogSys::Error, "Unknown swarm pet spell id: %d, check pets table", spell_id); Message(13, "Unable to find data for pet %s", spells[spell_id].teleport_zone); return; } @@ -528,7 +528,7 @@ void Mob::TemporaryPets(uint16 spell_id, Mob *targ, const char *name_override, u const NPCType *npc_type = database.GetNPCType(pet.npc_id); if(npc_type == nullptr) { //log write - logger.Log(EQEmuLogSys::Error,"Unknown npc type for swarm pet spell id: %d", spell_id); + logger.Log(EQEmuLogSys::Error, "Unknown npc type for swarm pet spell id: %d", spell_id); Message(0,"Unable to find pet!"); return; } @@ -625,7 +625,7 @@ void Mob::TypesTemporaryPets(uint32 typesid, Mob *targ, const char *name_overrid const NPCType *npc_type = database.GetNPCType(typesid); if(npc_type == nullptr) { //log write - logger.Log(EQEmuLogSys::Error,"Unknown npc type for swarm pet type id: %d", typesid); + logger.Log(EQEmuLogSys::Error, "Unknown npc type for swarm pet type id: %d", typesid); Message(0,"Unable to find pet!"); return; } @@ -1432,7 +1432,7 @@ void Zone::LoadAAs() { LogFile->write(EQEmuLog::Status, "Loading AA information..."); totalAAs = database.CountAAs(); if(totalAAs == 0) { - logger.Log(EQEmuLogSys::Error,"Failed to load AAs!"); + logger.Log(EQEmuLogSys::Error, "Failed to load AAs!"); aas = nullptr; return; } @@ -1451,7 +1451,7 @@ void Zone::LoadAAs() { if (database.LoadAAEffects2()) LogFile->write(EQEmuLog::Status, "Loaded %d AA Effects.", aa_effects.size()); else - logger.Log(EQEmuLogSys::Error,"Failed to load AA Effects!"); + logger.Log(EQEmuLogSys::Error, "Failed to load AA Effects!"); } bool ZoneDatabase::LoadAAEffects2() { @@ -1460,12 +1460,12 @@ bool ZoneDatabase::LoadAAEffects2() { const std::string query = "SELECT aaid, slot, effectid, base1, base2 FROM aa_effects ORDER BY aaid ASC, slot ASC"; auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in ZoneDatabase::LoadAAEffects2 query: '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAEffects2 query: '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } if (!results.RowCount()) { //no results - logger.Log(EQEmuLogSys::Error,"Error loading AA Effects, none found in the database."); + logger.Log(EQEmuLogSys::Error, "Error loading AA Effects, none found in the database."); return false; } @@ -1802,7 +1802,7 @@ bool ZoneDatabase::LoadAAEffects() { "redux_aa, redux_rate, redux_aa2, redux_rate2 FROM aa_actions"; auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadAAEffects query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadAAEffects query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -1841,7 +1841,7 @@ uint8 ZoneDatabase::GetTotalAALevels(uint32 skill_id) { std::string query = StringFormat("SELECT count(slot) FROM aa_effects WHERE aaid = %i", skill_id); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetTotalAALevels '%s: %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetTotalAALevels '%s: %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } @@ -1895,7 +1895,7 @@ uint32 ZoneDatabase::CountAAs(){ const std::string query = "SELECT count(title_sid) FROM altadv_vars"; auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in ZoneDatabase::CountAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::CountAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } @@ -1912,7 +1912,7 @@ uint32 ZoneDatabase::CountAAEffects() { const std::string query = "SELECT count(id) FROM aa_effects"; auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in ZoneDatabase::CountAALevels query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::CountAALevels query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } @@ -1945,14 +1945,14 @@ void ZoneDatabase::LoadAAs(SendAA_Struct **load){ load[index]->seq = index+1; } } else { - logger.Log(EQEmuLogSys::Error,"Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); } AARequiredLevelAndCost.clear(); query = "SELECT skill_id, level, cost from aa_required_level_cost order by skill_id"; results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -1970,7 +1970,7 @@ SendAA_Struct* ZoneDatabase::GetAASkillVars(uint32 skill_id) std::string query = "SET @row = 0"; //initialize "row" variable in database for next query auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return nullptr; } @@ -1990,7 +1990,7 @@ SendAA_Struct* ZoneDatabase::GetAASkillVars(uint32 skill_id) "FROM altadv_vars a WHERE skill_id=%i", skill_id); results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return nullptr; } diff --git a/zone/attack.cpp b/zone/attack.cpp index 59cc0216b..70ac972eb 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -1135,7 +1135,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b { if (!other) { SetTarget(nullptr); - logger.Log(EQEmuLogSys::Error,"A null Mob object was passed to Client::Attack() for evaluation!"); + logger.Log(EQEmuLogSys::Error, "A null Mob object was passed to Client::Attack() for evaluation!"); return false; } @@ -1699,7 +1699,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool if (!other) { SetTarget(nullptr); - logger.Log(EQEmuLogSys::Error,"A null Mob object was passed to NPC::Attack() for evaluation!"); + logger.Log(EQEmuLogSys::Error, "A null Mob object was passed to NPC::Attack() for evaluation!"); return false; } @@ -3896,7 +3896,7 @@ void Mob::TryDefensiveProc(const ItemInst* weapon, Mob *on, uint16 hand) { if (!on) { SetTarget(nullptr); - logger.Log(EQEmuLogSys::Error,"A null Mob object was passed to Mob::TryDefensiveProc for evaluation!"); + logger.Log(EQEmuLogSys::Error, "A null Mob object was passed to Mob::TryDefensiveProc for evaluation!"); return; } @@ -3927,7 +3927,7 @@ void Mob::TryDefensiveProc(const ItemInst* weapon, Mob *on, uint16 hand) { void Mob::TryWeaponProc(const ItemInst* weapon_g, Mob *on, uint16 hand) { if(!on) { SetTarget(nullptr); - logger.Log(EQEmuLogSys::Error,"A null Mob object was passed to Mob::TryWeaponProc for evaluation!"); + logger.Log(EQEmuLogSys::Error, "A null Mob object was passed to Mob::TryWeaponProc for evaluation!"); return; } @@ -4476,7 +4476,7 @@ void Mob::TrySkillProc(Mob *on, uint16 skill, uint16 ReuseTime, bool Success, ui if (!on) { SetTarget(nullptr); - logger.Log(EQEmuLogSys::Error,"A null Mob object was passed to Mob::TrySkillProc for evaluation!"); + logger.Log(EQEmuLogSys::Error, "A null Mob object was passed to Mob::TrySkillProc for evaluation!"); return; } diff --git a/zone/bot.cpp b/zone/bot.cpp index e0cf89601..3b860ab92 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -1225,7 +1225,7 @@ int32 Bot::acmod() return (65 + ((agility-300) / 21)); } #if EQDEBUG >= 11 - logger.Log(EQEmuLogSys::Error,"Error in Bot::acmod(): Agility: %i, Level: %i",agility,level); + logger.Log(EQEmuLogSys::Error, "Error in Bot::acmod(): Agility: %i, Level: %i",agility,level); #endif return 0; } @@ -1462,7 +1462,7 @@ void Bot::LoadAAs() { auto results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Bot::LoadAAs()"); + logger.Log(EQEmuLogSys::Error, "Error in Bot::LoadAAs()"); return; } @@ -2774,7 +2774,7 @@ void Bot::LoadStance() { std::string query = StringFormat("SELECT StanceID FROM botstances WHERE BotID = %u;", GetBotID()); auto results = database.QueryDatabase(query); if(!results.Success() || results.RowCount() == 0) { - logger.Log(EQEmuLogSys::Error,"Error in Bot::LoadStance()"); + logger.Log(EQEmuLogSys::Error, "Error in Bot::LoadStance()"); SetDefaultBotStance(); return; } @@ -2792,7 +2792,7 @@ void Bot::SaveStance() { "VALUES(%u, %u);", GetBotID(), GetBotStance()); auto results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in Bot::SaveStance()"); + logger.Log(EQEmuLogSys::Error, "Error in Bot::SaveStance()"); } @@ -2807,7 +2807,7 @@ void Bot::LoadTimers() { GetBotID(), DisciplineReuseStart-1, DisciplineReuseStart-1, GetClass(), GetLevel()); auto results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Bot::LoadTimers()"); + logger.Log(EQEmuLogSys::Error, "Error in Bot::LoadTimers()"); return; } @@ -2847,7 +2847,7 @@ void Bot::SaveTimers() { } if(hadError) - logger.Log(EQEmuLogSys::Error,"Error in Bot::SaveTimers()"); + logger.Log(EQEmuLogSys::Error, "Error in Bot::SaveTimers()"); } @@ -4211,7 +4211,7 @@ void Bot::GetBotItems(std::string* errorMessage, Inventory &inv) { ItemInst* inst = database.CreateItem(item_id, charges, aug[0], aug[1], aug[2], aug[3], aug[4]); if (!inst) { - logger.Log(EQEmuLogSys::Error,"Warning: botid %i has an invalid item_id %i in inventory slot %i", this->GetBotID(), item_id, slot_id); + logger.Log(EQEmuLogSys::Error, "Warning: botid %i has an invalid item_id %i in inventory slot %i", this->GetBotID(), item_id, slot_id); continue; } @@ -4235,7 +4235,7 @@ void Bot::GetBotItems(std::string* errorMessage, Inventory &inv) { // Save ptr to item in inventory if (put_slot_id == INVALID_INDEX) - logger.Log(EQEmuLogSys::Error,"Warning: Invalid slot_id for item in inventory: botid=%i, item_id=%i, slot_id=%i",this->GetBotID(), item_id, slot_id); + logger.Log(EQEmuLogSys::Error, "Warning: Invalid slot_id for item in inventory: botid=%i, item_id=%i, slot_id=%i",this->GetBotID(), item_id, slot_id); } @@ -6017,7 +6017,7 @@ bool Bot::Attack(Mob* other, int Hand, bool FromRiposte, bool IsStrikethrough, b { if (!other) { SetTarget(nullptr); - logger.Log(EQEmuLogSys::Error,"A null Mob object was passed to Bot::Attack for evaluation!"); + logger.Log(EQEmuLogSys::Error, "A null Mob object was passed to Bot::Attack for evaluation!"); return false; } diff --git a/zone/client.cpp b/zone/client.cpp index 41c2a6134..319b076c9 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -5301,7 +5301,7 @@ void Client::SendRewards() "ORDER BY reward_id", AccountID()); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Client::SendRewards(): %s (%s)", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Client::SendRewards(): %s (%s)", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -5369,7 +5369,7 @@ bool Client::TryReward(uint32 claim_id) { AccountID(), claim_id); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -5396,7 +5396,7 @@ bool Client::TryReward(uint32 claim_id) { AccountID(), claim_id); auto results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str()); } else { query = StringFormat("UPDATE account_rewards SET amount = (amount-1) " @@ -5404,7 +5404,7 @@ bool Client::TryReward(uint32 claim_id) { AccountID(), claim_id); auto results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str()); } InternalVeteranReward ivr = (*iter); @@ -6218,7 +6218,7 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid PetRecord record; if(!database.GetPetEntry(spells[spell_id].teleport_zone, &record)) { - logger.Log(EQEmuLogSys::Error,"Unknown doppelganger spell id: %d, check pets table", spell_id); + logger.Log(EQEmuLogSys::Error, "Unknown doppelganger spell id: %d, check pets table", spell_id); Message(13, "Unable to find data for pet %s", spells[spell_id].teleport_zone); return; } @@ -6232,7 +6232,7 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid const NPCType *npc_type = database.GetNPCType(pet.npc_id); if(npc_type == nullptr) { - logger.Log(EQEmuLogSys::Error,"Unknown npc type for doppelganger spell id: %d", spell_id); + logger.Log(EQEmuLogSys::Error, "Unknown npc type for doppelganger spell id: %d", spell_id); Message(0,"Unable to find pet!"); return; } diff --git a/zone/client_mods.cpp b/zone/client_mods.cpp index a2cd7eefb..f7a73c4cf 100644 --- a/zone/client_mods.cpp +++ b/zone/client_mods.cpp @@ -826,7 +826,7 @@ int32 Client::acmod() { return (65 + ((agility-300) / 21)); } #if EQDEBUG >= 11 - logger.Log(EQEmuLogSys::Error,"Error in Client::acmod(): Agility: %i, Level: %i",agility,level); + logger.Log(EQEmuLogSys::Error, "Error in Client::acmod(): Agility: %i, Level: %i",agility,level); #endif return 0; }; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 721e7e836..aaffb8687 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -431,7 +431,7 @@ int Client::HandlePacket(const EQApplicationPacket *app) parse->EventPlayer(EVENT_UNHANDLED_OPCODE, this, "", 1, &args); #if EQDEBUG >= 10 - logger.Log(EQEmuLogSys::Error,"HandlePacket() Opcode error: Unexpected packet during CLIENT_CONNECTING: opcode:" + logger.Log(EQEmuLogSys::Error, "HandlePacket() Opcode error: Unexpected packet during CLIENT_CONNECTING: opcode:" " %s (#%d eq=0x%04x), size: %i", OpcodeNames[opcode], opcode, 0, app->size); DumpPacket(app); #endif @@ -966,7 +966,7 @@ return; void Client::Handle_Connect_OP_ApproveZone(const EQApplicationPacket *app) { if (app->size != sizeof(ApproveZone_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size on OP_ApproveZone: Expected %i, Got %i", + logger.Log(EQEmuLogSys::Error, "Invalid size on OP_ApproveZone: Expected %i, Got %i", sizeof(ApproveZone_Struct), app->size); return; } @@ -979,14 +979,14 @@ void Client::Handle_Connect_OP_ApproveZone(const EQApplicationPacket *app) void Client::Handle_Connect_OP_ClientError(const EQApplicationPacket *app) { if (app->size != sizeof(ClientError_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size on OP_ClientError: Expected %i, Got %i", + logger.Log(EQEmuLogSys::Error, "Invalid size on OP_ClientError: Expected %i, Got %i", sizeof(ClientError_Struct), app->size); return; } // Client reporting error to server ClientError_Struct* error = (ClientError_Struct*)app->pBuffer; - logger.Log(EQEmuLogSys::Error,"Client error: %s", error->character_name); - logger.Log(EQEmuLogSys::Error,"Error message: %s", error->message); + logger.Log(EQEmuLogSys::Error, "Client error: %s", error->character_name); + logger.Log(EQEmuLogSys::Error, "Error message: %s", error->message); Message(13, error->message); #if (EQDEBUG>=5) DumpPacket(app); @@ -1180,7 +1180,7 @@ void Client::Handle_Connect_OP_SendTributes(const EQApplicationPacket *app) void Client::Handle_Connect_OP_SetServerFilter(const EQApplicationPacket *app) { if (app->size != sizeof(SetServerFilter_Struct)) { - logger.Log(EQEmuLogSys::Error,"Received invalid sized OP_SetServerFilter"); + logger.Log(EQEmuLogSys::Error, "Received invalid sized OP_SetServerFilter"); DumpPacket(app); return; } @@ -1197,7 +1197,7 @@ void Client::Handle_Connect_OP_SpawnAppearance(const EQApplicationPacket *app) void Client::Handle_Connect_OP_TGB(const EQApplicationPacket *app) { if (app->size != sizeof(uint32)) { - logger.Log(EQEmuLogSys::Error,"Invalid size on OP_TGB: Expected %i, Got %i", + logger.Log(EQEmuLogSys::Error, "Invalid size on OP_TGB: Expected %i, Got %i", sizeof(uint32), app->size); return; } @@ -1324,7 +1324,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) */ Client* client = entity_list.GetClientByName(cze->char_name); if (!zone->GetAuth(ip, cze->char_name, &WID, &account_id, &character_id, &admin, lskey, &tellsoff)) { - logger.Log(EQEmuLogSys::Error,"GetAuth() returned false kicking client"); + logger.Log(EQEmuLogSys::Error, "GetAuth() returned false kicking client"); if (client != 0) { client->Save(); client->Kick(); @@ -1729,7 +1729,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) p_timers.SetCharID(CharacterID()); if (!p_timers.Load(&database)) { - logger.Log(EQEmuLogSys::Error,"Unable to load ability timers from the database for %s (%i)!", GetCleanName(), CharacterID()); + logger.Log(EQEmuLogSys::Error, "Unable to load ability timers from the database for %s (%i)!", GetCleanName(), CharacterID()); } /* Load Spell Slot Refresh from Currently Memoried Spells */ @@ -1956,7 +1956,7 @@ void Client::Handle_OP_AdventureInfoRequest(const EQApplicationPacket *app) { if (app->size < sizeof(EntityId_Struct)) { - logger.Log(EQEmuLogSys::Error,"Handle_OP_AdventureInfoRequest had a packet that was too small."); + logger.Log(EQEmuLogSys::Error, "Handle_OP_AdventureInfoRequest had a packet that was too small."); return; } EntityId_Struct* ent = (EntityId_Struct*)app->pBuffer; @@ -2011,7 +2011,7 @@ void Client::Handle_OP_AdventureMerchantPurchase(const EQApplicationPacket *app) { if (app->size != sizeof(Adventure_Purchase_Struct)) { - logger.Log(EQEmuLogSys::Error,"OP size error: OP_AdventureMerchantPurchase expected:%i got:%i", sizeof(Adventure_Purchase_Struct), app->size); + logger.Log(EQEmuLogSys::Error, "OP size error: OP_AdventureMerchantPurchase expected:%i got:%i", sizeof(Adventure_Purchase_Struct), app->size); return; } @@ -2191,7 +2191,7 @@ void Client::Handle_OP_AdventureMerchantRequest(const EQApplicationPacket *app) { if (app->size != sizeof(AdventureMerchant_Struct)) { - logger.Log(EQEmuLogSys::Error,"OP size error: OP_AdventureMerchantRequest expected:%i got:%i", sizeof(AdventureMerchant_Struct), app->size); + logger.Log(EQEmuLogSys::Error, "OP size error: OP_AdventureMerchantRequest expected:%i got:%i", sizeof(AdventureMerchant_Struct), app->size); return; } std::stringstream ss(std::stringstream::in | std::stringstream::out); @@ -2413,7 +2413,7 @@ void Client::Handle_OP_AdventureRequest(const EQApplicationPacket *app) { if (app->size < sizeof(AdventureRequest_Struct)) { - logger.Log(EQEmuLogSys::Error,"Handle_OP_AdventureRequest had a packet that was too small."); + logger.Log(EQEmuLogSys::Error, "Handle_OP_AdventureRequest had a packet that was too small."); return; } @@ -2939,7 +2939,7 @@ void Client::Handle_OP_AltCurrencySellSelection(const EQApplicationPacket *app) void Client::Handle_OP_Animation(const EQApplicationPacket *app) { if (app->size != sizeof(Animation_Struct)) { - logger.Log(EQEmuLogSys::Error,"Received invalid sized " + logger.Log(EQEmuLogSys::Error, "Received invalid sized " "OP_Animation: got %d, expected %d", app->size, sizeof(Animation_Struct)); DumpPacket(app); @@ -2958,7 +2958,7 @@ void Client::Handle_OP_Animation(const EQApplicationPacket *app) void Client::Handle_OP_ApplyPoison(const EQApplicationPacket *app) { if (app->size != sizeof(ApplyPoison_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_ApplyPoison, size=%i, expected %i", app->size, sizeof(ApplyPoison_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_ApplyPoison, size=%i, expected %i", app->size, sizeof(ApplyPoison_Struct)); DumpPacket(app); return; } @@ -3072,7 +3072,7 @@ void Client::Handle_OP_AugmentInfo(const EQApplicationPacket *app) void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app) { if (app->size != sizeof(AugmentItem_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for AugmentItem_Struct: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for AugmentItem_Struct: Expected: %i, Got: %i", sizeof(AugmentItem_Struct), app->size); return; } @@ -3229,7 +3229,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app) void Client::Handle_OP_AutoAttack(const EQApplicationPacket *app) { if (app->size != 4) { - logger.Log(EQEmuLogSys::Error,"OP size error: OP_AutoAttack expected:4 got:%i", app->size); + logger.Log(EQEmuLogSys::Error, "OP size error: OP_AutoAttack expected:4 got:%i", app->size); return; } @@ -3581,7 +3581,7 @@ void Client::Handle_OP_Barter(const EQApplicationPacket *app) void Client::Handle_OP_BazaarInspect(const EQApplicationPacket *app) { if (app->size != sizeof(BazaarInspect_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for BazaarInspect_Struct: Expected %i, Got %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for BazaarInspect_Struct: Expected %i, Got %i", sizeof(BazaarInspect_Struct), app->size); return; } @@ -3637,7 +3637,7 @@ void Client::Handle_OP_BazaarSearch(const EQApplicationPacket *app) } else { _log(TRADING__CLIENT, "Malformed BazaarSearch_Struct packe, Action %it received, ignoring..."); - logger.Log(EQEmuLogSys::Error,"Malformed BazaarSearch_Struct packet received, ignoring...\n"); + logger.Log(EQEmuLogSys::Error, "Malformed BazaarSearch_Struct packet received, ignoring...\n"); } return; @@ -3722,13 +3722,13 @@ void Client::Handle_OP_Begging(const EQApplicationPacket *app) void Client::Handle_OP_Bind_Wound(const EQApplicationPacket *app) { if (app->size != sizeof(BindWound_Struct)){ - logger.Log(EQEmuLogSys::Error,"Size mismatch for Bind wound packet"); + logger.Log(EQEmuLogSys::Error, "Size mismatch for Bind wound packet"); DumpPacket(app); } BindWound_Struct* bind_in = (BindWound_Struct*)app->pBuffer; Mob* bindmob = entity_list.GetMob(bind_in->to); if (!bindmob){ - logger.Log(EQEmuLogSys::Error,"Bindwound on non-exsistant mob from %s", this->GetName()); + logger.Log(EQEmuLogSys::Error, "Bindwound on non-exsistant mob from %s", this->GetName()); } else { logger.LogDebug(EQEmuLogSys::General, "BindWound in: to:\'%s\' from=\'%s\'", bindmob->GetName(), GetName()); @@ -3839,7 +3839,7 @@ void Client::Handle_OP_BoardBoat(const EQApplicationPacket *app) // this sends unclean mob name, so capped at 64 // a_boat006 if (app->size <= 5 || app->size > 64) { - logger.Log(EQEmuLogSys::Error,"Size mismatch in OP_BoardBoad. Expected greater than 5 less than 64, got %i", app->size); + logger.Log(EQEmuLogSys::Error, "Size mismatch in OP_BoardBoad. Expected greater than 5 less than 64, got %i", app->size); DumpPacket(app); return; } @@ -3860,7 +3860,7 @@ void Client::Handle_OP_Buff(const EQApplicationPacket *app) { if (app->size != sizeof(SpellBuffFade_Struct)) { - logger.Log(EQEmuLogSys::Error,"Size mismatch in OP_Buff. expected %i got %i", sizeof(SpellBuffFade_Struct), app->size); + logger.Log(EQEmuLogSys::Error, "Size mismatch in OP_Buff. expected %i got %i", sizeof(SpellBuffFade_Struct), app->size); DumpPacket(app); return; } @@ -3956,7 +3956,7 @@ void Client::Handle_OP_CancelTask(const EQApplicationPacket *app) void Client::Handle_OP_CancelTrade(const EQApplicationPacket *app) { if (app->size != sizeof(CancelTrade_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_CancelTrade, size=%i, expected %i", app->size, sizeof(CancelTrade_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_CancelTrade, size=%i, expected %i", app->size, sizeof(CancelTrade_Struct)); return; } Mob* with = trade->With(); @@ -4235,7 +4235,7 @@ void Client::Handle_OP_ClearSurname(const EQApplicationPacket *app) void Client::Handle_OP_ClickDoor(const EQApplicationPacket *app) { if (app->size != sizeof(ClickDoor_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_ClickDoor, size=%i, expected %i", app->size, sizeof(ClickDoor_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_ClickDoor, size=%i, expected %i", app->size, sizeof(ClickDoor_Struct)); return; } ClickDoor_Struct* cd = (ClickDoor_Struct*)app->pBuffer; @@ -4260,7 +4260,7 @@ void Client::Handle_OP_ClickDoor(const EQApplicationPacket *app) void Client::Handle_OP_ClickObject(const EQApplicationPacket *app) { if (app->size != sizeof(ClickObject_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size on ClickObject_Struct: Expected %i, Got %i", + logger.Log(EQEmuLogSys::Error, "Invalid size on ClickObject_Struct: Expected %i, Got %i", sizeof(ClickObject_Struct), app->size); return; } @@ -4311,7 +4311,7 @@ void Client::Handle_OP_ClickObjectAction(const EQApplicationPacket *app) else { if (app->size != sizeof(ClickObjectAction_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size on OP_ClickObjectAction: Expected %i, Got %i", + logger.Log(EQEmuLogSys::Error, "Invalid size on OP_ClickObjectAction: Expected %i, Got %i", sizeof(ClickObjectAction_Struct), app->size); return; } @@ -4324,11 +4324,11 @@ void Client::Handle_OP_ClickObjectAction(const EQApplicationPacket *app) object->Close(); } else { - logger.Log(EQEmuLogSys::Error,"Unsupported action %d in OP_ClickObjectAction", oos->open); + logger.Log(EQEmuLogSys::Error, "Unsupported action %d in OP_ClickObjectAction", oos->open); } } else { - logger.Log(EQEmuLogSys::Error,"Invalid object %d in OP_ClickObjectAction", oos->drop_id); + logger.Log(EQEmuLogSys::Error, "Invalid object %d in OP_ClickObjectAction", oos->drop_id); } } @@ -4345,8 +4345,8 @@ void Client::Handle_OP_ClickObjectAction(const EQApplicationPacket *app) void Client::Handle_OP_ClientError(const EQApplicationPacket *app) { ClientError_Struct* error = (ClientError_Struct*)app->pBuffer; - logger.Log(EQEmuLogSys::Error,"Client error: %s", error->character_name); - logger.Log(EQEmuLogSys::Error,"Error message:%s", error->message); + logger.Log(EQEmuLogSys::Error, "Client error: %s", error->character_name); + logger.Log(EQEmuLogSys::Error, "Error message:%s", error->message); return; } @@ -4367,7 +4367,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) if (app->size != sizeof(PlayerPositionUpdateClient_Struct) && app->size != (sizeof(PlayerPositionUpdateClient_Struct)+1) ) { - logger.Log(EQEmuLogSys::Error,"OP size error: OP_ClientUpdate expected:%i got:%i", sizeof(PlayerPositionUpdateClient_Struct), app->size); + logger.Log(EQEmuLogSys::Error, "OP size error: OP_ClientUpdate expected:%i got:%i", sizeof(PlayerPositionUpdateClient_Struct), app->size); return; } PlayerPositionUpdateClient_Struct* ppu = (PlayerPositionUpdateClient_Struct*)app->pBuffer; @@ -4873,7 +4873,7 @@ void Client::Handle_OP_Consume(const EQApplicationPacket *app) { if (app->size != sizeof(Consume_Struct)) { - logger.Log(EQEmuLogSys::Error,"OP size error: OP_Consume expected:%i got:%i", sizeof(Consume_Struct), app->size); + logger.Log(EQEmuLogSys::Error, "OP size error: OP_Consume expected:%i got:%i", sizeof(Consume_Struct), app->size); return; } Consume_Struct* pcs = (Consume_Struct*)app->pBuffer; @@ -4910,7 +4910,7 @@ void Client::Handle_OP_Consume(const EQApplicationPacket *app) ItemInst *myitem = GetInv().GetItem(pcs->slot); if (myitem == nullptr) { - logger.Log(EQEmuLogSys::Error,"Consuming from empty slot %d", pcs->slot); + logger.Log(EQEmuLogSys::Error, "Consuming from empty slot %d", pcs->slot); return; } @@ -4922,7 +4922,7 @@ void Client::Handle_OP_Consume(const EQApplicationPacket *app) Consume(eat_item, ItemTypeDrink, pcs->slot, (pcs->auto_consumed == 0xffffffff)); } else { - logger.Log(EQEmuLogSys::Error,"OP_Consume: unknown type, type:%i", (int)pcs->type); + logger.Log(EQEmuLogSys::Error, "OP_Consume: unknown type, type:%i", (int)pcs->type); return; } if (m_pp.hunger_level > 50000) @@ -4943,7 +4943,7 @@ void Client::Handle_OP_Consume(const EQApplicationPacket *app) void Client::Handle_OP_ControlBoat(const EQApplicationPacket *app) { if (app->size != sizeof(ControlBoat_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_ControlBoat, size=%i, expected %i", app->size, sizeof(ControlBoat_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_ControlBoat, size=%i, expected %i", app->size, sizeof(ControlBoat_Struct)); return; } ControlBoat_Struct* cbs = (ControlBoat_Struct*)app->pBuffer; @@ -5099,7 +5099,7 @@ void Client::Handle_OP_CrystalReclaim(const EQApplicationPacket *app) void Client::Handle_OP_Damage(const EQApplicationPacket *app) { if (app->size != sizeof(CombatDamage_Struct)) { - logger.Log(EQEmuLogSys::Error,"Received invalid sized OP_Damage: got %d, expected %d", app->size, + logger.Log(EQEmuLogSys::Error, "Received invalid sized OP_Damage: got %d, expected %d", app->size, sizeof(CombatDamage_Struct)); DumpPacket(app); return; @@ -5447,7 +5447,7 @@ void Client::Handle_OP_Dye(const EQApplicationPacket *app) void Client::Handle_OP_Emote(const EQApplicationPacket *app) { if (app->size != sizeof(Emote_Struct)) { - logger.Log(EQEmuLogSys::Error,"Received invalid sized " + logger.Log(EQEmuLogSys::Error, "Received invalid sized " "OP_Emote: got %d, expected %d", app->size, sizeof(Emote_Struct)); DumpPacket(app); @@ -5538,7 +5538,7 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app) } if (app->size != sizeof(EnvDamage2_Struct)) { - logger.Log(EQEmuLogSys::Error,"Received invalid sized OP_EnvDamage: got %d, expected %d", app->size, + logger.Log(EQEmuLogSys::Error, "Received invalid sized OP_EnvDamage: got %d, expected %d", app->size, sizeof(EnvDamage2_Struct)); DumpPacket(app); return; @@ -5593,7 +5593,7 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app) void Client::Handle_OP_FaceChange(const EQApplicationPacket *app) { if (app->size != sizeof(FaceChange_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for OP_FaceChange: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for OP_FaceChange: Expected: %i, Got: %i", sizeof(FaceChange_Struct), app->size); return; } @@ -5862,7 +5862,7 @@ void Client::Handle_OP_GMBecomeNPC(const EQApplicationPacket *app) return; } if (app->size != sizeof(BecomeNPC_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_GMBecomeNPC, size=%i, expected %i", app->size, sizeof(BecomeNPC_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_GMBecomeNPC, size=%i, expected %i", app->size, sizeof(BecomeNPC_Struct)); return; } //entity_list.QueueClients(this, app, false); @@ -5914,7 +5914,7 @@ void Client::Handle_OP_GMEmoteZone(const EQApplicationPacket *app) return; } if (app->size != sizeof(GMEmoteZone_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_GMEmoteZone, size=%i, expected %i", app->size, sizeof(GMEmoteZone_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_GMEmoteZone, size=%i, expected %i", app->size, sizeof(GMEmoteZone_Struct)); return; } GMEmoteZone_Struct* gmez = (GMEmoteZone_Struct*)app->pBuffer; @@ -5947,7 +5947,7 @@ void Client::Handle_OP_GMFind(const EQApplicationPacket *app) return; } if (app->size != sizeof(GMSummon_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_GMFind, size=%i, expected %i", app->size, sizeof(GMSummon_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_GMFind, size=%i, expected %i", app->size, sizeof(GMSummon_Struct)); return; } //Break down incoming @@ -6012,7 +6012,7 @@ void Client::Handle_OP_GMHideMe(const EQApplicationPacket *app) return; } if (app->size != sizeof(SpawnAppearance_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_GMHideMe, size=%i, expected %i", app->size, sizeof(SpawnAppearance_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_GMHideMe, size=%i, expected %i", app->size, sizeof(SpawnAppearance_Struct)); return; } SpawnAppearance_Struct* sa = (SpawnAppearance_Struct*)app->pBuffer; @@ -6062,7 +6062,7 @@ void Client::Handle_OP_GMKill(const EQApplicationPacket *app) return; } if (app->size != sizeof(GMKill_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_GMKill, size=%i, expected %i", app->size, sizeof(GMKill_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_GMKill, size=%i, expected %i", app->size, sizeof(GMKill_Struct)); return; } GMKill_Struct* gmk = (GMKill_Struct *)app->pBuffer; @@ -6129,7 +6129,7 @@ void Client::Handle_OP_GMLastName(const EQApplicationPacket *app) void Client::Handle_OP_GMNameChange(const EQApplicationPacket *app) { if (app->size != sizeof(GMName_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_GMNameChange, size=%i, expected %i", app->size, sizeof(GMName_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_GMNameChange, size=%i, expected %i", app->size, sizeof(GMName_Struct)); return; } const GMName_Struct* gmn = (const GMName_Struct *)app->pBuffer; @@ -6383,7 +6383,7 @@ void Client::Handle_OP_GMZoneRequest2(const EQApplicationPacket *app) return; } if (app->size < sizeof(uint32)) { - logger.Log(EQEmuLogSys::Error,"OP size error: OP_GMZoneRequest2 expected:%i got:%i", sizeof(uint32), app->size); + logger.Log(EQEmuLogSys::Error, "OP size error: OP_GMZoneRequest2 expected:%i got:%i", sizeof(uint32), app->size); return; } @@ -6400,7 +6400,7 @@ void Client::Handle_OP_GroupAcknowledge(const EQApplicationPacket *app) void Client::Handle_OP_GroupCancelInvite(const EQApplicationPacket *app) { if (app->size != sizeof(GroupCancel_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for OP_GroupCancelInvite: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for OP_GroupCancelInvite: Expected: %i, Got: %i", sizeof(GroupCancel_Struct), app->size); return; } @@ -6444,7 +6444,7 @@ void Client::Handle_OP_GroupDelete(const EQApplicationPacket *app) void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app) { if (app->size != sizeof(GroupGeneric_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for GroupGeneric_Struct: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for GroupGeneric_Struct: Expected: %i, Got: %i", sizeof(GroupGeneric_Struct), app->size); return; } @@ -6591,7 +6591,7 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app) } else { - logger.Log(EQEmuLogSys::Error,"Failed to remove player from group. Unable to find player named %s in player group", gd->name2); + logger.Log(EQEmuLogSys::Error, "Failed to remove player from group. Unable to find player named %s in player group", gd->name2); } } if (LFP) @@ -6611,7 +6611,7 @@ void Client::Handle_OP_GroupFollow(const EQApplicationPacket *app) void Client::Handle_OP_GroupFollow2(const EQApplicationPacket *app) { if (app->size != sizeof(GroupGeneric_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for OP_GroupFollow: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for OP_GroupFollow: Expected: %i, Got: %i", sizeof(GroupGeneric_Struct), app->size); return; } @@ -6660,7 +6660,7 @@ void Client::Handle_OP_GroupInvite(const EQApplicationPacket *app) void Client::Handle_OP_GroupInvite2(const EQApplicationPacket *app) { if (app->size != sizeof(GroupInvite_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for OP_GroupInvite: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for OP_GroupInvite: Expected: %i, Got: %i", sizeof(GroupInvite_Struct), app->size); return; } @@ -6738,7 +6738,7 @@ void Client::Handle_OP_GroupMakeLeader(const EQApplicationPacket *app) void Client::Handle_OP_GroupMentor(const EQApplicationPacket *app) { if (app->size != sizeof(GroupMentor_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_GroupMentor, size=%i, expected %i", app->size, sizeof(GroupMentor_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_GroupMentor, size=%i, expected %i", app->size, sizeof(GroupMentor_Struct)); DumpPacket(app); return; } @@ -6774,7 +6774,7 @@ void Client::Handle_OP_GroupMentor(const EQApplicationPacket *app) void Client::Handle_OP_GroupRoles(const EQApplicationPacket *app) { if (app->size != sizeof(GroupRole_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_GroupRoles, size=%i, expected %i", app->size, sizeof(GroupRole_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_GroupRoles, size=%i, expected %i", app->size, sizeof(GroupRole_Struct)); DumpPacket(app); return; } @@ -6868,7 +6868,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app) } if (app->size < sizeof(uint32)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_GuildBank, size=%i, expected %i", app->size, sizeof(uint32)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_GuildBank, size=%i, expected %i", app->size, sizeof(uint32)); DumpPacket(app); return; } @@ -7989,7 +7989,7 @@ void Client::Handle_OP_Ignore(const EQApplicationPacket *app) void Client::Handle_OP_Illusion(const EQApplicationPacket *app) { if (app->size != sizeof(Illusion_Struct)) { - logger.Log(EQEmuLogSys::Error,"Received invalid sized OP_Illusion: got %d, expected %d", app->size, + logger.Log(EQEmuLogSys::Error, "Received invalid sized OP_Illusion: got %d, expected %d", app->size, sizeof(Illusion_Struct)); DumpPacket(app); return; @@ -8019,7 +8019,7 @@ void Client::Handle_OP_InspectAnswer(const EQApplicationPacket *app) { if (app->size != sizeof(InspectResponse_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_InspectAnswer, size=%i, expected %i", app->size, sizeof(InspectResponse_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_InspectAnswer, size=%i, expected %i", app->size, sizeof(InspectResponse_Struct)); return; } @@ -8074,7 +8074,7 @@ void Client::Handle_OP_InspectMessageUpdate(const EQApplicationPacket *app) { if (app->size != sizeof(InspectMessage_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_InspectMessageUpdate, size=%i, expected %i", app->size, sizeof(InspectMessage_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_InspectMessageUpdate, size=%i, expected %i", app->size, sizeof(InspectMessage_Struct)); return; } @@ -8088,7 +8088,7 @@ void Client::Handle_OP_InspectRequest(const EQApplicationPacket *app) { if (app->size != sizeof(Inspect_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_InspectRequest, size=%i, expected %i", app->size, sizeof(Inspect_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_InspectRequest, size=%i, expected %i", app->size, sizeof(Inspect_Struct)); return; } @@ -8125,7 +8125,7 @@ void Client::Handle_OP_InstillDoubt(const EQApplicationPacket *app) void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app) { if (app->size != sizeof(ItemViewRequest_Struct)){ - logger.Log(EQEmuLogSys::Error,"Wrong size on OP_ItemLinkClick. Got: %i, Expected: %i", app->size, sizeof(ItemViewRequest_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size on OP_ItemLinkClick. Got: %i, Expected: %i", app->size, sizeof(ItemViewRequest_Struct)); DumpPacket(app); return; } @@ -8225,7 +8225,7 @@ void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app) void Client::Handle_OP_ItemLinkResponse(const EQApplicationPacket *app) { if (app->size != sizeof(LDONItemViewRequest_Struct)) { - logger.Log(EQEmuLogSys::Error,"OP size error: OP_ItemLinkResponse expected:%i got:%i", sizeof(LDONItemViewRequest_Struct), app->size); + logger.Log(EQEmuLogSys::Error, "OP size error: OP_ItemLinkResponse expected:%i got:%i", sizeof(LDONItemViewRequest_Struct), app->size); return; } LDONItemViewRequest_Struct* item = (LDONItemViewRequest_Struct*)app->pBuffer; @@ -8240,7 +8240,7 @@ void Client::Handle_OP_ItemLinkResponse(const EQApplicationPacket *app) void Client::Handle_OP_ItemName(const EQApplicationPacket *app) { if (app->size != sizeof(ItemNamePacket_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for ItemNamePacket_Struct: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for ItemNamePacket_Struct: Expected: %i, Got: %i", sizeof(ItemNamePacket_Struct), app->size); return; } @@ -8438,7 +8438,7 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app) { if (app->size != sizeof(ItemVerifyRequest_Struct)) { - logger.Log(EQEmuLogSys::Error,"OP size error: OP_ItemVerifyRequest expected:%i got:%i", sizeof(ItemVerifyRequest_Struct), app->size); + logger.Log(EQEmuLogSys::Error, "OP size error: OP_ItemVerifyRequest expected:%i got:%i", sizeof(ItemVerifyRequest_Struct), app->size); return; } @@ -8891,7 +8891,7 @@ void Client::Handle_OP_LFGGetMatchesRequest(const EQApplicationPacket *app) { if (app->size != sizeof(LFGGetMatchesRequest_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_LFGGetMatchesRequest, size=%i, expected %i", app->size, sizeof(LFGGetMatchesRequest_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_LFGGetMatchesRequest, size=%i, expected %i", app->size, sizeof(LFGGetMatchesRequest_Struct)); DumpPacket(app); return; } @@ -9051,7 +9051,7 @@ void Client::Handle_OP_LFPCommand(const EQApplicationPacket *app) { if (app->size != sizeof(LFP_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_LFPCommand, size=%i, expected %i", app->size, sizeof(LFP_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_LFPCommand, size=%i, expected %i", app->size, sizeof(LFP_Struct)); DumpPacket(app); return; } @@ -9088,7 +9088,7 @@ void Client::Handle_OP_LFPCommand(const EQApplicationPacket *app) // This should not happen. The client checks if you are in a group and will not let you put LFP on if // you are not the leader. if (!g->IsLeader(this)) { - logger.Log(EQEmuLogSys::Error,"Client sent LFP on for character %s who is grouped but not leader.", GetName()); + logger.Log(EQEmuLogSys::Error, "Client sent LFP on for character %s who is grouped but not leader.", GetName()); return; } // Fill the LFPMembers array with the rest of the group members, excluding ourself @@ -9113,7 +9113,7 @@ void Client::Handle_OP_LFPGetMatchesRequest(const EQApplicationPacket *app) { if (app->size != sizeof(LFPGetMatchesRequest_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_LFPGetMatchesRequest, size=%i, expected %i", app->size, sizeof(LFPGetMatchesRequest_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_LFPGetMatchesRequest, size=%i, expected %i", app->size, sizeof(LFPGetMatchesRequest_Struct)); DumpPacket(app); return; } @@ -9169,7 +9169,7 @@ void Client::Handle_OP_Logout(const EQApplicationPacket *app) void Client::Handle_OP_LootItem(const EQApplicationPacket *app) { if (app->size != sizeof(LootingItem_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_LootItem, size=%i, expected %i", app->size, sizeof(LootingItem_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_LootItem, size=%i, expected %i", app->size, sizeof(LootingItem_Struct)); return; } @@ -9717,7 +9717,7 @@ void Client::Handle_OP_MercenaryTimerRequest(const EQApplicationPacket *app) void Client::Handle_OP_MoveCoin(const EQApplicationPacket *app) { if (app->size != sizeof(MoveCoin_Struct)){ - logger.Log(EQEmuLogSys::Error,"Wrong size on OP_MoveCoin. Got: %i, Expected: %i", app->size, sizeof(MoveCoin_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size on OP_MoveCoin. Got: %i, Expected: %i", app->size, sizeof(MoveCoin_Struct)); DumpPacket(app); return; } @@ -9733,7 +9733,7 @@ void Client::Handle_OP_MoveItem(const EQApplicationPacket *app) } if (app->size != sizeof(MoveItem_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_MoveItem, size=%i, expected %i", app->size, sizeof(MoveItem_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_MoveItem, size=%i, expected %i", app->size, sizeof(MoveItem_Struct)); return; } @@ -9875,7 +9875,7 @@ void Client::Handle_OP_OpenTributeMaster(const EQApplicationPacket *app) void Client::Handle_OP_PDeletePetition(const EQApplicationPacket *app) { if (app->size < 2) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_PDeletePetition, size=%i, expected %i", app->size, 2); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_PDeletePetition, size=%i, expected %i", app->size, 2); return; } if (petition_list.DeletePetitionByCharName((char*)app->pBuffer)) @@ -9888,7 +9888,7 @@ void Client::Handle_OP_PDeletePetition(const EQApplicationPacket *app) void Client::Handle_OP_PetCommands(const EQApplicationPacket *app) { if (app->size != sizeof(PetCommand_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_PetCommands, size=%i, expected %i", app->size, sizeof(PetCommand_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_PetCommands, size=%i, expected %i", app->size, sizeof(PetCommand_Struct)); return; } char val1[20] = { 0 }; @@ -10351,7 +10351,7 @@ void Client::Handle_OP_PetitionBug(const EQApplicationPacket *app) void Client::Handle_OP_PetitionCheckIn(const EQApplicationPacket *app) { if (app->size != sizeof(Petition_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_PetitionCheckIn, size=%i, expected %i", app->size, sizeof(Petition_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_PetitionCheckIn, size=%i, expected %i", app->size, sizeof(Petition_Struct)); return; } Petition_Struct* inpet = (Petition_Struct*)app->pBuffer; @@ -10395,7 +10395,7 @@ void Client::Handle_OP_PetitionCheckout(const EQApplicationPacket *app) void Client::Handle_OP_PetitionDelete(const EQApplicationPacket *app) { if (app->size != sizeof(PetitionUpdate_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_PetitionDelete, size=%i, expected %i", app->size, sizeof(PetitionUpdate_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_PetitionDelete, size=%i, expected %i", app->size, sizeof(PetitionUpdate_Struct)); return; } EQApplicationPacket* outapp = new EQApplicationPacket(OP_PetitionUpdate, sizeof(PetitionUpdate_Struct)); @@ -10465,7 +10465,7 @@ void Client::Handle_OP_PickPocket(const EQApplicationPacket *app) { if (app->size != sizeof(PickPocket_Struct)) { - logger.Log(EQEmuLogSys::Error,"Size mismatch for Pick Pocket packet"); + logger.Log(EQEmuLogSys::Error, "Size mismatch for Pick Pocket packet"); DumpPacket(app); } @@ -10739,7 +10739,7 @@ void Client::Handle_OP_PVPLeaderBoardRequest(const EQApplicationPacket *app) void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app) { if (app->size < sizeof(RaidGeneral_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_RaidCommand, size=%i, expected at least %i", app->size, sizeof(RaidGeneral_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_RaidCommand, size=%i, expected at least %i", app->size, sizeof(RaidGeneral_Struct)); DumpPacket(app); return; } @@ -11324,7 +11324,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app) void Client::Handle_OP_RandomReq(const EQApplicationPacket *app) { if (app->size != sizeof(RandomReq_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_RandomReq, size=%i, expected %i", app->size, sizeof(RandomReq_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_RandomReq, size=%i, expected %i", app->size, sizeof(RandomReq_Struct)); return; } const RandomReq_Struct* rndq = (const RandomReq_Struct*)app->pBuffer; @@ -11353,7 +11353,7 @@ void Client::Handle_OP_RandomReq(const EQApplicationPacket *app) void Client::Handle_OP_ReadBook(const EQApplicationPacket *app) { if (app->size != sizeof(BookRequest_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_ReadBook, size=%i, expected %i", app->size, sizeof(BookRequest_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_ReadBook, size=%i, expected %i", app->size, sizeof(BookRequest_Struct)); return; } BookRequest_Struct* book = (BookRequest_Struct*)app->pBuffer; @@ -11369,7 +11369,7 @@ void Client::Handle_OP_ReadBook(const EQApplicationPacket *app) void Client::Handle_OP_RecipeAutoCombine(const EQApplicationPacket *app) { if (app->size != sizeof(RecipeAutoCombine_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for RecipeAutoCombine_Struct: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for RecipeAutoCombine_Struct: Expected: %i, Got: %i", sizeof(RecipeAutoCombine_Struct), app->size); return; } @@ -11383,7 +11383,7 @@ void Client::Handle_OP_RecipeAutoCombine(const EQApplicationPacket *app) void Client::Handle_OP_RecipeDetails(const EQApplicationPacket *app) { if (app->size < sizeof(uint32)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for RecipeDetails Request: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for RecipeDetails Request: Expected: %i, Got: %i", sizeof(uint32), app->size); return; } @@ -11397,7 +11397,7 @@ void Client::Handle_OP_RecipeDetails(const EQApplicationPacket *app) void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app) { if (app->size != sizeof(TradeskillFavorites_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for TradeskillFavorites_Struct: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for TradeskillFavorites_Struct: Expected: %i, Got: %i", sizeof(TradeskillFavorites_Struct), app->size); return; } @@ -11456,7 +11456,7 @@ void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app) void Client::Handle_OP_RecipesSearch(const EQApplicationPacket *app) { if (app->size != sizeof(RecipesSearch_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for RecipesSearch_Struct: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for RecipesSearch_Struct: Expected: %i, Got: %i", sizeof(RecipesSearch_Struct), app->size); return; } @@ -11746,7 +11746,7 @@ void Client::Handle_OP_Sacrifice(const EQApplicationPacket *app) Sacrifice_Struct *ss = (Sacrifice_Struct*)app->pBuffer; if (!PendingSacrifice) { - logger.Log(EQEmuLogSys::Error,"Unexpected OP_Sacrifice reply"); + logger.Log(EQEmuLogSys::Error, "Unexpected OP_Sacrifice reply"); DumpPacket(app); return; } @@ -11790,7 +11790,7 @@ void Client::Handle_OP_SelectTribute(const EQApplicationPacket *app) //we should enforce being near a real tribute master to change this //but im not sure how I wanna do that right now. if (app->size != sizeof(SelectTributeReq_Struct)) - logger.Log(EQEmuLogSys::Error,"Invalid size on OP_SelectTribute packet"); + logger.Log(EQEmuLogSys::Error, "Invalid size on OP_SelectTribute packet"); else { SelectTributeReq_Struct *t = (SelectTributeReq_Struct *)app->pBuffer; SendTributeDetails(t->client_id, t->tribute_id); @@ -11904,7 +11904,7 @@ void Client::Handle_OP_SetRunMode(const EQApplicationPacket *app) void Client::Handle_OP_SetServerFilter(const EQApplicationPacket *app) { if (app->size != sizeof(SetServerFilter_Struct)) { - logger.Log(EQEmuLogSys::Error,"Received invalid sized " + logger.Log(EQEmuLogSys::Error, "Received invalid sized " "OP_SetServerFilter: got %d, expected %d", app->size, sizeof(SetServerFilter_Struct)); DumpPacket(app); @@ -11924,7 +11924,7 @@ void Client::Handle_OP_SetStartCity(const EQApplicationPacket *app) } if (app->size < 1) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_SetStartCity, size=%i, expected %i", app->size, 1); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_SetStartCity, size=%i, expected %i", app->size, 1); DumpPacket(app); return; } @@ -11938,7 +11938,7 @@ void Client::Handle_OP_SetStartCity(const EQApplicationPacket *app) m_pp.class_, m_pp.deity, m_pp.race); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"No valid start zones found for /setstartcity"); + logger.Log(EQEmuLogSys::Error, "No valid start zones found for /setstartcity"); return; } @@ -12013,7 +12013,7 @@ void Client::Handle_OP_SetTitle(const EQApplicationPacket *app) void Client::Handle_OP_Shielding(const EQApplicationPacket *app) { if (app->size != sizeof(Shielding_Struct)) { - logger.Log(EQEmuLogSys::Error,"OP size error: OP_Shielding expected:%i got:%i", sizeof(Shielding_Struct), app->size); + logger.Log(EQEmuLogSys::Error, "OP size error: OP_Shielding expected:%i got:%i", sizeof(Shielding_Struct), app->size); return; } if (GetClass() != WARRIOR) @@ -12110,7 +12110,7 @@ void Client::Handle_OP_ShopEnd(const EQApplicationPacket *app) void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app) { if (app->size != sizeof(Merchant_Sell_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size on OP_ShopPlayerBuy: Expected %i, Got %i", + logger.Log(EQEmuLogSys::Error, "Invalid size on OP_ShopPlayerBuy: Expected %i, Got %i", sizeof(Merchant_Sell_Struct), app->size); return; } @@ -12278,7 +12278,7 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app) SendItemPacket(freeslotid, inst, ItemPacketTrade); } else if (!stacked){ - logger.Log(EQEmuLogSys::Error,"OP_ShopPlayerBuy: item->ItemClass Unknown! Type: %i", item->ItemClass); + logger.Log(EQEmuLogSys::Error, "OP_ShopPlayerBuy: item->ItemClass Unknown! Type: %i", item->ItemClass); } QueuePacket(outapp); if (inst && tmpmer_used){ @@ -12368,7 +12368,7 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app) void Client::Handle_OP_ShopPlayerSell(const EQApplicationPacket *app) { if (app->size != sizeof(Merchant_Purchase_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size on OP_ShopPlayerSell: Expected %i, Got %i", + logger.Log(EQEmuLogSys::Error, "Invalid size on OP_ShopPlayerSell: Expected %i, Got %i", sizeof(Merchant_Purchase_Struct), app->size); return; } @@ -12524,7 +12524,7 @@ void Client::Handle_OP_ShopPlayerSell(const EQApplicationPacket *app) void Client::Handle_OP_ShopRequest(const EQApplicationPacket *app) { if (app->size != sizeof(Merchant_Click_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_ShopRequest, size=%i, expected %i", app->size, sizeof(Merchant_Click_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_ShopRequest, size=%i, expected %i", app->size, sizeof(Merchant_Click_Struct)); return; } @@ -12817,7 +12817,7 @@ void Client::Handle_OP_SpawnAppearance(const EQApplicationPacket *app) void Client::Handle_OP_Split(const EQApplicationPacket *app) { if (app->size != sizeof(Split_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_Split, size=%i, expected %i", app->size, sizeof(Split_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_Split, size=%i, expected %i", app->size, sizeof(Split_Struct)); return; } // The client removes the money on its own, but we have to @@ -12944,7 +12944,7 @@ void Client::Handle_OP_SwapSpell(const EQApplicationPacket *app) void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app) { if (app->size != sizeof(ClientTarget_Struct)) { - logger.Log(EQEmuLogSys::Error,"OP size error: OP_TargetMouse expected:%i got:%i", sizeof(ClientTarget_Struct), app->size); + logger.Log(EQEmuLogSys::Error, "OP size error: OP_TargetMouse expected:%i got:%i", sizeof(ClientTarget_Struct), app->size); return; } @@ -13222,7 +13222,7 @@ void Client::Handle_OP_Track(const EQApplicationPacket *app) CheckIncreaseSkill(SkillTracking, nullptr, 15); if (!entity_list.MakeTrackPacket(this)) - logger.Log(EQEmuLogSys::Error,"Unable to generate OP_Track packet requested by client."); + logger.Log(EQEmuLogSys::Error, "Unable to generate OP_Track packet requested by client."); return; } @@ -13236,7 +13236,7 @@ void Client::Handle_OP_TrackTarget(const EQApplicationPacket *app) if (app->size != sizeof(TrackTarget_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for OP_TrackTarget: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for OP_TrackTarget: Expected: %i, Got: %i", sizeof(TrackTarget_Struct), app->size); return; } @@ -13389,7 +13389,7 @@ void Client::Handle_OP_TradeAcceptClick(const EQApplicationPacket *app) void Client::Handle_OP_TradeBusy(const EQApplicationPacket *app) { if (app->size != sizeof(TradeBusy_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_TradeBusy, size=%i, expected %i", app->size, sizeof(TradeBusy_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_TradeBusy, size=%i, expected %i", app->size, sizeof(TradeBusy_Struct)); return; } // Trade request recipient is cancelling the trade due to being busy @@ -13535,7 +13535,7 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app) _log(TRADING__CLIENT, "Client::Handle_OP_Trader: Unknown TraderStruct code of: %i\n", ints->Code); - logger.Log(EQEmuLogSys::Error,"Unknown TraderStruct code of: %i\n", ints->Code); + logger.Log(EQEmuLogSys::Error, "Unknown TraderStruct code of: %i\n", ints->Code); } } @@ -13545,7 +13545,7 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app) } else { _log(TRADING__CLIENT, "Unknown size for OP_Trader: %i\n", app->size); - logger.Log(EQEmuLogSys::Error,"Unknown size for OP_Trader: %i\n", app->size); + logger.Log(EQEmuLogSys::Error, "Unknown size for OP_Trader: %i\n", app->size); DumpPacket(app); return; } @@ -13583,7 +13583,7 @@ void Client::Handle_OP_TraderBuy(const EQApplicationPacket *app) void Client::Handle_OP_TradeRequest(const EQApplicationPacket *app) { if (app->size != sizeof(TradeRequest_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_TradeRequest, size=%i, expected %i", app->size, sizeof(TradeRequest_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_TradeRequest, size=%i, expected %i", app->size, sizeof(TradeRequest_Struct)); return; } // Client requesting a trade session from an npc/client @@ -13619,7 +13619,7 @@ void Client::Handle_OP_TradeRequest(const EQApplicationPacket *app) void Client::Handle_OP_TradeRequestAck(const EQApplicationPacket *app) { if (app->size != sizeof(TradeRequest_Struct)) { - logger.Log(EQEmuLogSys::Error,"Wrong size: OP_TradeRequestAck, size=%i, expected %i", app->size, sizeof(TradeRequest_Struct)); + logger.Log(EQEmuLogSys::Error, "Wrong size: OP_TradeRequestAck, size=%i, expected %i", app->size, sizeof(TradeRequest_Struct)); return; } // Trade request recipient is acknowledging they are able to trade @@ -13690,7 +13690,7 @@ void Client::Handle_OP_TraderShop(const EQApplicationPacket *app) void Client::Handle_OP_TradeSkillCombine(const EQApplicationPacket *app) { if (app->size != sizeof(NewCombine_Struct)) { - logger.Log(EQEmuLogSys::Error,"Invalid size for NewCombine_Struct: Expected: %i, Got: %i", + logger.Log(EQEmuLogSys::Error, "Invalid size for NewCombine_Struct: Expected: %i, Got: %i", sizeof(NewCombine_Struct), app->size); return; } @@ -13829,7 +13829,7 @@ void Client::Handle_OP_TributeToggle(const EQApplicationPacket *app) _pkt(TRIBUTE__IN, app); if (app->size != sizeof(uint32)) - logger.Log(EQEmuLogSys::Error,"Invalid size on OP_TributeToggle packet"); + logger.Log(EQEmuLogSys::Error, "Invalid size on OP_TributeToggle packet"); else { uint32 *val = (uint32 *)app->pBuffer; ToggleTribute(*val ? true : false); @@ -13844,7 +13844,7 @@ void Client::Handle_OP_TributeUpdate(const EQApplicationPacket *app) //sent when the client changes their tribute settings... if (app->size != sizeof(TributeInfo_Struct)) - logger.Log(EQEmuLogSys::Error,"Invalid size on OP_TributeUpdate packet"); + logger.Log(EQEmuLogSys::Error, "Invalid size on OP_TributeUpdate packet"); else { TributeInfo_Struct *t = (TributeInfo_Struct *)app->pBuffer; ChangeTributeSettings(t); diff --git a/zone/command.cpp b/zone/command.cpp index f5b4419a0..5fc9e2a9f 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -496,7 +496,7 @@ int command_add(const char *command_string, const char *desc, int access, CmdFun std::string cstr(command_string); if(commandlist.count(cstr) != 0) { - logger.Log(EQEmuLogSys::Error,"command_add() - Command '%s' is a duplicate - check command.cpp." , command_string); + logger.Log(EQEmuLogSys::Error, "command_add() - Command '%s' is a duplicate - check command.cpp." , command_string); return(-1); } @@ -575,7 +575,7 @@ int command_realdispatch(Client *c, const char *message) #endif if(cur->function == nullptr) { - logger.Log(EQEmuLogSys::Error,"Command '%s' has a null function\n", cstr.c_str()); + logger.Log(EQEmuLogSys::Error, "Command '%s' has a null function\n", cstr.c_str()); return(-1); } else { //dispatch C++ command diff --git a/zone/corpse.cpp b/zone/corpse.cpp index f6a193bc9..ec4503476 100644 --- a/zone/corpse.cpp +++ b/zone/corpse.cpp @@ -875,7 +875,7 @@ bool Corpse::Process() { logger.LogDebug(EQEmuLogSys::General, "Tagged %s player corpse has burried.", this->GetName()); } else { - logger.Log(EQEmuLogSys::Error,"Unable to bury %s player corpse.", this->GetName()); + logger.Log(EQEmuLogSys::Error, "Unable to bury %s player corpse.", this->GetName()); return true; } } diff --git a/zone/effects.cpp b/zone/effects.cpp index bd1fa7a54..861d6bd14 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -461,7 +461,7 @@ bool Client::TrainDiscipline(uint32 itemid) { const Item_Struct *item = database.GetItem(itemid); if(item == nullptr) { Message(13, "Unable to find the tome you turned in!"); - logger.Log(EQEmuLogSys::Error,"Unable to find turned in tome id %lu\n", (unsigned long)itemid); + logger.Log(EQEmuLogSys::Error, "Unable to find turned in tome id %lu\n", (unsigned long)itemid); return(false); } diff --git a/zone/embparser_api.cpp b/zone/embparser_api.cpp index 1a51ede27..e44fcf6a0 100644 --- a/zone/embparser_api.cpp +++ b/zone/embparser_api.cpp @@ -3519,7 +3519,7 @@ EXTERN_C XS(boot_quest) file[255] = '\0'; if(items != 1) - logger.Log(EQEmuLogSys::Error,"boot_quest does not take any arguments."); + logger.Log(EQEmuLogSys::Error, "boot_quest does not take any arguments."); char buf[128]; //shouldent have any function names longer than this. diff --git a/zone/embxs.cpp b/zone/embxs.cpp index 33cc53377..784f8b1ba 100644 --- a/zone/embxs.cpp +++ b/zone/embxs.cpp @@ -64,7 +64,7 @@ EXTERN_C XS(boot_qc) file[255] = '\0'; if(items != 1) - logger.Log(EQEmuLogSys::Error,"boot_qc does not take any arguments."); + logger.Log(EQEmuLogSys::Error, "boot_qc does not take any arguments."); char buf[128]; //shouldent have any function names longer than this. diff --git a/zone/entity.cpp b/zone/entity.cpp index c2d19d11a..0712d252b 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -371,7 +371,7 @@ void EntityList::CheckGroupList (const char *fname, const int fline) { if (*it == nullptr) { - logger.Log(EQEmuLogSys::Error,"nullptr group, %s:%i", fname, fline); + logger.Log(EQEmuLogSys::Error, "nullptr group, %s:%i", fname, fline); } } } @@ -520,12 +520,12 @@ void EntityList::MobProcess() zone->StartShutdownTimer(); Group *g = GetGroupByMob(mob); if(g) { - logger.Log(EQEmuLogSys::Error,"About to delete a client still in a group."); + logger.Log(EQEmuLogSys::Error, "About to delete a client still in a group."); g->DelMember(mob); } Raid *r = entity_list.GetRaidByClient(mob->CastToClient()); if(r) { - logger.Log(EQEmuLogSys::Error,"About to delete a client still in a raid."); + logger.Log(EQEmuLogSys::Error, "About to delete a client still in a raid."); r->MemberZoned(mob->CastToClient()); } entity_list.RemoveClient(id); @@ -2509,7 +2509,7 @@ char *EntityList::MakeNameUnique(char *name) return name; } } - logger.Log(EQEmuLogSys::Error,"Fatal error in EntityList::MakeNameUnique: Unable to find unique name for '%s'", name); + logger.Log(EQEmuLogSys::Error, "Fatal error in EntityList::MakeNameUnique: Unable to find unique name for '%s'", name); char tmp[64] = "!"; strn0cpy(&tmp[1], name, sizeof(tmp) - 1); strcpy(name, tmp); diff --git a/zone/forage.cpp b/zone/forage.cpp index 64318ec48..e30dd7b0a 100644 --- a/zone/forage.cpp +++ b/zone/forage.cpp @@ -59,7 +59,7 @@ uint32 ZoneDatabase::GetZoneForage(uint32 ZoneID, uint8 skill) { "LIMIT %i", ZoneID, skill, FORAGE_ITEM_LIMIT); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Forage query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Forage query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } @@ -70,7 +70,7 @@ uint32 ZoneDatabase::GetZoneForage(uint32 ZoneID, uint8 skill) { item[index] = atoi(row[0]); chance[index] = atoi(row[1]) + chancepool; - logger.Log(EQEmuLogSys::Error,"Possible Forage: %d with a %d chance", item[index], chance[index]); + logger.Log(EQEmuLogSys::Error, "Possible Forage: %d with a %d chance", item[index], chance[index]); chancepool = chance[index]; } @@ -389,7 +389,7 @@ void Client::ForageItem(bool guarantee) { const Item_Struct* food_item = database.GetItem(foragedfood); if(!food_item) { - logger.Log(EQEmuLogSys::Error,"nullptr returned from database.GetItem in ClientForageItem"); + logger.Log(EQEmuLogSys::Error, "nullptr returned from database.GetItem in ClientForageItem"); return; } diff --git a/zone/groups.cpp b/zone/groups.cpp index dfd36602b..eca2884e5 100644 --- a/zone/groups.cpp +++ b/zone/groups.cpp @@ -1069,7 +1069,7 @@ bool Group::LearnMembers() { return false; if (results.RowCount() == 0) { - logger.Log(EQEmuLogSys::Error,"Error getting group members for group %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error getting group members for group %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str()); return false; } @@ -1457,7 +1457,7 @@ void Group::DelegateMainTank(const char *NewMainTankName, uint8 toggle) MainTankName.c_str(), GetID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to set group main tank: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to set group main tank: %s\n", results.ErrorMessage().c_str()); } } @@ -1503,7 +1503,7 @@ void Group::DelegateMainAssist(const char *NewMainAssistName, uint8 toggle) MainAssistName.c_str(), GetID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to set group main assist: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to set group main assist: %s\n", results.ErrorMessage().c_str()); } } @@ -1550,7 +1550,7 @@ void Group::DelegatePuller(const char *NewPullerName, uint8 toggle) PullerName.c_str(), GetID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to set group main puller: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to set group main puller: %s\n", results.ErrorMessage().c_str()); } @@ -1701,7 +1701,7 @@ void Group::UnDelegateMainTank(const char *OldMainTankName, uint8 toggle) std::string query = StringFormat("UPDATE group_leaders SET maintank = '' WHERE gid = %i LIMIT 1", GetID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to clear group main tank: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to clear group main tank: %s\n", results.ErrorMessage().c_str()); if(!toggle) { for(uint32 i = 0; i < MAX_GROUP_MEMBERS; ++i) { @@ -1750,7 +1750,7 @@ void Group::UnDelegateMainAssist(const char *OldMainAssistName, uint8 toggle) std::string query = StringFormat("UPDATE group_leaders SET assist = '' WHERE gid = %i LIMIT 1", GetID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to clear group main assist: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to clear group main assist: %s\n", results.ErrorMessage().c_str()); if(!toggle) { @@ -1778,7 +1778,7 @@ void Group::UnDelegatePuller(const char *OldPullerName, uint8 toggle) std::string query = StringFormat("UPDATE group_leaders SET puller = '' WHERE gid = %i LIMIT 1", GetID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to clear group main puller: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to clear group main puller: %s\n", results.ErrorMessage().c_str()); if(!toggle) { for(uint32 i = 0; i < MAX_GROUP_MEMBERS; ++i) { @@ -1861,7 +1861,7 @@ void Group::SetGroupMentor(int percent, char *name) mentoree_name.c_str(), mentor_percent, GetID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to set group mentor: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to set group mentor: %s\n", results.ErrorMessage().c_str()); } void Group::ClearGroupMentor() @@ -1872,7 +1872,7 @@ void Group::ClearGroupMentor() std::string query = StringFormat("UPDATE group_leaders SET mentoree = '', mentor_percent = 0 WHERE gid = %i LIMIT 1", GetID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to clear group mentor: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to clear group mentor: %s\n", results.ErrorMessage().c_str()); } void Group::NotifyAssistTarget(Client *c) @@ -1942,7 +1942,7 @@ void Group::DelegateMarkNPC(const char *NewNPCMarkerName) NewNPCMarkerName, GetID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to set group mark npc: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to set group mark npc: %s\n", results.ErrorMessage().c_str()); } void Group::NotifyMarkNPC(Client *c) @@ -2023,7 +2023,7 @@ void Group::UnDelegateMarkNPC(const char *OldNPCMarkerName) std::string query = StringFormat("UPDATE group_leaders SET marknpc = '' WHERE gid = %i LIMIT 1", GetID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to clear group marknpc: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to clear group marknpc: %s\n", results.ErrorMessage().c_str()); } @@ -2040,7 +2040,7 @@ void Group::SaveGroupLeaderAA() safe_delete_array(queryBuffer); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str()); } diff --git a/zone/guild.cpp b/zone/guild.cpp index fcc57bc86..392ac8e48 100644 --- a/zone/guild.cpp +++ b/zone/guild.cpp @@ -413,7 +413,7 @@ bool ZoneDatabase::CheckGuildDoor(uint8 doorid, uint16 guild_id, const char* zon doorid-128, zone); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in CheckGuildDoor query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in CheckGuildDoor query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -433,7 +433,7 @@ bool ZoneDatabase::SetGuildDoor(uint8 doorid,uint16 guild_id, const char* zone) guild_id, doorid, zone); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in SetGuildDoor query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in SetGuildDoor query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } diff --git a/zone/horse.cpp b/zone/horse.cpp index 98b9ab91e..f5574f8ea 100644 --- a/zone/horse.cpp +++ b/zone/horse.cpp @@ -73,12 +73,12 @@ const NPCType *Horse::BuildHorseType(uint16 spell_id) { std::string query = StringFormat("SELECT race, gender, texture, mountspeed FROM horses WHERE filename = '%s'", fileName); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Mount query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Mount query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return nullptr; } if (results.RowCount() != 1) { - logger.Log(EQEmuLogSys::Error,"No Database entry for mount: %s, check the horses table", fileName); + logger.Log(EQEmuLogSys::Error, "No Database entry for mount: %s, check the horses table", fileName); return nullptr; } @@ -121,7 +121,7 @@ void Client::SummonHorse(uint16 spell_id) { return; } if(!Horse::IsHorseSpell(spell_id)) { - logger.Log(EQEmuLogSys::Error,"%s tried to summon an unknown horse, spell id %d", GetName(), spell_id); + logger.Log(EQEmuLogSys::Error, "%s tried to summon an unknown horse, spell id %d", GetName(), spell_id); return; } diff --git a/zone/inventory.cpp b/zone/inventory.cpp index a934a56ae..d1b3d3ba0 100644 --- a/zone/inventory.cpp +++ b/zone/inventory.cpp @@ -533,7 +533,7 @@ bool Client::SummonItem(uint32 item_id, int16 charges, uint32 aug1, uint32 aug2, if(inst == nullptr) { Message(13, "An unknown server error has occurred and your item was not created."); // this goes to logfile since this is a major error - logger.Log(EQEmuLogSys::Error,"Player %s on account %s encountered an unknown item creation error.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n", + logger.Log(EQEmuLogSys::Error, "Player %s on account %s encountered an unknown item creation error.\n(Item: %u, Aug1: %u, Aug2: %u, Aug3: %u, Aug4: %u, Aug5: %u, Aug6: %u)\n", GetName(), account_name, item->ID, aug1, aug2, aug3, aug4, aug5, aug6); return false; @@ -1443,7 +1443,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { //verify shared bank transactions in the database if(src_inst && src_slot_id >= EmuConstants::SHARED_BANK_BEGIN && src_slot_id <= EmuConstants::SHARED_BANK_BAGS_END) { if(!database.VerifyInventory(account_id, src_slot_id, src_inst)) { - logger.Log(EQEmuLogSys::Error,"Player %s on account %s was found exploiting the shared bank.\n", GetName(), account_name); + logger.Log(EQEmuLogSys::Error, "Player %s on account %s was found exploiting the shared bank.\n", GetName(), account_name); DeleteItemInInventory(dst_slot_id,0,true); return(false); } @@ -1458,7 +1458,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) { } if(dst_inst && dst_slot_id >= EmuConstants::SHARED_BANK_BEGIN && dst_slot_id <= EmuConstants::SHARED_BANK_BAGS_END) { if(!database.VerifyInventory(account_id, dst_slot_id, dst_inst)) { - logger.Log(EQEmuLogSys::Error,"Player %s on account %s was found exploting the shared bank.\n", GetName(), account_name); + logger.Log(EQEmuLogSys::Error, "Player %s on account %s was found exploting the shared bank.\n", GetName(), account_name); DeleteItemInInventory(src_slot_id,0,true); return(false); } diff --git a/zone/merc.cpp b/zone/merc.cpp index a6143c83c..0d9a225f2 100644 --- a/zone/merc.cpp +++ b/zone/merc.cpp @@ -4451,7 +4451,7 @@ bool Merc::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, boo { if (!other) { SetTarget(nullptr); - logger.Log(EQEmuLogSys::Error,"A null Mob object was passed to Merc::Attack() for evaluation!"); + logger.Log(EQEmuLogSys::Error, "A null Mob object was passed to Merc::Attack() for evaluation!"); return false; } @@ -5986,7 +5986,7 @@ void NPC::LoadMercTypes() { auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in NPC::LoadMercTypes()"); + logger.Log(EQEmuLogSys::Error, "Error in NPC::LoadMercTypes()"); return; } @@ -6019,7 +6019,7 @@ void NPC::LoadMercs() { if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in NPC::LoadMercTypes()"); + logger.Log(EQEmuLogSys::Error, "Error in NPC::LoadMercTypes()"); return; } diff --git a/zone/net.cpp b/zone/net.cpp index d451521df..c339e393f 100644 --- a/zone/net.cpp +++ b/zone/net.cpp @@ -625,7 +625,7 @@ void LoadSpells(EQEmu::MemoryMappedFile **mmf) { spells = reinterpret_cast((*mmf)->Get()); mutex.Unlock(); } catch(std::exception &ex) { - logger.Log(EQEmuLogSys::Error,"Error loading spells: %s", ex.what()); + logger.Log(EQEmuLogSys::Error, "Error loading spells: %s", ex.what()); return; } diff --git a/zone/npc.cpp b/zone/npc.cpp index 516d5b3d6..c95f4e417 100644 --- a/zone/npc.cpp +++ b/zone/npc.cpp @@ -508,7 +508,7 @@ void NPC::QueryLoot(Client* to) for(ItemList::iterator cur = itemlist.begin(); cur != itemlist.end(); ++cur, ++x) { const Item_Struct* item = database.GetItem((*cur)->item_id); if (item == nullptr) { - logger.Log(EQEmuLogSys::Error,"Database error, invalid item"); + logger.Log(EQEmuLogSys::Error, "Database error, invalid item"); continue; } @@ -1004,7 +1004,7 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char* zone, uint32 zone_version,C spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); return false; } npc_type_id = results.LastInsertedID(); @@ -1021,7 +1021,7 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char* zone, uint32 zone_version,C spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); return false; } npc_type_id = results.LastInsertedID(); @@ -1033,7 +1033,7 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char* zone, uint32 zone_version,C query = StringFormat("INSERT INTO spawngroup (id, name) VALUES(%i, '%s-%s')", 0, zone, spawn->GetName()); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); return false; } uint32 spawngroupid = results.LastInsertedID(); @@ -1047,7 +1047,7 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char* zone, uint32 zone_version,C spawn->GetHeading(), spawngroupid); results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -1058,7 +1058,7 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char* zone, uint32 zone_version,C spawngroupid, npc_type_id, 100); results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -1075,7 +1075,7 @@ uint32 ZoneDatabase::AddNewNPCSpawnGroupCommand(const char* zone, uint32 zone_ve zone, spawn->GetName(), Timer::GetCurrentTime()); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } last_insert_id = results.LastInsertedID(); @@ -1098,7 +1098,7 @@ uint32 ZoneDatabase::AddNewNPCSpawnGroupCommand(const char* zone, uint32 zone_ve spawn->GetHeading(), last_insert_id); results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } spawnid = results.LastInsertedID(); @@ -1110,7 +1110,7 @@ uint32 ZoneDatabase::AddNewNPCSpawnGroupCommand(const char* zone, uint32 zone_ve last_insert_id, spawn->GetNPCTypeID(), 100); results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } diff --git a/zone/object.cpp b/zone/object.cpp index 9545caf19..b2632bc2c 100644 --- a/zone/object.cpp +++ b/zone/object.cpp @@ -336,7 +336,7 @@ const ItemInst* Object::GetItem(uint8 index) { void Object::PutItem(uint8 index, const ItemInst* inst) { if (index > 9) { - logger.Log(EQEmuLogSys::Error,"Object::PutItem: Invalid index specified (%i)", index); + logger.Log(EQEmuLogSys::Error, "Object::PutItem: Invalid index specified (%i)", index); return; } @@ -598,7 +598,7 @@ uint32 ZoneDatabase::AddObject(uint32 type, uint32 icon, const Object_Struct& ob safe_delete_array(object_name); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Unable to insert object: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to insert object: %s", results.ErrorMessage().c_str()); return 0; } @@ -635,7 +635,7 @@ void ZoneDatabase::UpdateObject(uint32 id, uint32 type, uint32 icon, const Objec safe_delete_array(object_name); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Unable to update object: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to update object: %s", results.ErrorMessage().c_str()); return; } @@ -680,7 +680,7 @@ void ZoneDatabase::DeleteObject(uint32 id) std::string query = StringFormat("DELETE FROM object WHERE id = %i", id); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Unable to delete object: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to delete object: %s", results.ErrorMessage().c_str()); } } diff --git a/zone/pathing.cpp b/zone/pathing.cpp index f5e1603e8..c5cd26e68 100644 --- a/zone/pathing.cpp +++ b/zone/pathing.cpp @@ -66,14 +66,14 @@ PathManager* PathManager::LoadPathFile(const char* ZoneName) } else { - logger.Log(EQEmuLogSys::Error,"Path File %s failed to load.", ZonePathFileName); + logger.Log(EQEmuLogSys::Error, "Path File %s failed to load.", ZonePathFileName); safe_delete(Ret); } fclose(PathFile); } else { - logger.Log(EQEmuLogSys::Error,"Path File %s not found.", ZonePathFileName); + logger.Log(EQEmuLogSys::Error, "Path File %s not found.", ZonePathFileName); } return Ret; @@ -103,7 +103,7 @@ bool PathManager::loadPaths(FILE *PathFile) if(strncmp(Magic, "EQEMUPATH", 9)) { - logger.Log(EQEmuLogSys::Error,"Bad Magic String in .path file."); + logger.Log(EQEmuLogSys::Error, "Bad Magic String in .path file."); return false; } @@ -114,7 +114,7 @@ bool PathManager::loadPaths(FILE *PathFile) if(Head.version != 2) { - logger.Log(EQEmuLogSys::Error,"Unsupported path file version."); + logger.Log(EQEmuLogSys::Error, "Unsupported path file version."); return false; } @@ -138,7 +138,7 @@ bool PathManager::loadPaths(FILE *PathFile) { if(PathNodes[i].Neighbours[j].id > MaxNodeID) { - logger.Log(EQEmuLogSys::Error,"Path Node %i, Neighbour %i (%i) out of range.", i, j, PathNodes[i].Neighbours[j].id); + logger.Log(EQEmuLogSys::Error, "Path Node %i, Neighbour %i (%i) out of range.", i, j, PathNodes[i].Neighbours[j].id); PathFileValid = false; } diff --git a/zone/petitions.cpp b/zone/petitions.cpp index b0932bccb..1ef3c85b0 100644 --- a/zone/petitions.cpp +++ b/zone/petitions.cpp @@ -213,7 +213,7 @@ void ZoneDatabase::DeletePetitionFromDB(Petition* wpet) { std::string query = StringFormat("DELETE FROM petitions WHERE petid = %i", wpet->GetID()); auto results = QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in DeletePetitionFromDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in DeletePetitionFromDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); } @@ -227,7 +227,7 @@ void ZoneDatabase::UpdatePetitionToDB(Petition* wpet) { wpet->CheckedOut() ? 1: 0, wpet->GetID()); auto results = QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in UpdatePetitionToDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in UpdatePetitionToDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); } @@ -254,7 +254,7 @@ void ZoneDatabase::InsertPetitionToDB(Petition* wpet) safe_delete_array(petitiontext); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in InsertPetitionToDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in InsertPetitionToDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -273,7 +273,7 @@ void ZoneDatabase::RefreshPetitionsFromDB() "FROM petitions ORDER BY petid"; auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in RefreshPetitionsFromDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in RefreshPetitionsFromDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return; } diff --git a/zone/pets.cpp b/zone/pets.cpp index b75670ad0..5cc236176 100644 --- a/zone/pets.cpp +++ b/zone/pets.cpp @@ -243,7 +243,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, PetRecord record; if(!database.GetPoweredPetEntry(pettype, act_power, &record)) { Message(13, "Unable to find data for pet %s", pettype); - logger.Log(EQEmuLogSys::Error,"Unable to find data for pet %s, check pets table.", pettype); + logger.Log(EQEmuLogSys::Error, "Unable to find data for pet %s, check pets table.", pettype); return; } @@ -251,7 +251,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, const NPCType *base = database.GetNPCType(record.npc_type); if(base == nullptr) { Message(13, "Unable to load NPC data for pet %s", pettype); - logger.Log(EQEmuLogSys::Error,"Unable to load NPC data for pet %s (NPC ID %d), check pets and npc_types tables.", pettype, record.npc_type); + logger.Log(EQEmuLogSys::Error, "Unable to load NPC data for pet %s (NPC ID %d), check pets and npc_types tables.", pettype, record.npc_type); return; } @@ -372,7 +372,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, auto results = database.QueryDatabase(query); if (!results.Success()) { // if the database query failed - logger.Log(EQEmuLogSys::Error,"Error querying database for monster summoning pet in zone %s (%s)", zone->GetShortName(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error querying database for monster summoning pet in zone %s (%s)", zone->GetShortName(), results.ErrorMessage().c_str()); } if (results.RowCount() != 0) { @@ -395,7 +395,7 @@ void Mob::MakePoweredPet(uint16 spell_id, const char* pettype, int16 petpower, npc_type->helmtexture = monster->helmtexture; npc_type->herosforgemodel = monster->herosforgemodel; } else - logger.Log(EQEmuLogSys::Error,"Error loading NPC data for monster summoning pet (NPC ID %d)", monsterid); + logger.Log(EQEmuLogSys::Error, "Error loading NPC data for monster summoning pet (NPC ID %d)", monsterid); } @@ -456,7 +456,7 @@ bool ZoneDatabase::GetPoweredPetEntry(const char *pet_type, int16 petpower, PetR pet_type, petpower); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetPoweredPetEntry query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetPoweredPetEntry query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -656,13 +656,13 @@ bool ZoneDatabase::GetBasePetItems(int32 equipmentset, uint32 *items) { std::string query = StringFormat("SELECT nested_set FROM pets_equipmentset WHERE set_id = '%s'", curset); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetBasePetItems query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetBasePetItems query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } if (results.RowCount() != 1) { // invalid set reference, it doesn't exist - logger.Log(EQEmuLogSys::Error,"Error in GetBasePetItems equipment set '%d' does not exist", curset); + logger.Log(EQEmuLogSys::Error, "Error in GetBasePetItems equipment set '%d' does not exist", curset); return false; } @@ -672,7 +672,7 @@ bool ZoneDatabase::GetBasePetItems(int32 equipmentset, uint32 *items) { query = StringFormat("SELECT slot, item_id FROM pets_equipmentset_entries WHERE set_id='%s'", curset); results = QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in GetBasePetItems query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetBasePetItems query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); else { for (row = results.begin(); row != results.end(); ++row) { diff --git a/zone/questmgr.cpp b/zone/questmgr.cpp index 09fce9c70..cca186924 100644 --- a/zone/questmgr.cpp +++ b/zone/questmgr.cpp @@ -2641,7 +2641,7 @@ const char* QuestManager::saylink(char* Phrase, bool silent, const char* LinkNam std::string insert_query = StringFormat("INSERT INTO `saylink` (`phrase`) VALUES ('%s')", escaped_string); results = database.QueryDatabase(insert_query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in saylink phrase queries", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in saylink phrase queries", results.ErrorMessage().c_str()); } else { results = database.QueryDatabase(query); if (results.Success()) { @@ -2649,7 +2649,7 @@ const char* QuestManager::saylink(char* Phrase, bool silent, const char* LinkNam for(auto row = results.begin(); row != results.end(); ++row) sayid = atoi(row[0]); } else { - logger.Log(EQEmuLogSys::Error,"Error in saylink phrase queries", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in saylink phrase queries", results.ErrorMessage().c_str()); } } } diff --git a/zone/raids.cpp b/zone/raids.cpp index 17b000ff4..3f68f2270 100644 --- a/zone/raids.cpp +++ b/zone/raids.cpp @@ -99,7 +99,7 @@ void Raid::AddMember(Client *c, uint32 group, bool rleader, bool groupleader, bo auto results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error inserting into raid members: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error inserting into raid members: %s", results.ErrorMessage().c_str()); } LearnMembers(); @@ -233,12 +233,12 @@ void Raid::SetRaidLeader(const char *wasLead, const char *name) std::string query = StringFormat("UPDATE raid_members SET israidleader = 0 WHERE name = '%s'", wasLead); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Set Raid Leader error: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Set Raid Leader error: %s\n", results.ErrorMessage().c_str()); query = StringFormat("UPDATE raid_members SET israidleader = 1 WHERE name = '%s'", name); results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Set Raid Leader error: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Set Raid Leader error: %s\n", results.ErrorMessage().c_str()); strn0cpy(leadername, name, 64); @@ -271,7 +271,7 @@ void Raid::SaveGroupLeaderAA(uint32 gid) safe_delete_array(queryBuffer); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str()); } void Raid::SaveRaidLeaderAA() @@ -285,7 +285,7 @@ void Raid::SaveRaidLeaderAA() safe_delete_array(queryBuffer); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str()); } void Raid::UpdateGroupAAs(uint32 gid) @@ -1407,7 +1407,7 @@ void Raid::GetRaidDetails() return; if (results.RowCount() == 0) { - logger.Log(EQEmuLogSys::Error,"Error getting raid details for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error getting raid details for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str()); return; } @@ -1439,7 +1439,7 @@ bool Raid::LearnMembers() return false; if(results.RowCount() == 0) { - logger.Log(EQEmuLogSys::Error,"Error getting raid members for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error getting raid members for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str()); disbandCheck = true; return false; } @@ -1643,7 +1643,7 @@ void Raid::SetGroupMentor(uint32 group_id, int percent, char *name) name, percent, group_id, GetID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to set raid group mentor: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to set raid group mentor: %s\n", results.ErrorMessage().c_str()); } void Raid::ClearGroupMentor(uint32 group_id) @@ -1658,7 +1658,7 @@ void Raid::ClearGroupMentor(uint32 group_id) group_id, GetID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to clear raid group mentor: %s\n", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to clear raid group mentor: %s\n", results.ErrorMessage().c_str()); } // there isn't a nice place to add this in another function, unlike groups diff --git a/zone/spawn2.cpp b/zone/spawn2.cpp index e5f955e95..5a4f9b998 100644 --- a/zone/spawn2.cpp +++ b/zone/spawn2.cpp @@ -364,7 +364,7 @@ bool ZoneDatabase::PopulateZoneSpawnList(uint32 zoneid, LinkedList &spa zone_name, version); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in PopulateZoneLists query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in PopulateZoneLists query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -392,12 +392,12 @@ Spawn2* ZoneDatabase::LoadSpawn2(LinkedList &spawn2_list, uint32 spawn2 "WHERE id = %i", spawn2id); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return nullptr; } if (results.RowCount() != 1) { - logger.Log(EQEmuLogSys::Error,"Error in LoadSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return nullptr; } @@ -424,7 +424,7 @@ bool ZoneDatabase::CreateSpawn2(Client *client, uint32 spawngroup, const char* z respawn, variance, condition, cond_value); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in CreateSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in CreateSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -674,7 +674,7 @@ void SpawnConditionManager::UpdateDBEvent(SpawnEvent &event) { event.strict? 1: 0, event.id); auto results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to update spawn event '%s': %s\n", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to update spawn event '%s': %s\n", query.c_str(), results.ErrorMessage().c_str()); } @@ -686,7 +686,7 @@ void SpawnConditionManager::UpdateDBCondition(const char* zone_name, uint32 inst cond_id, value, zone_name, instance_id); auto results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"Unable to update spawn condition '%s': %s\n", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to update spawn condition '%s': %s\n", query.c_str(), results.ErrorMessage().c_str()); } @@ -699,7 +699,7 @@ bool SpawnConditionManager::LoadDBEvent(uint32 event_id, SpawnEvent &event, std: "FROM spawn_events WHERE id = %d", event_id); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadDBEvent query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadDBEvent query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -742,7 +742,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in "WHERE zone = '%s'", zone_name); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadSpawnConditions query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadSpawnConditions query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -764,7 +764,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in zone_name, instance_id); results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadSpawnConditions query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadSpawnConditions query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); spawn_conditions.clear(); return false; } @@ -782,7 +782,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in "FROM spawn_events WHERE zone = '%s'", zone_name); results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadSpawnConditions events query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadSpawnConditions events query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -794,7 +794,7 @@ bool SpawnConditionManager::LoadSpawnConditions(const char* zone_name, uint32 in event.period = atoi(row[2]); if(event.period == 0) { - logger.Log(EQEmuLogSys::Error,"Refusing to load spawn event #%d because it has a period of 0\n", event.id); + logger.Log(EQEmuLogSys::Error, "Refusing to load spawn event #%d because it has a period of 0\n", event.id); continue; } diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 2203b1be4..a6dd26cbc 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -1772,7 +1772,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial) } else { Message_StringID(4, TARGET_NOT_FOUND); - logger.Log(EQEmuLogSys::Error,"%s attempted to cast spell id %u with spell effect SE_SummonCorpse, but could not cast target into a Client object.", GetCleanName(), spell_id); + logger.Log(EQEmuLogSys::Error, "%s attempted to cast spell id %u with spell effect SE_SummonCorpse, but could not cast target into a Client object.", GetCleanName(), spell_id); } } diff --git a/zone/spells.cpp b/zone/spells.cpp index 5b6c88551..3f7d622b8 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -258,7 +258,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot, if ((itm->GetItem()->Click.Type == ET_EquipClick) && !(itm->GetItem()->Classes & bitmask)) { if (CastToClient()->GetClientVersion() < EQClientSoF) { // They are casting a spell from an item that requires equipping but shouldn't let them equip it - logger.Log(EQEmuLogSys::Error,"HACKER: %s (account: %s) attempted to click an equip-only effect on item %s (id: %d) which they shouldn't be able to equip!", + logger.Log(EQEmuLogSys::Error, "HACKER: %s (account: %s) attempted to click an equip-only effect on item %s (id: %d) which they shouldn't be able to equip!", CastToClient()->GetCleanName(), CastToClient()->AccountName(), itm->GetItem()->Name, itm->GetItem()->ID); database.SetHackerFlag(CastToClient()->AccountName(), CastToClient()->GetCleanName(), "Clicking equip-only item with an invalid class"); } @@ -270,7 +270,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot, if ((itm->GetItem()->Click.Type == ET_ClickEffect2) && !(itm->GetItem()->Classes & bitmask)) { if (CastToClient()->GetClientVersion() < EQClientSoF) { // They are casting a spell from an item that they don't meet the race/class requirements to cast - logger.Log(EQEmuLogSys::Error,"HACKER: %s (account: %s) attempted to click a race/class restricted effect on item %s (id: %d) which they shouldn't be able to click!", + logger.Log(EQEmuLogSys::Error, "HACKER: %s (account: %s) attempted to click a race/class restricted effect on item %s (id: %d) which they shouldn't be able to click!", CastToClient()->GetCleanName(), CastToClient()->AccountName(), itm->GetItem()->Name, itm->GetItem()->ID); database.SetHackerFlag(CastToClient()->AccountName(), CastToClient()->GetCleanName(), "Clicking race/class restricted item with an invalid class"); } @@ -291,7 +291,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot, if( itm && (itm->GetItem()->Click.Type == ET_EquipClick) && !(item_slot <= MainAmmo || item_slot == MainPowerSource) ){ if (CastToClient()->GetClientVersion() < EQClientSoF) { // They are attempting to cast a must equip clicky without having it equipped - logger.Log(EQEmuLogSys::Error,"HACKER: %s (account: %s) attempted to click an equip-only effect on item %s (id: %d) without equiping it!", CastToClient()->GetCleanName(), CastToClient()->AccountName(), itm->GetItem()->Name, itm->GetItem()->ID); + logger.Log(EQEmuLogSys::Error, "HACKER: %s (account: %s) attempted to click an equip-only effect on item %s (id: %d) without equiping it!", CastToClient()->GetCleanName(), CastToClient()->AccountName(), itm->GetItem()->Name, itm->GetItem()->ID); database.SetHackerFlag(CastToClient()->AccountName(), CastToClient()->GetCleanName(), "Clicking equip-only item without equiping it"); } else { @@ -4963,7 +4963,7 @@ bool Client::SpellGlobalCheck(uint16 spell_ID, uint32 char_ID) { "WHERE spellid = %i", spell_ID); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error while querying Spell ID %i spell_globals table query '%s': %s", spell_ID, query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error while querying Spell ID %i spell_globals table query '%s': %s", spell_ID, query.c_str(), results.ErrorMessage().c_str()); return false; // Query failed, so prevent spell from scribing just in case } @@ -4982,12 +4982,12 @@ bool Client::SpellGlobalCheck(uint16 spell_ID, uint32 char_ID) { char_ID, spell_Global_Name.c_str()); results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Spell ID %i query of spell_globals with Name: '%s' Value: '%i' failed", spell_ID, spell_Global_Name.c_str(), spell_Global_Value); + logger.Log(EQEmuLogSys::Error, "Spell ID %i query of spell_globals with Name: '%s' Value: '%i' failed", spell_ID, spell_Global_Name.c_str(), spell_Global_Value); return false; } if (results.RowCount() != 1) { - logger.Log(EQEmuLogSys::Error,"Char ID: %i does not have the Qglobal Name: '%s' for Spell ID %i", char_ID, spell_Global_Name.c_str(), spell_ID); + logger.Log(EQEmuLogSys::Error, "Char ID: %i does not have the Qglobal Name: '%s' for Spell ID %i", char_ID, spell_Global_Name.c_str(), spell_ID); return false; } @@ -5001,7 +5001,7 @@ bool Client::SpellGlobalCheck(uint16 spell_ID, uint32 char_ID) { return true; // Check if the qglobal value is greater than the require spellglobal value // If no matching result found in qglobals, don't scribe this spell - logger.Log(EQEmuLogSys::Error,"Char ID: %i Spell_globals Name: '%s' Value: '%i' did not match QGlobal Value: '%i' for Spell ID %i", char_ID, spell_Global_Name.c_str(), spell_Global_Value, global_Value, spell_ID); + logger.Log(EQEmuLogSys::Error, "Char ID: %i Spell_globals Name: '%s' Value: '%i' did not match QGlobal Value: '%i' for Spell ID %i", char_ID, spell_Global_Name.c_str(), spell_Global_Value, global_Value, spell_ID); return false; } diff --git a/zone/tasks.cpp b/zone/tasks.cpp index 15ae8666e..3433842b2 100644 --- a/zone/tasks.cpp +++ b/zone/tasks.cpp @@ -74,7 +74,7 @@ bool TaskManager::LoadTaskSets() { MAXTASKSETS, MAXTASKS); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Error in TaskManager::LoadTaskSets: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadTaskSets: %s", results.ErrorMessage().c_str()); return false; } @@ -146,7 +146,7 @@ bool TaskManager::LoadTasks(int singleTask) { auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,ERR_MYSQLERROR, results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); return false; } @@ -155,7 +155,7 @@ bool TaskManager::LoadTasks(int singleTask) { if((taskID <= 0) || (taskID >= MAXTASKS)) { // This shouldn't happen, as the SELECT is bounded by MAXTASKS - logger.Log(EQEmuLogSys::Error,"[TASKS]Task ID %i out of range while loading tasks from database", taskID); + logger.Log(EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading tasks from database", taskID); continue; } @@ -203,7 +203,7 @@ bool TaskManager::LoadTasks(int singleTask) { "ORDER BY taskid, activityid ASC", singleTask, MAXACTIVITIESPERTASK); results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,ERR_MYSQLERROR, results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); return false; } @@ -215,13 +215,13 @@ bool TaskManager::LoadTasks(int singleTask) { if((taskID <= 0) || (taskID >= MAXTASKS) || (activityID < 0) || (activityID >= MAXACTIVITIESPERTASK)) { // This shouldn't happen, as the SELECT is bounded by MAXTASKS - logger.Log(EQEmuLogSys::Error,"[TASKS]Task or Activity ID (%i, %i) out of range while loading " + logger.Log(EQEmuLogSys::Error, "[TASKS]Task or Activity ID (%i, %i) out of range while loading " "activities from database", taskID, activityID); continue; } if(Tasks[taskID]==nullptr) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Activity for non-existent task (%i, %i) while loading activities from database", taskID, activityID); + logger.Log(EQEmuLogSys::Error, "[TASKS]Activity for non-existent task (%i, %i) while loading activities from database", taskID, activityID); continue; } @@ -238,7 +238,7 @@ bool TaskManager::LoadTasks(int singleTask) { // ERR_NOTASK errors. // Change to (activityID != (Tasks[taskID]->ActivityCount + 1)) to index from 1 if(activityID != Tasks[taskID]->ActivityCount) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Activities for Task %i are not sequential starting at 0. Not loading task.", taskID, activityID); + logger.Log(EQEmuLogSys::Error, "[TASKS]Activities for Task %i are not sequential starting at 0. Not loading task.", taskID, activityID); Tasks[taskID] = nullptr; continue; } @@ -323,7 +323,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) { characterID, taskID, task, state->ActiveTasks[task].AcceptedTime); auto results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,ERR_MYSQLERROR, results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); else state->ActiveTasks[task].Updated = false; @@ -362,7 +362,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) { auto results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,ERR_MYSQLERROR, results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); continue; } @@ -396,7 +396,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) { std::string query = StringFormat(completedTaskQuery, characterID, state->CompletedTasks[i].CompletedTime, taskID, -1); auto results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,ERR_MYSQLERROR, results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); continue; } @@ -413,7 +413,7 @@ bool TaskManager::SaveClientState(Client *c, ClientTaskState *state) { query = StringFormat(completedTaskQuery, characterID, state->CompletedTasks[i].CompletedTime, taskID, j); results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,ERR_MYSQLERROR, results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str()); } @@ -466,7 +466,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { "WHERE `charid` = %i ORDER BY acceptedtime", characterID); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Error in TaskManager::LoadClientState load Tasks: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load Tasks: %s", results.ErrorMessage().c_str()); return false; } @@ -475,17 +475,17 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { int slot = atoi(row[1]); if((taskID<0) || (taskID>=MAXTASKS)) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Task ID %i out of range while loading character tasks from database", taskID); + logger.Log(EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading character tasks from database", taskID); continue; } if((slot<0) || (slot>=MAXACTIVETASKS)) { - logger.Log(EQEmuLogSys::Error,"[TASKS] Slot %i out of range while loading character tasks from database", slot); + logger.Log(EQEmuLogSys::Error, "[TASKS] Slot %i out of range while loading character tasks from database", slot); continue; } if(state->ActiveTasks[slot].TaskID != TASKSLOTEMPTY) { - logger.Log(EQEmuLogSys::Error,"[TASKS] Slot %i for Task %is is already occupied.", slot, taskID); + logger.Log(EQEmuLogSys::Error, "[TASKS] Slot %i for Task %is is already occupied.", slot, taskID); continue; } @@ -513,20 +513,20 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { "ORDER BY `taskid` ASC, `activityid` ASC", characterID); results = database.QueryDatabase(query); if (!results.Success()){ - logger.Log(EQEmuLogSys::Error,"[TASKS]Error in TaskManager::LoadClientState load Activities: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load Activities: %s", results.ErrorMessage().c_str()); return false; } for (auto row = results.begin(); row != results.end(); ++row) { int taskID = atoi(row[0]); if((taskID<0) || (taskID>=MAXTASKS)) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Task ID %i out of range while loading character activities from database", taskID); + logger.Log(EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading character activities from database", taskID); continue; } int activityID = atoi(row[1]); if((activityID<0) || (activityID>=MAXACTIVITIESPERTASK)) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Activity ID %i out of range while loading character activities from database", activityID); + logger.Log(EQEmuLogSys::Error, "[TASKS]Activity ID %i out of range while loading character activities from database", activityID); continue; } @@ -540,7 +540,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { } if(activeTaskIndex == -1) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Activity %i found for task %i which client does not have.", activityID, taskID); + logger.Log(EQEmuLogSys::Error, "[TASKS]Activity %i found for task %i which client does not have.", activityID, taskID); continue; } @@ -566,7 +566,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { characterID); results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Error in TaskManager::LoadClientState load completed tasks: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load completed tasks: %s", results.ErrorMessage().c_str()); return false; } @@ -582,7 +582,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { int taskID = atoi(row[0]); if((taskID <= 0) || (taskID >=MAXTASKS)) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Task ID %i out of range while loading completed tasks from database", taskID); + logger.Log(EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading completed tasks from database", taskID); continue; } @@ -592,7 +592,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { // completed. int activityID = atoi(row[1]); if((activityID<-1) || (activityID>=MAXACTIVITIESPERTASK)) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Activity ID %i out of range while loading completed tasks from database", activityID); + logger.Log(EQEmuLogSys::Error, "[TASKS]Activity ID %i out of range while loading completed tasks from database", activityID); continue; } @@ -634,7 +634,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { characterID, MAXTASKS); results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"[TASKS]Error in TaskManager::LoadClientState load enabled tasks: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load enabled tasks: %s", results.ErrorMessage().c_str()); else for (auto row = results.begin(); row != results.end(); ++row) { int taskID = atoi(row[0]); @@ -652,7 +652,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { c->Message(13, "Active Task Slot %i, references a task (%i), that does not exist. " "Removing from memory. Contact a GM to resolve this.",i, taskID); - logger.Log(EQEmuLogSys::Error,"[TASKS]Character %i has task %i which does not exist.", characterID, taskID); + logger.Log(EQEmuLogSys::Error, "[TASKS]Character %i has task %i which does not exist.", characterID, taskID); state->ActiveTasks[i].TaskID=TASKSLOTEMPTY; continue; @@ -664,7 +664,7 @@ bool TaskManager::LoadClientState(Client *c, ClientTaskState *state) { "Removing from memory. Contact a GM to resolve this.", taskID, Tasks[taskID]->Title); - logger.Log(EQEmuLogSys::Error,"[TASKS]Fatal error in character %i task state. Activity %i for " + logger.Log(EQEmuLogSys::Error, "[TASKS]Fatal error in character %i task state. Activity %i for " "Task %i either missing from client state or from task.", characterID, j, taskID); state->ActiveTasks[i].TaskID=TASKSLOTEMPTY; break; @@ -725,7 +725,7 @@ void ClientTaskState::EnableTask(int characterID, int taskCount, int *tasks) { _log(TASKS__UPDATE, "Executing query %s", query.c_str()); auto results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"[TASKS]Error in ClientTaskState::EnableTask %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "[TASKS]Error in ClientTaskState::EnableTask %s %s", query.c_str(), results.ErrorMessage().c_str()); } @@ -774,7 +774,7 @@ void ClientTaskState::DisableTask(int charID, int taskCount, int *taskList) { _log(TASKS__UPDATE, "Executing query %s", query.c_str()); auto results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"[TASKS]Error in ClientTaskState::DisableTask %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "[TASKS]Error in ClientTaskState::DisableTask %s %s", query.c_str(), results.ErrorMessage().c_str()); } bool ClientTaskState::IsTaskEnabled(int TaskID) { @@ -1280,7 +1280,7 @@ static void DeleteCompletedTaskFromDatabase(int charID, int taskID) { const std::string query = StringFormat("DELETE FROM completed_tasks WHERE charid=%i AND taskid = %i", charID, taskID); auto results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Error in CientTaskState::CancelTask %s, %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "[TASKS]Error in CientTaskState::CancelTask %s, %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -2938,7 +2938,7 @@ void ClientTaskState::RemoveTask(Client *c, int sequenceNumber) { characterID, ActiveTasks[sequenceNumber].TaskID); auto results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"[TASKS]Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "[TASKS]Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str()); return; } _log(TASKS__UPDATE, "CancelTask: %s", query.c_str()); @@ -2947,7 +2947,7 @@ void ClientTaskState::RemoveTask(Client *c, int sequenceNumber) { characterID, ActiveTasks[sequenceNumber].TaskID); results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"[TASKS]Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "[TASKS]Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str()); _log(TASKS__UPDATE, "CancelTask: %s", query.c_str()); @@ -3088,7 +3088,7 @@ bool TaskGoalListManager::LoadLists() { "ORDER BY `listid`"; auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,ERR_MYSQLERROR, query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -3122,7 +3122,7 @@ bool TaskGoalListManager::LoadLists() { listID, size); results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,ERR_MYSQLERROR, query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, query.c_str(), results.ErrorMessage().c_str()); TaskGoalLists[listIndex].Size = 0; continue; } @@ -3259,7 +3259,7 @@ bool TaskProximityManager::LoadProximities(int zoneID) { "ORDER BY `zoneid` ASC", zoneID); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in TaskProximityManager::LoadProximities %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in TaskProximityManager::LoadProximities %s %s", query.c_str(), results.ErrorMessage().c_str()); return false; } diff --git a/zone/titles.cpp b/zone/titles.cpp index 389e7f6ca..d90c63f6e 100644 --- a/zone/titles.cpp +++ b/zone/titles.cpp @@ -40,7 +40,7 @@ bool TitleManager::LoadTitles() "`status`, `item_id`, `prefix`, `suffix`, `title_set` FROM titles"; auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Unable to load titles: %s : %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Unable to load titles: %s : %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -263,7 +263,7 @@ void TitleManager::CreateNewPlayerTitle(Client *client, const char *title) safe_delete_array(escTitle); results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error adding title: %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error adding title: %s %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -296,7 +296,7 @@ void TitleManager::CreateNewPlayerSuffix(Client *client, const char *suffix) safe_delete_array(escSuffix); results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error adding title suffix: %s %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error adding title suffix: %s %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -351,7 +351,7 @@ void Client::EnableTitle(int titleSet) { CharacterID(), titleSet); auto results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in EnableTitle query for titleset %i and charid %i", titleSet, CharacterID()); + logger.Log(EQEmuLogSys::Error, "Error in EnableTitle query for titleset %i and charid %i", titleSet, CharacterID()); } @@ -362,7 +362,7 @@ bool Client::CheckTitle(int titleSet) { titleSet, CharacterID()); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in CheckTitle query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in CheckTitle query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -382,7 +382,7 @@ void Client::RemoveTitle(int titleSet) { titleSet, CharacterID()); auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in RemoveTitle query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in RemoveTitle query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); } diff --git a/zone/tradeskills.cpp b/zone/tradeskills.cpp index c56a070b0..399935dd1 100644 --- a/zone/tradeskills.cpp +++ b/zone/tradeskills.cpp @@ -42,7 +42,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme { if (!user || !in_augment) { - logger.Log(EQEmuLogSys::Error,"Client or AugmentItem_Struct not set in Object::HandleAugmentation"); + logger.Log(EQEmuLogSys::Error, "Client or AugmentItem_Struct not set in Object::HandleAugmentation"); return; } @@ -89,7 +89,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme if(!container) { - logger.Log(EQEmuLogSys::Error,"Player tried to augment an item without a container set."); + logger.Log(EQEmuLogSys::Error, "Player tried to augment an item without a container set."); user->Message(13, "Error: This item is not a container!"); return; } @@ -243,7 +243,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Object *worldo) { if (!user || !in_combine) { - logger.Log(EQEmuLogSys::Error,"Client or NewCombine_Struct not set in Object::HandleCombine"); + logger.Log(EQEmuLogSys::Error, "Client or NewCombine_Struct not set in Object::HandleCombine"); return; } @@ -418,7 +418,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob if(success && spec.replace_container) { if(worldcontainer){ //should report this error, but we dont have the recipe ID, so its not very useful - logger.Log(EQEmuLogSys::Error,"Replace container combine executed in a world container."); + logger.Log(EQEmuLogSys::Error, "Replace container combine executed in a world container."); } else user->DeleteItemInInventory(in_combine->container_slot, 0, true); @@ -444,7 +444,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac //ask the database for the recipe to make sure it exists... DBTradeskillRecipe_Struct spec; if (!database.GetTradeRecipe(rac->recipe_id, rac->object_type, rac->some_id, user->CharacterID(), &spec)) { - logger.Log(EQEmuLogSys::Error,"Unknown recipe for HandleAutoCombine: %u\n", rac->recipe_id); + logger.Log(EQEmuLogSys::Error, "Unknown recipe for HandleAutoCombine: %u\n", rac->recipe_id); user->QueuePacket(outapp); safe_delete(outapp); return; @@ -467,21 +467,21 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac rac->recipe_id); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in HandleAutoCombine query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in HandleAutoCombine query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); user->QueuePacket(outapp); safe_delete(outapp); return; } if(results.RowCount() < 1) { - logger.Log(EQEmuLogSys::Error,"Error in HandleAutoCombine: no components returned"); + logger.Log(EQEmuLogSys::Error, "Error in HandleAutoCombine: no components returned"); user->QueuePacket(outapp); safe_delete(outapp); return; } if(results.RowCount() > 10) { - logger.Log(EQEmuLogSys::Error,"Error in HandleAutoCombine: too many components returned (%u)", results.RowCount()); + logger.Log(EQEmuLogSys::Error, "Error in HandleAutoCombine: too many components returned (%u)", results.RowCount()); user->QueuePacket(outapp); safe_delete(outapp); return; @@ -676,7 +676,7 @@ void Client::TradeskillSearchResults(const std::string query, unsigned long objt auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in TradeskillSearchResults query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in TradeskillSearchResults query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -684,7 +684,7 @@ void Client::TradeskillSearchResults(const std::string query, unsigned long objt return; //search gave no results... not an error if(results.ColumnCount() != 6) { - logger.Log(EQEmuLogSys::Error,"Error in TradeskillSearchResults query '%s': Invalid column count in result", query.c_str()); + logger.Log(EQEmuLogSys::Error, "Error in TradeskillSearchResults query '%s': Invalid column count in result", query.c_str()); return; } @@ -730,17 +730,17 @@ void Client::SendTradeskillDetails(uint32 recipe_id) { recipe_id); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in SendTradeskillDetails query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in SendTradeskillDetails query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return; } if(results.RowCount() < 1) { - logger.Log(EQEmuLogSys::Error,"Error in SendTradeskillDetails: no components returned"); + logger.Log(EQEmuLogSys::Error, "Error in SendTradeskillDetails: no components returned"); return; } if(results.RowCount() > 10) { - logger.Log(EQEmuLogSys::Error,"Error in SendTradeskillDetails: too many components returned (%u)", results.RowCount()); + logger.Log(EQEmuLogSys::Error, "Error in SendTradeskillDetails: too many components returned (%u)", results.RowCount()); return; } @@ -1232,8 +1232,8 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3 buf2.c_str(), containers.c_str(), count, sum); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetTradeRecipe search, query: %s", query.c_str()); - logger.Log(EQEmuLogSys::Error,"Error in GetTradeRecipe search, error: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe search, query: %s", query.c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe search, error: %s", results.ErrorMessage().c_str()); return false; } @@ -1254,7 +1254,7 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3 //length limit on buf2 if(index == 214) { //Maximum number of recipe matches (19 * 215 = 4096) - logger.Log(EQEmuLogSys::Error,"GetTradeRecipe warning: Too many matches. Unable to search all recipe entries. Searched %u of %u possible entries.", index + 1, results.RowCount()); + logger.Log(EQEmuLogSys::Error, "GetTradeRecipe warning: Too many matches. Unable to search all recipe entries. Searched %u of %u possible entries.", index + 1, results.RowCount()); break; } } @@ -1266,8 +1266,8 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3 "AND sum(tre.item_id * tre.componentcount) = %u", buf2.c_str(), count, sum); results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetTradeRecipe, re-query: %s", query.c_str()); - logger.Log(EQEmuLogSys::Error,"Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe, re-query: %s", query.c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str()); return false; } } @@ -1292,18 +1292,18 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3 "AND tre.item_id = %u;", buf2.c_str(), containerId); results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetTradeRecipe, re-query: %s", query.c_str()); - logger.Log(EQEmuLogSys::Error,"Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe, re-query: %s", query.c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str()); return false; } if(results.RowCount() == 0) { //Recipe contents matched more than 1 recipe, but not in this container - logger.Log(EQEmuLogSys::Error,"Combine error: Incorrect container is being used!"); + logger.Log(EQEmuLogSys::Error, "Combine error: Incorrect container is being used!"); return false; } if (results.RowCount() > 1) //Recipe contents matched more than 1 recipe in this container - logger.Log(EQEmuLogSys::Error,"Combine error: Recipe is not unique! %u matches found for container %u. Continuing with first recipe match.", results.RowCount(), containerId); + logger.Log(EQEmuLogSys::Error, "Combine error: Recipe is not unique! %u matches found for container %u. Continuing with first recipe match.", results.RowCount(), containerId); } @@ -1320,7 +1320,7 @@ bool ZoneDatabase::GetTradeRecipe(const ItemInst* container, uint8 c_type, uint3 recipe_id); results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in tradeskill verify query: '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in tradeskill verify query: '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return GetTradeRecipe(recipe_id, c_type, some_id, char_id, spec); } @@ -1375,8 +1375,8 @@ bool ZoneDatabase::GetTradeRecipe(uint32 recipe_id, uint8 c_type, uint32 some_id char_id, (unsigned long)recipe_id, containers.c_str()); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetTradeRecipe, query: %s", query.c_str()); - logger.Log(EQEmuLogSys::Error,"Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe, query: %s", query.c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str()); return false; } @@ -1407,12 +1407,12 @@ bool ZoneDatabase::GetTradeRecipe(uint32 recipe_id, uint8 c_type, uint32 some_id "WHERE successcount > 0 AND recipe_id = %u", recipe_id); results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetTradeRecept success query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetTradeRecept success query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } if(results.RowCount() < 1) { - logger.Log(EQEmuLogSys::Error,"Error in GetTradeRecept success: no success items returned"); + logger.Log(EQEmuLogSys::Error, "Error in GetTradeRecept success: no success items returned"); return false; } @@ -1464,7 +1464,7 @@ void ZoneDatabase::UpdateRecipeMadecount(uint32 recipe_id, uint32 char_id, uint3 recipe_id, char_id, madeCount, madeCount); auto results = QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in UpdateRecipeMadecount query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in UpdateRecipeMadecount query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); } void Client::LearnRecipe(uint32 recipeID) @@ -1477,7 +1477,7 @@ void Client::LearnRecipe(uint32 recipeID) "WHERE tr.id = %u ;", CharacterID(), recipeID); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Client::LearnRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Client::LearnRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -1503,7 +1503,7 @@ void Client::LearnRecipe(uint32 recipeID) recipeID, CharacterID()); results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in LearnRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LearnRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); } @@ -1553,7 +1553,7 @@ bool ZoneDatabase::EnableRecipe(uint32 recipe_id) "WHERE id = %u;", recipe_id); auto results = QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in EnableRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in EnableRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return results.RowsAffected() > 0; } @@ -1564,7 +1564,7 @@ bool ZoneDatabase::DisableRecipe(uint32 recipe_id) "WHERE id = %u;", recipe_id); auto results = QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in DisableRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in DisableRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return results.RowsAffected() > 0; } diff --git a/zone/trading.cpp b/zone/trading.cpp index 4a8450204..fa3c8783f 100644 --- a/zone/trading.cpp +++ b/zone/trading.cpp @@ -1539,7 +1539,7 @@ void Client::BuyTraderItem(TraderBuy_Struct* tbs,Client* Trader,const EQApplicat if((tbs->Price * outtbs->Quantity) <= 0) { Message(13, "Internal error. Aborting trade. Please report this to the ServerOP. Error code is 1"); Trader->Message(13, "Internal error. Aborting trade. Please report this to the ServerOP. Error code is 1"); - logger.Log(EQEmuLogSys::Error,"Bazaar: Zero price transaction between %s and %s aborted." + logger.Log(EQEmuLogSys::Error, "Bazaar: Zero price transaction between %s and %s aborted." "Item: %s, Charges: %i, TBS: Qty %i, Price: %i", GetName(), Trader->GetName(), BuyItem->GetItem()->Name, BuyItem->GetCharges(), tbs->Quantity, tbs->Price); diff --git a/zone/trap.cpp b/zone/trap.cpp index 42995265f..6f8132c3c 100644 --- a/zone/trap.cpp +++ b/zone/trap.cpp @@ -270,7 +270,7 @@ bool ZoneDatabase::LoadTraps(const char* zonename, int16 version) { "FROM traps WHERE zone='%s' AND version=%u", zonename, version); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadTraps query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadTraps query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } diff --git a/zone/tribute.cpp b/zone/tribute.cpp index 961be18f9..c9d5877c2 100644 --- a/zone/tribute.cpp +++ b/zone/tribute.cpp @@ -220,7 +220,7 @@ void Client::ChangeTributeSettings(TributeInfo_Struct *t) { void Client::SendTributeDetails(uint32 client_id, uint32 tribute_id) { if(tribute_list.count(tribute_id) != 1) { - logger.Log(EQEmuLogSys::Error,"Details request for invalid tribute %lu", (unsigned long)tribute_id); + logger.Log(EQEmuLogSys::Error, "Details request for invalid tribute %lu", (unsigned long)tribute_id); return; } TributeData &td = tribute_list[tribute_id]; @@ -390,7 +390,7 @@ bool ZoneDatabase::LoadTributes() { const std::string query = "SELECT id, name, descr, unknown, isguild FROM tributes"; auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadTributes first query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadTributes first query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -407,7 +407,7 @@ bool ZoneDatabase::LoadTributes() { const std::string query2 = "SELECT tribute_id, level, cost, item_id FROM tribute_levels ORDER BY tribute_id, level"; results = QueryDatabase(query2); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadTributes level query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadTributes level query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -415,14 +415,14 @@ bool ZoneDatabase::LoadTributes() { uint32 id = atoul(row[0]); if(tribute_list.count(id) != 1) { - logger.Log(EQEmuLogSys::Error,"Error in LoadTributes: unknown tribute %lu in tribute_levels", (unsigned long)id); + logger.Log(EQEmuLogSys::Error, "Error in LoadTributes: unknown tribute %lu in tribute_levels", (unsigned long)id); continue; } TributeData &cur = tribute_list[id]; if(cur.tier_count >= MAX_TRIBUTE_TIERS) { - logger.Log(EQEmuLogSys::Error,"Error in LoadTributes: on tribute %lu: more tiers defined than permitted", (unsigned long)id); + logger.Log(EQEmuLogSys::Error, "Error in LoadTributes: on tribute %lu: more tiers defined than permitted", (unsigned long)id); continue; } diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 82d0893a5..203deacfa 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -116,7 +116,7 @@ void NPC::ResumeWandering() } else { - logger.Log(EQEmuLogSys::Error,"NPC not paused - can't resume wandering: %lu", (unsigned long)GetNPCTypeID()); + logger.Log(EQEmuLogSys::Error, "NPC not paused - can't resume wandering: %lu", (unsigned long)GetNPCTypeID()); return; } @@ -131,7 +131,7 @@ void NPC::ResumeWandering() } else { - logger.Log(EQEmuLogSys::Error,"NPC not on grid - can't resume wandering: %lu", (unsigned long)GetNPCTypeID()); + logger.Log(EQEmuLogSys::Error, "NPC not on grid - can't resume wandering: %lu", (unsigned long)GetNPCTypeID()); } return; } @@ -154,7 +154,7 @@ void NPC::PauseWandering(int pausetime) AIwalking_timer->Start(pausetime*1000); // set the timer } } else { - logger.Log(EQEmuLogSys::Error,"NPC not on grid - can't pause wandering: %lu", (unsigned long)GetNPCTypeID()); + logger.Log(EQEmuLogSys::Error, "NPC not on grid - can't pause wandering: %lu", (unsigned long)GetNPCTypeID()); } return; } @@ -876,7 +876,7 @@ void NPC::AssignWaypoints(int32 grid) { std::string query = StringFormat("SELECT `type`, `type2` FROM `grid` WHERE `id` = %i AND `zoneid` = %i", grid, zone->GetZoneID()); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"MySQL Error while trying to assign grid %u to mob %s: %s", grid, name, results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "MySQL Error while trying to assign grid %u to mob %s: %s", grid, name, results.ErrorMessage().c_str()); return; } @@ -897,7 +897,7 @@ void NPC::AssignWaypoints(int32 grid) { "ORDER BY `number`", grid, zone->GetZoneID()); results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"MySQL Error while trying to assign waypoints from grid %u to mob %s: %s", grid, name, results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "MySQL Error while trying to assign waypoints from grid %u to mob %s: %s", grid, name, results.ErrorMessage().c_str()); return; } @@ -1011,7 +1011,7 @@ int ZoneDatabase::GetHighestGrid(uint32 zoneid) { std::string query = StringFormat("SELECT COALESCE(MAX(id), 0) FROM grid WHERE zoneid = %i", zoneid); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetHighestGrid query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetHighestGrid query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } @@ -1028,7 +1028,7 @@ uint8 ZoneDatabase::GetGridType2(uint32 grid, uint16 zoneid) { std::string query = StringFormat("SELECT type2 FROM grid WHERE id = %i AND zoneid = %i", grid, zoneid); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetGridType2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetGridType2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } @@ -1049,7 +1049,7 @@ bool ZoneDatabase::GetWaypoints(uint32 grid, uint16 zoneid, uint32 num, wplist* "WHERE gridid = %i AND number = %i AND zoneid = %i", grid, num, zoneid); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetWaypoints query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetWaypoints query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -1078,7 +1078,7 @@ void ZoneDatabase::AssignGrid(Client *client, float x, float y, uint32 grid) zone->GetShortName(), (int)x, (int)y); auto results = QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error querying spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error querying spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -1092,7 +1092,7 @@ void ZoneDatabase::AssignGrid(Client *client, float x, float y, uint32 grid) zone->GetShortName(), x, _GASSIGN_TOLERANCE, y, _GASSIGN_TOLERANCE); results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error querying fuzzy spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error querying fuzzy spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -1122,7 +1122,7 @@ void ZoneDatabase::AssignGrid(Client *client, float x, float y, uint32 grid) results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error updating spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error updating spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -1160,7 +1160,7 @@ void ZoneDatabase::ModifyGrid(Client *client, bool remove, uint32 id, uint8 type "VALUES (%i, %i, %i, %i)", id, zoneid, type, type2); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error creating grid entry '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error creating grid entry '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -1173,14 +1173,14 @@ void ZoneDatabase::ModifyGrid(Client *client, bool remove, uint32 id, uint8 type std::string query = StringFormat("DELETE FROM grid where id=%i", id); auto results = QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error deleting grid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error deleting grid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); else if(client) client->LogSQL(query.c_str()); query = StringFormat("DELETE FROM grid_entries WHERE zoneid = %i AND gridid = %i", zoneid, id); results = QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error deleting grid entries '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error deleting grid entries '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); else if(client) client->LogSQL(query.c_str()); @@ -1196,7 +1196,7 @@ void ZoneDatabase::AddWP(Client *client, uint32 gridid, uint32 wpnum, float xpos gridid, zoneid, wpnum, xpos, ypos, zpos, pause, heading); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error adding waypoint '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error adding waypoint '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -1222,7 +1222,7 @@ void ZoneDatabase::DeleteWaypoint(Client *client, uint32 grid_num, uint32 wp_num grid_num, zoneid, wp_num); auto results = QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error deleting waypoint '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error deleting waypoint '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -1249,7 +1249,7 @@ uint32 ZoneDatabase::AddWPForSpawn(Client *client, uint32 spawn2id, float xpos, auto results = QueryDatabase(query); if (!results.Success()) { // Query error - logger.Log(EQEmuLogSys::Error,"Error setting pathgrid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error setting pathgrid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); return 0; } @@ -1270,14 +1270,14 @@ uint32 ZoneDatabase::AddWPForSpawn(Client *client, uint32 spawn2id, float xpos, grid_num, zoneid, type1, type2); results = QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error adding grid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error adding grid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); else if(client) client->LogSQL(query.c_str()); query = StringFormat("UPDATE spawn2 SET pathgrid = '%i' WHERE id = '%i'", grid_num, spawn2id); results = QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error updating spawn2 pathing '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error updating spawn2 pathing '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); else if(client) client->LogSQL(query.c_str()); } @@ -1289,7 +1289,7 @@ uint32 ZoneDatabase::AddWPForSpawn(Client *client, uint32 spawn2id, float xpos, results = QueryDatabase(query); if(!results.Success()) { // Query error - logger.Log(EQEmuLogSys::Error,"Error getting next waypoint id '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error getting next waypoint id '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); return 0; } @@ -1304,7 +1304,7 @@ uint32 ZoneDatabase::AddWPForSpawn(Client *client, uint32 spawn2id, float xpos, grid_num, zoneid, next_wp_num, xpos, ypos, zpos, pause, heading); results = QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error adding grid entry '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error adding grid entry '%s': '%s'", query.c_str(), results.ErrorMessage().c_str()); else if(client) client->LogSQL(query.c_str()); @@ -1316,7 +1316,7 @@ uint32 ZoneDatabase::GetFreeGrid(uint16 zoneid) { std::string query = StringFormat("SELECT max(id) FROM grid WHERE zoneid = %i", zoneid); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetFreeGrid query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetFreeGrid query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } @@ -1336,7 +1336,7 @@ int ZoneDatabase::GetHighestWaypoint(uint32 zoneid, uint32 gridid) { "WHERE zoneid = %i AND gridid = %i", zoneid, gridid); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetHighestWaypoint query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetHighestWaypoint query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } diff --git a/zone/zone.cpp b/zone/zone.cpp index d7c8ff822..50c857309 100644 --- a/zone/zone.cpp +++ b/zone/zone.cpp @@ -167,7 +167,7 @@ bool Zone::LoadZoneObjects() { zoneid, instanceversion); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error Loading Objects from DB: %s",results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error Loading Objects from DB: %s",results.ErrorMessage().c_str()); return false; } @@ -420,7 +420,7 @@ void Zone::LoadTempMerchantData() { "ORDER BY ml.slot ", GetShortName(), GetInstanceVersion()); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadTempMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadTempMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str()); return; } std::map >::iterator cur; @@ -453,7 +453,7 @@ void Zone::LoadNewMerchantData(uint32 merchantid) { "classes_required, probability FROM merchantlist WHERE merchantid=%d ORDER BY slot", merchantid); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadNewMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadNewMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -547,7 +547,7 @@ void Zone::LoadMercTemplates(){ "`merc_stance_entries` ORDER BY `class_id`, `proficiency_id`, `stance_id`"; auto results = database.QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in ZoneDatabase::LoadMercTemplates()"); + logger.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::LoadMercTemplates()"); else { for (auto row = results.begin(); row != results.end(); ++row) { MercStanceInfo tempMercStanceInfo; @@ -570,7 +570,7 @@ void Zone::LoadMercTemplates(){ "ORDER BY MTyp.race_id, MS.class_id, MTyp.proficiency_id;"; results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in ZoneDatabase::LoadMercTemplates()"); + logger.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::LoadMercTemplates()"); return; } @@ -614,7 +614,7 @@ void Zone::LoadLevelEXPMods(){ const std::string query = "SELECT level, exp_mod, aa_exp_mod FROM level_exp_mods"; auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in ZoneDatabase::LoadEXPLevelMods()"); + logger.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::LoadEXPLevelMods()"); return; } @@ -638,7 +638,7 @@ void Zone::LoadMercSpells(){ "ORDER BY msl.class_id, msl.proficiency_id, msle.spell_type, msle.minlevel, msle.slot;"; auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Zone::LoadMercSpells()"); + logger.Log(EQEmuLogSys::Error, "Error in Zone::LoadMercSpells()"); return; } @@ -737,7 +737,7 @@ void Zone::LoadZoneDoors(const char* zone, int16 version) Door *dlist = new Door[count]; if(!database.LoadDoors(count, dlist, zone, version)) { - logger.Log(EQEmuLogSys::Error,"... Failed to load doors."); + logger.Log(EQEmuLogSys::Error, "... Failed to load doors."); delete[] dlist; return; } @@ -806,7 +806,7 @@ Zone::Zone(uint32 in_zoneid, uint32 in_instanceid, const char* in_short_name) if(GraveYardLoaded) logger.LogDebug(EQEmuLogSys::General, "Loaded a graveyard for zone %s: graveyard zoneid is %u x is %f y is %f z is %f heading is %f.", short_name, graveyard_zoneid(), graveyard_x(), graveyard_y(), graveyard_z(), graveyard_heading()); else - logger.Log(EQEmuLogSys::Error,"Unable to load the graveyard id %i for zone %s.", graveyard_id(), short_name); + logger.Log(EQEmuLogSys::Error, "Unable to load the graveyard id %i for zone %s.", graveyard_id(), short_name); } if (long_name == 0) { long_name = strcpy(new char[18], "Long zone missing"); @@ -901,38 +901,38 @@ bool Zone::Init(bool iStaticZone) { LogFile->write(EQEmuLog::Status, "Loading spawn conditions..."); if(!spawn_conditions.LoadSpawnConditions(short_name, instanceid)) { - logger.Log(EQEmuLogSys::Error,"Loading spawn conditions failed, continuing without them."); + logger.Log(EQEmuLogSys::Error, "Loading spawn conditions failed, continuing without them."); } LogFile->write(EQEmuLog::Status, "Loading static zone points..."); if (!database.LoadStaticZonePoints(&zone_point_list, short_name, GetInstanceVersion())) { - logger.Log(EQEmuLogSys::Error,"Loading static zone points failed."); + logger.Log(EQEmuLogSys::Error, "Loading static zone points failed."); return false; } LogFile->write(EQEmuLog::Status, "Loading spawn groups..."); if (!database.LoadSpawnGroups(short_name, GetInstanceVersion(), &spawn_group_list)) { - logger.Log(EQEmuLogSys::Error,"Loading spawn groups failed."); + logger.Log(EQEmuLogSys::Error, "Loading spawn groups failed."); return false; } LogFile->write(EQEmuLog::Status, "Loading spawn2 points..."); if (!database.PopulateZoneSpawnList(zoneid, spawn2_list, GetInstanceVersion())) { - logger.Log(EQEmuLogSys::Error,"Loading spawn2 points failed."); + logger.Log(EQEmuLogSys::Error, "Loading spawn2 points failed."); return false; } LogFile->write(EQEmuLog::Status, "Loading player corpses..."); if (!database.LoadCharacterCorpses(zoneid, instanceid)) { - logger.Log(EQEmuLogSys::Error,"Loading player corpses failed."); + logger.Log(EQEmuLogSys::Error, "Loading player corpses failed."); return false; } LogFile->write(EQEmuLog::Status, "Loading traps..."); if (!database.LoadTraps(short_name, GetInstanceVersion())) { - logger.Log(EQEmuLogSys::Error,"Loading traps failed."); + logger.Log(EQEmuLogSys::Error, "Loading traps failed."); return false; } @@ -942,13 +942,13 @@ bool Zone::Init(bool iStaticZone) { LogFile->write(EQEmuLog::Status, "Loading ground spawns..."); if (!LoadGroundSpawns()) { - logger.Log(EQEmuLogSys::Error,"Loading ground spawns failed. continuing."); + logger.Log(EQEmuLogSys::Error, "Loading ground spawns failed. continuing."); } LogFile->write(EQEmuLog::Status, "Loading World Objects from DB..."); if (!LoadZoneObjects()) { - logger.Log(EQEmuLogSys::Error,"Loading World Objects failed. continuing."); + logger.Log(EQEmuLogSys::Error, "Loading World Objects failed. continuing."); } //load up the zone's doors (prints inside) @@ -1024,27 +1024,27 @@ void Zone::ReloadStaticData() { LogFile->write(EQEmuLog::Status, "Reloading static zone points..."); zone_point_list.Clear(); if (!database.LoadStaticZonePoints(&zone_point_list, GetShortName(), GetInstanceVersion())) { - logger.Log(EQEmuLogSys::Error,"Loading static zone points failed."); + logger.Log(EQEmuLogSys::Error, "Loading static zone points failed."); } LogFile->write(EQEmuLog::Status, "Reloading traps..."); entity_list.RemoveAllTraps(); if (!database.LoadTraps(GetShortName(), GetInstanceVersion())) { - logger.Log(EQEmuLogSys::Error,"Reloading traps failed."); + logger.Log(EQEmuLogSys::Error, "Reloading traps failed."); } LogFile->write(EQEmuLog::Status, "Reloading ground spawns..."); if (!LoadGroundSpawns()) { - logger.Log(EQEmuLogSys::Error,"Reloading ground spawns failed. continuing."); + logger.Log(EQEmuLogSys::Error, "Reloading ground spawns failed. continuing."); } entity_list.RemoveAllObjects(); LogFile->write(EQEmuLog::Status, "Reloading World Objects from DB..."); if (!LoadZoneObjects()) { - logger.Log(EQEmuLogSys::Error,"Reloading World Objects failed. continuing."); + logger.Log(EQEmuLogSys::Error, "Reloading World Objects failed. continuing."); } entity_list.RemoveAllDoors(); @@ -1072,7 +1072,7 @@ bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id, bool DontLoadDe if(!database.GetZoneCFG(database.GetZoneID(filename), 0, &newzone_data, can_bind, can_combat, can_levitate, can_castoutdoor, is_city, is_hotzone, allow_mercs, zone_type, default_ruleset, &map_name)) { - logger.Log(EQEmuLogSys::Error,"Error loading the Zone Config."); + logger.Log(EQEmuLogSys::Error, "Error loading the Zone Config."); return false; } } @@ -1087,7 +1087,7 @@ bool Zone::LoadZoneCFG(const char* filename, uint16 instance_id, bool DontLoadDe if(!database.GetZoneCFG(database.GetZoneID(filename), 0, &newzone_data, can_bind, can_combat, can_levitate, can_castoutdoor, is_city, is_hotzone, allow_mercs, zone_type, default_ruleset, &map_name)) { - logger.Log(EQEmuLogSys::Error,"Error loading the Zone Config."); + logger.Log(EQEmuLogSys::Error, "Error loading the Zone Config."); return false; } } @@ -1861,7 +1861,7 @@ void Zone::LoadBlockedSpells(uint32 zoneid) blocked_spells = new ZoneSpellsBlocked[totalBS]; if(!database.LoadBlockedSpells(totalBS, blocked_spells, zoneid)) { - logger.Log(EQEmuLogSys::Error,"... Failed to load blocked spells."); + logger.Log(EQEmuLogSys::Error, "... Failed to load blocked spells."); ClearBlockedSpells(); } } @@ -1996,7 +1996,7 @@ void Zone::LoadLDoNTraps() const std::string query = "SELECT id, type, spell_id, skill, locked FROM ldon_trap_templates"; auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Zone::LoadLDoNTraps: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Zone::LoadLDoNTraps: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -2017,7 +2017,7 @@ void Zone::LoadLDoNTrapEntries() const std::string query = "SELECT id, trap_id FROM ldon_trap_entries"; auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Zone::LoadLDoNTrapEntries: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Zone::LoadLDoNTrapEntries: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -2059,7 +2059,7 @@ void Zone::LoadVeteranRewards() "ORDER by claim_id, reward_slot"; auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Zone::LoadVeteranRewards: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Zone::LoadVeteranRewards: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -2105,7 +2105,7 @@ void Zone::LoadAlternateCurrencies() const std::string query = "SELECT id, item_id FROM alternate_currency"; auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Zone::LoadAlternateCurrencies: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Zone::LoadAlternateCurrencies: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -2153,7 +2153,7 @@ void Zone::LoadAdventureFlavor() const std::string query = "SELECT id, text FROM adventure_template_entry_flavor"; auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Zone::LoadAdventureFlavor: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Zone::LoadAdventureFlavor: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -2228,7 +2228,7 @@ void Zone::LoadNPCEmotes(LinkedList* NPCEmoteList) const std::string query = "SELECT emoteid, event_, type, text FROM npc_emotes"; auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Zone::LoadNPCEmotes: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Zone::LoadNPCEmotes: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -2262,7 +2262,7 @@ void Zone::LoadTickItems() const std::string query = "SELECT it_itemid, it_chance, it_level, it_qglobal, it_bagslot FROM item_tick"; auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in Zone::LoadTickItems: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in Zone::LoadTickItems: %s (%s)", query.c_str(), results.ErrorMessage().c_str()); return; } diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 579213d87..1b3f9cec3 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -86,7 +86,7 @@ bool ZoneDatabase::SaveZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct zoneid, instance_id); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in SaveZoneCFG query %s: %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in SaveZoneCFG query %s: %s", query.c_str(), results.ErrorMessage().c_str()); return false; } @@ -112,7 +112,7 @@ bool ZoneDatabase::GetZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct "FROM zone WHERE zoneidnumber = %i AND version = %i", zoneid, instance_id); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetZoneCFG query %s: %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetZoneCFG query %s: %s", query.c_str(), results.ErrorMessage().c_str()); strcpy(*map_filename, "default"); return false; } @@ -201,7 +201,7 @@ void ZoneDatabase::UpdateSpawn2Timeleft(uint32 id, uint16 instance_id, uint32 ti "AND instance_id = %lu",(unsigned long)id, (unsigned long)instance_id); auto results = QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in UpdateTimeLeft query %s: %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in UpdateTimeLeft query %s: %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -212,7 +212,7 @@ void ZoneDatabase::UpdateSpawn2Timeleft(uint32 id, uint16 instance_id, uint32 ti (unsigned long)timeleft, (unsigned long)instance_id); auto results = QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in UpdateTimeLeft query %s: %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in UpdateTimeLeft query %s: %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -225,7 +225,7 @@ uint32 ZoneDatabase::GetSpawnTimeLeft(uint32 id, uint16 instance_id) (unsigned long)id, (unsigned long)zone->GetInstanceID()); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in GetSpawnTimeLeft query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in GetSpawnTimeLeft query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } @@ -255,7 +255,7 @@ void ZoneDatabase::UpdateSpawn2Status(uint32 id, uint8 new_status) std::string query = StringFormat("UPDATE spawn2 SET enabled = %i WHERE id = %lu", new_status, (unsigned long)id); auto results = QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in UpdateSpawn2Status query %s: %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in UpdateSpawn2Status query %s: %s", query.c_str(), results.ErrorMessage().c_str()); } @@ -426,7 +426,7 @@ void ZoneDatabase::GetEventLogs(const char* name,char* target,uint32 account_id, void ZoneDatabase::LoadWorldContainer(uint32 parentid, ItemInst* container) { if (!container) { - logger.Log(EQEmuLogSys::Error,"Programming error: LoadWorldContainer passed nullptr pointer"); + logger.Log(EQEmuLogSys::Error, "Programming error: LoadWorldContainer passed nullptr pointer"); return; } @@ -434,7 +434,7 @@ void ZoneDatabase::LoadWorldContainer(uint32 parentid, ItemInst* container) "FROM object_contents WHERE parentid = %i", parentid); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in DB::LoadWorldContainer: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in DB::LoadWorldContainer: %s", results.ErrorMessage().c_str()); return; } @@ -499,7 +499,7 @@ void ZoneDatabase::SaveWorldContainer(uint32 zone_id, uint32 parent_id, const It augslot[0], augslot[1], augslot[2], augslot[3], augslot[4], augslot[5]); auto results = QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in ZoneDatabase::SaveWorldContainer: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::SaveWorldContainer: %s", results.ErrorMessage().c_str()); } @@ -511,7 +511,7 @@ void ZoneDatabase::DeleteWorldContainer(uint32 parent_id, uint32 zone_id) std::string query = StringFormat("DELETE FROM object_contents WHERE parentid = %i AND zoneid = %i", parent_id, zone_id); auto results = QueryDatabase(query); if (!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error in ZoneDatabase::DeleteWorldContainer: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::DeleteWorldContainer: %s", results.ErrorMessage().c_str()); } @@ -2341,7 +2341,7 @@ void ZoneDatabase::SaveMercBuffs(Merc *merc) { std::string query = StringFormat("DELETE FROM merc_buffs WHERE MercId = %u", merc->GetMercID()); auto results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error While Deleting Merc Buffs before save: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error While Deleting Merc Buffs before save: %s", results.ErrorMessage().c_str()); return; } @@ -2367,7 +2367,7 @@ void ZoneDatabase::SaveMercBuffs(Merc *merc) { buffs[buffCount].caston_z, buffs[buffCount].ExtraDIChance); results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error Saving Merc Buffs: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error Saving Merc Buffs: %s", results.ErrorMessage().c_str()); break; } } @@ -2386,7 +2386,7 @@ void ZoneDatabase::LoadMercBuffs(Merc *merc) { merc->GetMercID()); auto results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error Loading Merc Buffs: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error Loading Merc Buffs: %s", results.ErrorMessage().c_str()); return; } @@ -2431,7 +2431,7 @@ void ZoneDatabase::LoadMercBuffs(Merc *merc) { query = StringFormat("DELETE FROM merc_buffs WHERE MercId = %u", merc->GetMercID()); results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"Error Loading Merc Buffs: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error Loading Merc Buffs: %s", results.ErrorMessage().c_str()); } @@ -2447,14 +2447,14 @@ bool ZoneDatabase::DeleteMerc(uint32 merc_id) { auto results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error Deleting Merc Buffs: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error Deleting Merc Buffs: %s", results.ErrorMessage().c_str()); } query = StringFormat("DELETE FROM mercs WHERE MercID = '%u'", merc_id); results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error Deleting Merc: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error Deleting Merc: %s", results.ErrorMessage().c_str()); return false; } @@ -2472,7 +2472,7 @@ void ZoneDatabase::LoadMercEquipment(Merc *merc) { merc->GetLevel(), merc->GetLevel()); auto results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error Loading Merc Inventory: %s", results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error Loading Merc Inventory: %s", results.ErrorMessage().c_str()); return; } @@ -2646,7 +2646,7 @@ uint8 ZoneDatabase::GroupCount(uint32 groupid) { std::string query = StringFormat("SELECT count(charid) FROM group_id WHERE groupid = %d", groupid); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in ZoneDatabase::GroupCount query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::GroupCount query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } @@ -2665,7 +2665,7 @@ uint8 ZoneDatabase::RaidGroupCount(uint32 raidid, uint32 groupid) { auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in ZoneDatabase::RaidGroupCount query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::RaidGroupCount query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return 0; } @@ -2825,7 +2825,7 @@ void ZoneDatabase::LoadAltCurrencyValues(uint32 char_id, std::mapCharacterID()); auto results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadBuffs query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadBuffs query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -3059,7 +3059,7 @@ void ZoneDatabase::LoadPetInfo(Client *client) { "WHERE `char_id` = %u", client->CharacterID()); auto results = database.QueryDatabase(query); if(!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -3087,7 +3087,7 @@ void ZoneDatabase::LoadPetInfo(Client *client) { "WHERE `char_id` = %u", client->CharacterID()); results = QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -3128,7 +3128,7 @@ void ZoneDatabase::LoadPetInfo(Client *client) { "WHERE `char_id`=%u",client->CharacterID()); results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str()); return; } @@ -3860,7 +3860,7 @@ Corpse* ZoneDatabase::SummonBuriedCharacterCorpses(uint32 char_id, uint32 dest_z NewCorpse->SetDecayTimer(RuleI(Character, CorpseDecayTimeMS)); NewCorpse->Spawn(); if (!UnburyCharacterCorpse(NewCorpse->GetCorpseDBID(), dest_zone_id, dest_instance_id, dest_x, dest_y, dest_z, dest_heading)) - logger.Log(EQEmuLogSys::Error,"Unable to unbury a summoned player corpse for character id %u.", char_id); + logger.Log(EQEmuLogSys::Error, "Unable to unbury a summoned player corpse for character id %u.", char_id); } } @@ -3903,7 +3903,7 @@ bool ZoneDatabase::SummonAllCharacterCorpses(uint32 char_id, uint32 dest_zone_id ++CorpseCount; } else{ - logger.Log(EQEmuLogSys::Error,"Unable to construct a player corpse for character id %u.", char_id); + logger.Log(EQEmuLogSys::Error, "Unable to construct a player corpse for character id %u.", char_id); } } diff --git a/zone/zoning.cpp b/zone/zoning.cpp index d404cf468..1d50ed51d 100644 --- a/zone/zoning.cpp +++ b/zone/zoning.cpp @@ -97,7 +97,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) { CheatDetected(MQZone, zc->x, zc->y, zc->z); Message(13, "Invalid unsolicited zone request."); - logger.Log(EQEmuLogSys::Error,"Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id); + logger.Log(EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id); SendZoneCancel(zc); return; } @@ -129,7 +129,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) { //if we didnt get a zone point, or its to a different zone, //then we assume this is invalid. if(!zone_point || zone_point->target_zone_id != target_zone_id) { - logger.Log(EQEmuLogSys::Error,"Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id); + logger.Log(EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id); CheatDetected(MQGate, zc->x, zc->y, zc->z); SendZoneCancel(zc); return; @@ -160,7 +160,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) { if(target_zone_name == nullptr) { //invalid zone... Message(13, "Invalid target zone ID."); - logger.Log(EQEmuLogSys::Error,"Zoning %s: Unable to get zone name for zone id '%d'.", GetName(), target_zone_id); + logger.Log(EQEmuLogSys::Error, "Zoning %s: Unable to get zone name for zone id '%d'.", GetName(), target_zone_id); SendZoneCancel(zc); return; } @@ -173,7 +173,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) { if(!database.GetSafePoints(target_zone_name, database.GetInstanceVersion(target_instance_id), &safe_x, &safe_y, &safe_z, &minstatus, &minlevel, flag_needed)) { //invalid zone... Message(13, "Invalid target zone while getting safe points."); - logger.Log(EQEmuLogSys::Error,"Zoning %s: Unable to get safe coordinates for zone '%s'.", GetName(), target_zone_name); + logger.Log(EQEmuLogSys::Error, "Zoning %s: Unable to get safe coordinates for zone '%s'.", GetName(), target_zone_name); SendZoneCancel(zc); return; } @@ -253,7 +253,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) { //could not find a valid reason for them to be zoning, stop it. CheatDetected(MQZoneUnknownDest, 0.0, 0.0, 0.0); - logger.Log(EQEmuLogSys::Error,"Zoning %s: Invalid unsolicited zone request to zone id '%s'. Not near a zone point.", GetName(), target_zone_name); + logger.Log(EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%s'. Not near a zone point.", GetName(), target_zone_name); SendZoneCancel(zc); return; default: @@ -288,7 +288,7 @@ void Client::Handle_OP_ZoneChange(const EQApplicationPacket *app) { //we have successfully zoned DoZoneSuccess(zc, target_zone_id, target_instance_id, dest_x, dest_y, dest_z, dest_h, ignorerestrictions); } else { - logger.Log(EQEmuLogSys::Error,"Zoning %s: Rules prevent this char from zoning into '%s'", GetName(), target_zone_name); + logger.Log(EQEmuLogSys::Error, "Zoning %s: Rules prevent this char from zoning into '%s'", GetName(), target_zone_name); SendZoneError(zc, myerror); } } @@ -312,7 +312,7 @@ void Client::SendZoneCancel(ZoneChange_Struct *zc) { void Client::SendZoneError(ZoneChange_Struct *zc, int8 err) { - logger.Log(EQEmuLogSys::Error,"Zone %i is not available because target wasn't found or character insufficent level", zc->zoneID); + logger.Log(EQEmuLogSys::Error, "Zone %i is not available because target wasn't found or character insufficent level", zc->zoneID); SetPortExemption(true); @@ -472,7 +472,7 @@ void Client::ProcessMovePC(uint32 zoneID, uint32 instance_id, float x, float y, ZonePC(zoneID, instance_id, x, y, z, heading, ignorerestrictions, zm); break; default: - logger.Log(EQEmuLogSys::Error,"Client::ProcessMovePC received a reguest to perform an unsupported client zone operation."); + logger.Log(EQEmuLogSys::Error, "Client::ProcessMovePC received a reguest to perform an unsupported client zone operation."); break; } } @@ -550,7 +550,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z SetHeading(heading); break; default: - logger.Log(EQEmuLogSys::Error,"Client::ZonePC() received a reguest to perform an unsupported client zone operation."); + logger.Log(EQEmuLogSys::Error, "Client::ZonePC() received a reguest to perform an unsupported client zone operation."); ReadyToZone = false; break; } @@ -768,7 +768,7 @@ void Client::SetZoneFlag(uint32 zone_id) { std::string query = StringFormat("INSERT INTO zone_flags (charID,zoneID) VALUES(%d,%d)", CharacterID(), zone_id); auto results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"MySQL Error while trying to set zone flag for %s: %s", GetName(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "MySQL Error while trying to set zone flag for %s: %s", GetName(), results.ErrorMessage().c_str()); } void Client::ClearZoneFlag(uint32 zone_id) { @@ -781,7 +781,7 @@ void Client::ClearZoneFlag(uint32 zone_id) { std::string query = StringFormat("DELETE FROM zone_flags WHERE charID=%d AND zoneID=%d", CharacterID(), zone_id); auto results = database.QueryDatabase(query); if(!results.Success()) - logger.Log(EQEmuLogSys::Error,"MySQL Error while trying to clear zone flag for %s: %s", GetName(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "MySQL Error while trying to clear zone flag for %s: %s", GetName(), results.ErrorMessage().c_str()); } @@ -791,7 +791,7 @@ void Client::LoadZoneFlags() { std::string query = StringFormat("SELECT zoneID from zone_flags WHERE charID=%d", CharacterID()); auto results = database.QueryDatabase(query); if (!results.Success()) { - logger.Log(EQEmuLogSys::Error,"MySQL Error while trying to load zone flags for %s: %s", GetName(), results.ErrorMessage().c_str()); + logger.Log(EQEmuLogSys::Error, "MySQL Error while trying to load zone flags for %s: %s", GetName(), results.ErrorMessage().c_str()); return; }