Consolidate 'LogType' Error logs over to 'LogCategory'

This commit is contained in:
Akkadius 2015-01-18 01:30:25 -06:00
parent b3fc0ab06d
commit e691735a2d
61 changed files with 594 additions and 594 deletions

View File

@ -40,20 +40,20 @@ int main(int argc, char **argv) {
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Client Files Export Utility");
if(!EQEmuConfig::LoadConfig()) {
Log.Log(EQEmuLogSys::Error, "Unable to load configuration file.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load configuration file.");
return 1;
}
const EQEmuConfig *config = EQEmuConfig::get();
if(!load_log_settings(config->LogSettingsFile.c_str())) {
Log.Log(EQEmuLogSys::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str());
}
SharedDatabase database;
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Connecting to database...");
if(!database.Connect(config->DatabaseHost.c_str(), config->DatabaseUsername.c_str(),
config->DatabasePassword.c_str(), config->DatabaseDB.c_str(), config->DatabasePort)) {
Log.Log(EQEmuLogSys::Error, "Unable to connect to the database, cannot continue without a "
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to connect to the database, cannot continue without a "
"database connection");
return 1;
}
@ -70,7 +70,7 @@ void ExportSpells(SharedDatabase *db) {
FILE *f = fopen("export/spells_us.txt", "w");
if(!f) {
Log.Log(EQEmuLogSys::Error, "Unable to open export/spells_us.txt to write, skipping.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to open export/spells_us.txt to write, skipping.");
return;
}
@ -94,7 +94,7 @@ void ExportSpells(SharedDatabase *db) {
fprintf(f, "%s\n", line.c_str());
}
} else {
Log.Log(EQEmuLogSys::Error, "Error in ExportSpells query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ExportSpells query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
}
fclose(f);
@ -108,7 +108,7 @@ bool SkillUsable(SharedDatabase *db, int skill_id, int class_id) {
class_id, skill_id);
auto results = db->QueryDatabase(query);
if(!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in skill_usable query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in skill_usable query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -128,7 +128,7 @@ int GetSkill(SharedDatabase *db, int skill_id, int class_id, int level) {
class_id, skill_id, level);
auto results = db->QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in get_skill query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in get_skill query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return 0;
}
@ -144,7 +144,7 @@ void ExportSkillCaps(SharedDatabase *db) {
FILE *f = fopen("export/SkillCaps.txt", "w");
if(!f) {
Log.Log(EQEmuLogSys::Error, "Unable to open export/SkillCaps.txt to write, skipping.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to open export/SkillCaps.txt to write, skipping.");
return;
}
@ -173,7 +173,7 @@ void ExportBaseData(SharedDatabase *db) {
FILE *f = fopen("export/BaseData.txt", "w");
if(!f) {
Log.Log(EQEmuLogSys::Error, "Unable to open export/BaseData.txt to write, skipping.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to open export/BaseData.txt to write, skipping.");
return;
}
@ -195,7 +195,7 @@ void ExportBaseData(SharedDatabase *db) {
fprintf(f, "%s\n", line.c_str());
}
} else {
Log.Log(EQEmuLogSys::Error, "Error in ExportBaseData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ExportBaseData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
}
fclose(f);

View File

@ -38,20 +38,20 @@ int main(int argc, char **argv) {
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Client Files Import Utility");
if(!EQEmuConfig::LoadConfig()) {
Log.Log(EQEmuLogSys::Error, "Unable to load configuration file.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load configuration file.");
return 1;
}
const EQEmuConfig *config = EQEmuConfig::get();
if(!load_log_settings(config->LogSettingsFile.c_str())) {
Log.Log(EQEmuLogSys::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str());
}
SharedDatabase database;
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Connecting to database...");
if(!database.Connect(config->DatabaseHost.c_str(), config->DatabaseUsername.c_str(),
config->DatabasePassword.c_str(), config->DatabaseDB.c_str(), config->DatabasePort)) {
Log.Log(EQEmuLogSys::Error, "Unable to connect to the database, cannot continue without a "
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to connect to the database, cannot continue without a "
"database connection");
return 1;
}
@ -68,7 +68,7 @@ int GetSpellColumns(SharedDatabase *db) {
const std::string query = "DESCRIBE spells_new";
auto results = db->QueryDatabase(query);
if(!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in GetSpellColumns query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetSpellColumns query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return 0;
}
@ -79,7 +79,7 @@ void ImportSpells(SharedDatabase *db) {
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Importing Spells...");
FILE *f = fopen("import/spells_us.txt", "r");
if(!f) {
Log.Log(EQEmuLogSys::Error, "Unable to open import/spells_us.txt to read, skipping.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to open import/spells_us.txt to read, skipping.");
return;
}
@ -158,7 +158,7 @@ void ImportSkillCaps(SharedDatabase *db) {
FILE *f = fopen("import/SkillCaps.txt", "r");
if(!f) {
Log.Log(EQEmuLogSys::Error, "Unable to open import/SkillCaps.txt to read, skipping.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to open import/SkillCaps.txt to read, skipping.");
return;
}
@ -194,7 +194,7 @@ void ImportBaseData(SharedDatabase *db) {
FILE *f = fopen("import/BaseData.txt", "r");
if(!f) {
Log.Log(EQEmuLogSys::Error, "Unable to open import/BaseData.txt to read, skipping.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to open import/BaseData.txt to read, skipping.");
return;
}

View File

@ -84,7 +84,7 @@ bool Database::Connect(const char* host, const char* user, const char* passwd, c
uint32 errnum= 0;
char errbuf[MYSQL_ERRMSG_SIZE];
if (!Open(host, user, passwd, database, port, &errnum, errbuf)) {
Log.Log(EQEmuLogSys::Error, "Failed to connect to database: Error: %s", errbuf);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to connect to database: Error: %s", errbuf);
return false;
}
@ -706,7 +706,7 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
charid = GetCharacterID(pp->name);
if(!charid) {
Log.Log(EQEmuLogSys::Error, "StoreCharacter: no character id");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "StoreCharacter: no character id");
return false;
}
@ -736,7 +736,7 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
auto results = QueryDatabase(invquery);
if (!results.RowsAffected())
Log.Log(EQEmuLogSys::Error, "StoreCharacter inventory failed. Query '%s' %s", invquery.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "StoreCharacter inventory failed. Query '%s' %s", invquery.c_str(), results.ErrorMessage().c_str());
#if EQDEBUG >= 9
else
Log.Log(EQEmuLogSys::Debug, "StoreCharacter inventory succeeded. Query '%s'", invquery.c_str());
@ -805,7 +805,7 @@ uint32 Database::GetAccountIDByChar(uint32 char_id) {
std::string query = StringFormat("SELECT `account_id` FROM `character_data` WHERE `id` = %i LIMIT 1", char_id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in GetAccountIDByChar query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetAccountIDByChar query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return 0;
}
@ -3162,28 +3162,28 @@ void Database::SetLFP(uint32 CharID, bool LFP) {
std::string query = StringFormat("UPDATE `character_data` SET `lfp` = %i WHERE `id` = %i",LFP, CharID);
auto results = QueryDatabase(query);
if (!results.Success())
Log.Log(EQEmuLogSys::Error, "Error updating LFP for character %i : %s", CharID, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error updating LFP for character %i : %s", CharID, results.ErrorMessage().c_str());
}
void Database::SetLoginFlags(uint32 CharID, bool LFP, bool LFG, uint8 firstlogon) {
std::string query = StringFormat("update `character_data` SET `lfp` = %i, `lfg` = %i, `firstlogon` = %i WHERE `id` = %i",LFP, LFG, firstlogon, CharID);
auto results = QueryDatabase(query);
if (!results.Success())
Log.Log(EQEmuLogSys::Error, "Error updating LFP for character %i : %s", CharID, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error updating LFP for character %i : %s", CharID, results.ErrorMessage().c_str());
}
void Database::SetLFG(uint32 CharID, bool LFG) {
std::string query = StringFormat("update `character_data` SET `lfg` = %i WHERE `id` = %i",LFG, CharID);
auto results = QueryDatabase(query);
if (!results.Success())
Log.Log(EQEmuLogSys::Error, "Error updating LFP for character %i : %s", CharID, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error updating LFP for character %i : %s", CharID, results.ErrorMessage().c_str());
}
void Database::SetFirstLogon(uint32 CharID, uint8 firstlogon) {
std::string query = StringFormat( "UPDATE `character_data` SET `firstlogon` = %i WHERE `id` = %i",firstlogon, CharID);
auto results = QueryDatabase(query);
if (!results.Success())
Log.Log(EQEmuLogSys::Error, "Error updating firstlogon for character %i : %s", CharID, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error updating firstlogon for character %i : %s", CharID, results.ErrorMessage().c_str());
}
void Database::AddReport(std::string who, std::string against, std::string lines) {
@ -3195,7 +3195,7 @@ void Database::AddReport(std::string who, std::string against, std::string lines
safe_delete_array(escape_str);
if (!results.Success())
Log.Log(EQEmuLogSys::Error, "Error adding a report for %s: %s", who.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error adding a report for %s: %s", who.c_str(), results.ErrorMessage().c_str());
}
void Database::SetGroupID(const char* name, uint32 id, uint32 charid, uint32 ismerc) {
@ -3206,7 +3206,7 @@ void Database::SetGroupID(const char* name, uint32 id, uint32 charid, uint32 ism
auto results = QueryDatabase(query);
if (!results.Success())
Log.Log(EQEmuLogSys::Error, "Error deleting character from group id: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error deleting character from group id: %s", results.ErrorMessage().c_str());
return;
}
@ -3216,7 +3216,7 @@ void Database::SetGroupID(const char* name, uint32 id, uint32 charid, uint32 ism
auto results = QueryDatabase(query);
if (!results.Success())
Log.Log(EQEmuLogSys::Error, "Error adding character to group id: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error adding character to group id: %s", results.ErrorMessage().c_str());
}
void Database::ClearAllGroups(void)
@ -3255,7 +3255,7 @@ uint32 Database::GetGroupID(const char* name){
if (!results.Success())
{
Log.Log(EQEmuLogSys::Error, "Error getting group id: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting group id: %s", results.ErrorMessage().c_str());
return 0;
}
@ -4049,7 +4049,7 @@ void Database::GetCharactersInInstance(uint16 instance_id, std::list<uint32> &ch
if (!results.Success())
{
Log.Log(EQEmuLogSys::Error, "Error in GetCharactersInInstace query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetCharactersInInstace query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return;
}

View File

@ -141,7 +141,7 @@ bool EQTime::saveFile(const char *filename)
of.open(filename);
if(!of)
{
Log.Log(EQEmuLogSys::Error, "EQTime::saveFile failed: Unable to open file '%s'", filename);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "EQTime::saveFile failed: Unable to open file '%s'", filename);
return false;
}
//Enable for debugging
@ -165,14 +165,14 @@ bool EQTime::loadFile(const char *filename)
in.open(filename);
if(!in)
{
Log.Log(EQEmuLogSys::Error, "Could not load EQTime file %s", filename);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not load EQTime file %s", filename);
return false;
}
in >> version;
in.ignore(80, '\n');
if(version != EQT_VERSION)
{
Log.Log(EQEmuLogSys::Error, "'%s' is NOT a valid EQTime file. File version is %i, EQTime version is %i", filename, version, EQT_VERSION);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "'%s' is NOT a valid EQTime file. File version is %i, EQTime version is %i", filename, version, EQT_VERSION);
return false;
}
//in >> eqTime.start_eqtime.day;

View File

@ -337,7 +337,7 @@ uint32 BaseGuildManager::_GetFreeGuildID() {
if (!results.Success())
{
Log.Log(EQEmuLogSys::Error, "Error in _GetFreeGuildID query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in _GetFreeGuildID query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
continue;
}

View File

@ -1153,7 +1153,7 @@ int16 Inventory::_PutItem(int16 slot_id, ItemInst* inst)
}
if (result == INVALID_INDEX) {
Log.Log(EQEmuLogSys::Error, "Inventory::_PutItem: Invalid slot_id specified (%i) with parent slot id (%i)", slot_id, parentSlot);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Inventory::_PutItem: Invalid slot_id specified (%i) with parent slot id (%i)", slot_id, parentSlot);
Inventory::MarkDirty(inst); // Slot not found, clean up
}

View File

@ -135,7 +135,7 @@ bool PersistentTimer::Load(Database *db) {
auto results = db->QueryDatabase(query);
if (!results.Success()) {
#if EQDEBUG > 5
Log.Log(EQEmuLogSys::Error, "Error in PersistentTimer::Load, error: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in PersistentTimer::Load, error: %s", results.ErrorMessage().c_str());
#endif
return false;
}
@ -168,7 +168,7 @@ bool PersistentTimer::Store(Database *db) {
auto results = db->QueryDatabase(query);
if (!results.Success()) {
#if EQDEBUG > 5
Log.Log(EQEmuLogSys::Error, "Error in PersistentTimer::Store, error: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in PersistentTimer::Store, error: %s", results.ErrorMessage().c_str());
#endif
return false;
}
@ -188,7 +188,7 @@ bool PersistentTimer::Clear(Database *db) {
auto results = db->QueryDatabase(query);
if (!results.Success()) {
#if EQDEBUG > 5
Log.Log(EQEmuLogSys::Error, "Error in PersistentTimer::Clear, error: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in PersistentTimer::Clear, error: %s", results.ErrorMessage().c_str());
#endif
return false;
}
@ -200,7 +200,7 @@ bool PersistentTimer::Clear(Database *db) {
/* This function checks if the timer triggered */
bool PersistentTimer::Expired(Database *db, bool iReset) {
if (this == nullptr) {
Log.Log(EQEmuLogSys::Error, "Null timer during ->Check()!?\n");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Null timer during ->Check()!?\n");
return(true);
}
uint32 current_time = get_current_time();
@ -292,7 +292,7 @@ bool PTimerList::Load(Database *db) {
auto results = db->QueryDatabase(query);
if (!results.Success()) {
#if EQDEBUG > 5
Log.Log(EQEmuLogSys::Error, "Error in PersistentTimer::Load, error: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in PersistentTimer::Load, error: %s", results.ErrorMessage().c_str());
#endif
return false;
}
@ -351,7 +351,7 @@ bool PTimerList::Clear(Database *db) {
auto results = db->QueryDatabase(query);
if (!results.Success()) {
#if EQDEBUG > 5
Log.Log(EQEmuLogSys::Error, "Error in PersistentTimer::Clear, error: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in PersistentTimer::Clear, error: %s", results.ErrorMessage().c_str());
#endif
return false;
}
@ -443,7 +443,7 @@ bool PTimerList::ClearOffline(Database *db, uint32 char_id, pTimerType type) {
auto results = db->QueryDatabase(query);
if (!results.Success()) {
#if EQDEBUG > 5
Log.Log(EQEmuLogSys::Error, "Error in PTimerList::ClearOffline, error: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in PTimerList::ClearOffline, error: %s", results.ErrorMessage().c_str());
#endif
return false;
}

View File

@ -282,7 +282,7 @@ bool RuleManager::LoadRules(Database *db, const char *ruleset) {
auto results = db->QueryDatabase(query);
if (!results.Success())
{
Log.Log(EQEmuLogSys::Error, "Error in LoadRules query %s: %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadRules query %s: %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -329,7 +329,7 @@ int RuleManager::GetRulesetID(Database *db, const char *rulesetname) {
safe_delete_array(rst);
auto results = db->QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadRules query %s: %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadRules query %s: %s", query.c_str(), results.ErrorMessage().c_str());
return -1;
}
@ -369,7 +369,7 @@ std::string RuleManager::GetRulesetName(Database *db, int id) {
auto results = db->QueryDatabase(query);
if (!results.Success())
{
Log.Log(EQEmuLogSys::Error, "Error in LoadRules query %s: %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadRules query %s: %s", query.c_str(), results.ErrorMessage().c_str());
return "";
}
@ -390,7 +390,7 @@ bool RuleManager::ListRulesets(Database *db, std::map<int, std::string> &into) {
auto results = db->QueryDatabase(query);
if (results.Success())
{
Log.Log(EQEmuLogSys::Error, "Error in ListRulesets query %s: %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ListRulesets query %s: %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}

View File

@ -124,7 +124,7 @@ bool SharedDatabase::VerifyInventory(uint32 account_id, int16 slot_id, const Ite
account_id, slot_id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error runing inventory verification query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error runing inventory verification query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
//returning true is less harmful in the face of a query error
return true;
}
@ -214,7 +214,7 @@ bool SharedDatabase::UpdateInventorySlot(uint32 char_id, const ItemInst* inst, i
}
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "UpdateInventorySlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "UpdateInventorySlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -258,7 +258,7 @@ bool SharedDatabase::UpdateSharedBankSlot(uint32 char_id, const ItemInst* inst,
}
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "UpdateSharedBankSlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "UpdateSharedBankSlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -271,7 +271,7 @@ bool SharedDatabase::DeleteInventorySlot(uint32 char_id, int16 slot_id) {
std::string query = StringFormat("DELETE FROM inventory WHERE charid = %i AND slotid = %i", char_id, slot_id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "DeleteInventorySlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "DeleteInventorySlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -284,7 +284,7 @@ bool SharedDatabase::DeleteInventorySlot(uint32 char_id, int16 slot_id) {
char_id, base_slot_id, (base_slot_id+10));
results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "DeleteInventorySlot, bags query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "DeleteInventorySlot, bags query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -299,7 +299,7 @@ bool SharedDatabase::DeleteSharedBankSlot(uint32 char_id, int16 slot_id) {
std::string query = StringFormat("DELETE FROM sharedbank WHERE acctid=%i AND slotid=%i", account_id, slot_id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "DeleteSharedBankSlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "DeleteSharedBankSlot query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -313,7 +313,7 @@ bool SharedDatabase::DeleteSharedBankSlot(uint32 char_id, int16 slot_id) {
account_id, base_slot_id, (base_slot_id+10));
results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "DeleteSharedBankSlot, bags query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "DeleteSharedBankSlot, bags query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -403,7 +403,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory* inv, bool is_charid) {
"FROM sharedbank WHERE acctid=%i", id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Database::GetSharedBank(uint32 account_id): %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Database::GetSharedBank(uint32 account_id): %s", results.ErrorMessage().c_str());
return false;
}
@ -473,7 +473,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, Inventory* inv, bool is_charid) {
if (put_slot_id != INVALID_INDEX)
continue;
Log.Log(EQEmuLogSys::Error, "Warning: Invalid slot_id for item in shared bank inventory: %s=%i, item_id=%i, slot_id=%i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Invalid slot_id for item in shared bank inventory: %s=%i, item_id=%i, slot_id=%i",
((is_charid==true)? "charid": "acctid"), id, item_id, slot_id);
if (is_charid)
@ -492,8 +492,8 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) {
"FROM inventory WHERE charid = %i ORDER BY slotid", char_id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "GetInventory query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.Log(EQEmuLogSys::Error, "If you got an error related to the 'instnodrop' field, run the following SQL Queries:\nalter table inventory add instnodrop tinyint(1) unsigned default 0 not null;\n");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "GetInventory query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "If you got an error related to the 'instnodrop' field, run the following SQL Queries:\nalter table inventory add instnodrop tinyint(1) unsigned default 0 not null;\n");
return false;
}
@ -587,7 +587,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) {
else if (slot_id >= 3111 && slot_id <= 3179)
{
// Admins: please report any occurrences of this error
Log.Log(EQEmuLogSys::Error, "Warning: Defunct location for item in inventory: charid=%i, item_id=%i, slot_id=%i .. pushing to cursor...", char_id, item_id, slot_id);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Defunct location for item in inventory: charid=%i, item_id=%i, slot_id=%i .. pushing to cursor...", char_id, item_id, slot_id);
put_slot_id = inv->PushCursor(*inst);
}
else
@ -599,7 +599,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, Inventory* inv) {
// Save ptr to item in inventory
if (put_slot_id == INVALID_INDEX) {
Log.Log(EQEmuLogSys::Error, "Warning: Invalid slot_id for item in inventory: charid=%i, item_id=%i, slot_id=%i",char_id, item_id, slot_id);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Invalid slot_id for item in inventory: charid=%i, item_id=%i, slot_id=%i",char_id, item_id, slot_id);
}
}
@ -617,8 +617,8 @@ bool SharedDatabase::GetInventory(uint32 account_id, char* name, Inventory* inv)
name, account_id);
auto results = QueryDatabase(query);
if (!results.Success()){
Log.Log(EQEmuLogSys::Error, "GetInventory query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.Log(EQEmuLogSys::Error, "If you got an error related to the 'instnodrop' field, run the following SQL Queries:\nalter table inventory add instnodrop tinyint(1) unsigned default 0 not null;\n");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "GetInventory query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "If you got an error related to the 'instnodrop' field, run the following SQL Queries:\nalter table inventory add instnodrop tinyint(1) unsigned default 0 not null;\n");
return false;
}
@ -704,7 +704,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char* name, Inventory* inv)
// Save ptr to item in inventory
if (put_slot_id == INVALID_INDEX)
Log.Log(EQEmuLogSys::Error, "Warning: Invalid slot_id for item in inventory: name=%s, acctid=%i, item_id=%i, slot_id=%i", name, account_id, item_id, slot_id);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: Invalid slot_id for item in inventory: name=%s, acctid=%i, item_id=%i, slot_id=%i", name, account_id, item_id, slot_id);
}
@ -720,7 +720,7 @@ void SharedDatabase::GetItemsCount(int32 &item_count, uint32 &max_id) {
const std::string query = "SELECT MAX(id), count(*) FROM items";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in GetItemsCount '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetItemsCount '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -760,7 +760,7 @@ bool SharedDatabase::LoadItems() {
items_hash = new EQEmu::FixedMemoryHashSet<Item_Struct>(reinterpret_cast<uint8*>(items_mmf->Get()), size);
mutex.Unlock();
} catch(std::exception& ex) {
Log.Log(EQEmuLogSys::Error, "Error Loading Items: %s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Items: %s", ex.what());
return false;
}
@ -805,7 +805,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
"updated FROM items ORDER BY id";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "LoadItems '%s', %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "LoadItems '%s', %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -1018,7 +1018,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
try {
hash.insert(item.ID, item);
} catch(std::exception &ex) {
Log.Log(EQEmuLogSys::Error, "Database::LoadItems: %s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Database::LoadItems: %s", ex.what());
break;
}
}
@ -1079,7 +1079,7 @@ std::string SharedDatabase::GetBook(const char *txtfile)
}
if (results.RowCount() == 0) {
Log.Log(EQEmuLogSys::Error, "No book to send, (%s)", txtfile);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "No book to send, (%s)", txtfile);
txtout.assign(" ",1);
return txtout;
}
@ -1097,7 +1097,7 @@ void SharedDatabase::GetFactionListInfo(uint32 &list_count, uint32 &max_lists) {
const std::string query = "SELECT COUNT(*), MAX(id) FROM npc_faction";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error getting npc faction info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting npc faction info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -1132,7 +1132,7 @@ void SharedDatabase::LoadNPCFactionLists(void *data, uint32 size, uint32 list_co
"ON npc_faction.id = npc_faction_entries.npc_faction_id ORDER BY npc_faction.id;";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error getting npc faction info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting npc faction info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -1198,7 +1198,7 @@ bool SharedDatabase::LoadNPCFactionLists() {
faction_hash = new EQEmu::FixedMemoryHashSet<NPCFactionList>(reinterpret_cast<uint8*>(faction_mmf->Get()), size);
mutex.Unlock();
} catch(std::exception& ex) {
Log.Log(EQEmuLogSys::Error, "Error Loading npc factions: %s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading npc factions: %s", ex.what());
return false;
}
@ -1216,8 +1216,8 @@ ItemInst* SharedDatabase::CreateItem(uint32 item_id, int16 charges, uint32 aug1,
inst = CreateBaseItem(item, charges);
if (inst == nullptr) {
Log.Log(EQEmuLogSys::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateItem()");
Log.Log(EQEmuLogSys::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateItem()");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
return nullptr;
}
@ -1242,8 +1242,8 @@ ItemInst* SharedDatabase::CreateItem(const Item_Struct* item, int16 charges, uin
inst = CreateBaseItem(item, charges);
if (inst == nullptr) {
Log.Log(EQEmuLogSys::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateItem()");
Log.Log(EQEmuLogSys::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateItem()");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
return nullptr;
}
@ -1273,8 +1273,8 @@ ItemInst* SharedDatabase::CreateBaseItem(const Item_Struct* item, int16 charges)
inst = new ItemInst(item, charges);
if (inst == nullptr) {
Log.Log(EQEmuLogSys::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateBaseItem()");
Log.Log(EQEmuLogSys::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: valid item data returned a null reference for ItemInst creation in SharedDatabase::CreateBaseItem()");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Item Data = ID: %u, Name: %s, Charges: %i", item->ID, item->Name, charges);
return nullptr;
}
@ -1344,7 +1344,7 @@ bool SharedDatabase::LoadSkillCaps() {
mutex.Unlock();
} catch(std::exception &ex) {
Log.Log(EQEmuLogSys::Error, "Error loading skill caps: %s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading skill caps: %s", ex.what());
return false;
}
@ -1360,7 +1360,7 @@ void SharedDatabase::LoadSkillCaps(void *data) {
const std::string query = "SELECT skillID, class, level, cap FROM skill_caps ORDER BY skillID, class, level";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error loading skill caps from database: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading skill caps from database: %s", results.ErrorMessage().c_str());
return;
}
@ -1462,7 +1462,7 @@ void SharedDatabase::LoadDamageShieldTypes(SPDat_Spell_Struct* sp, int32 iMaxSpe
"AND `spellid` <= %i", iMaxSpellID);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadDamageShieldTypes: %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadDamageShieldTypes: %s %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -1658,7 +1658,7 @@ int SharedDatabase::GetMaxBaseDataLevel() {
const std::string query = "SELECT MAX(level) FROM base_data";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in GetMaxBaseDataLevel query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetMaxBaseDataLevel query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return -1;
}
@ -1691,7 +1691,7 @@ bool SharedDatabase::LoadBaseData() {
mutex.Unlock();
} catch(std::exception& ex) {
Log.Log(EQEmuLogSys::Error, "Error Loading Base Data: %s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading Base Data: %s", ex.what());
return false;
}
@ -1704,7 +1704,7 @@ void SharedDatabase::LoadBaseData(void *data, int max_level) {
const std::string query = "SELECT * FROM base_data ORDER BY level, class ASC";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadBaseData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadBaseData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -1716,22 +1716,22 @@ void SharedDatabase::LoadBaseData(void *data, int max_level) {
cl = atoi(row[1]);
if(lvl <= 0) {
Log.Log(EQEmuLogSys::Error, "Non fatal error: base_data.level <= 0, ignoring.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Non fatal error: base_data.level <= 0, ignoring.");
continue;
}
if(lvl >= max_level) {
Log.Log(EQEmuLogSys::Error, "Non fatal error: base_data.level >= max_level, ignoring.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Non fatal error: base_data.level >= max_level, ignoring.");
continue;
}
if(cl <= 0) {
Log.Log(EQEmuLogSys::Error, "Non fatal error: base_data.cl <= 0, ignoring.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Non fatal error: base_data.cl <= 0, ignoring.");
continue;
}
if(cl > 16) {
Log.Log(EQEmuLogSys::Error, "Non fatal error: base_data.class > 16, ignoring.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Non fatal error: base_data.class > 16, ignoring.");
continue;
}
@ -1784,7 +1784,7 @@ void SharedDatabase::GetLootTableInfo(uint32 &loot_table_count, uint32 &max_loot
const std::string query = "SELECT COUNT(*), MAX(id), (SELECT COUNT(*) FROM loottable_entries) FROM loottable";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error getting loot table info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting loot table info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -1806,7 +1806,7 @@ void SharedDatabase::GetLootDropInfo(uint32 &loot_drop_count, uint32 &max_loot_d
const std::string query = "SELECT COUNT(*), MAX(id), (SELECT COUNT(*) FROM lootdrop_entries) FROM lootdrop";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error getting loot table info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting loot table info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -1832,7 +1832,7 @@ void SharedDatabase::LoadLootTables(void *data, uint32 size) {
"ON loottable.id = loottable_entries.loottable_id ORDER BY id";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error getting loot table info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting loot table info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -1886,7 +1886,7 @@ void SharedDatabase::LoadLootDrops(void *data, uint32 size) {
"ON lootdrop.id = lootdrop_entries.lootdrop_id ORDER BY lootdrop_id";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error getting loot drop info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error getting loot drop info from database: %s, %s", query.c_str(), results.ErrorMessage().c_str());
}
uint32 current_id = 0;
@ -1940,7 +1940,7 @@ bool SharedDatabase::LoadLoot() {
loot_drop_mmf->Size());
mutex.Unlock();
} catch(std::exception &ex) {
Log.Log(EQEmuLogSys::Error, "Error loading loot: %s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading loot: %s", ex.what());
return false;
}
@ -1956,7 +1956,7 @@ const LootTable_Struct* SharedDatabase::GetLootTable(uint32 loottable_id) {
return &loot_table_hash->at(loottable_id);
}
} catch(std::exception &ex) {
Log.Log(EQEmuLogSys::Error, "Could not get loot table: %s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not get loot table: %s", ex.what());
}
return nullptr;
}
@ -1970,7 +1970,7 @@ const LootDrop_Struct* SharedDatabase::GetLootDrop(uint32 lootdrop_id) {
return &loot_drop_hash->at(lootdrop_id);
}
} catch(std::exception &ex) {
Log.Log(EQEmuLogSys::Error, "Could not get loot drop: %s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not get loot drop: %s", ex.what());
}
return nullptr;
}

View File

@ -69,7 +69,7 @@ bool Database::Connect(const char* host, const char* user, const char* passwd, c
char errbuf[MYSQL_ERRMSG_SIZE];
if (!Open(host, user, passwd, database, port, &errnum, errbuf))
{
Log.Log(EQEmuLogSys::Error, "Failed to connect to database: Error: %s", errbuf);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to connect to database: Error: %s", errbuf);
HandleMysqlError(errnum);
return false;

View File

@ -42,20 +42,20 @@ int main(int argc, char **argv) {
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Shared Memory Loader Program");
if(!EQEmuConfig::LoadConfig()) {
Log.Log(EQEmuLogSys::Error, "Unable to load configuration file.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load configuration file.");
return 1;
}
const EQEmuConfig *config = EQEmuConfig::get();
if(!load_log_settings(config->LogSettingsFile.c_str())) {
Log.Log(EQEmuLogSys::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str());
}
SharedDatabase database;
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Connecting to database...");
if(!database.Connect(config->DatabaseHost.c_str(), config->DatabaseUsername.c_str(),
config->DatabasePassword.c_str(), config->DatabaseDB.c_str(), config->DatabasePort)) {
Log.Log(EQEmuLogSys::Error, "Unable to connect to the database, cannot continue without a "
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to connect to the database, cannot continue without a "
"database connection");
return 1;
}
@ -118,7 +118,7 @@ int main(int argc, char **argv) {
try {
LoadItems(&database);
} catch(std::exception &ex) {
Log.Log(EQEmuLogSys::Error, "%s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "%s", ex.what());
return 1;
}
}
@ -128,7 +128,7 @@ int main(int argc, char **argv) {
try {
LoadFactions(&database);
} catch(std::exception &ex) {
Log.Log(EQEmuLogSys::Error, "%s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "%s", ex.what());
return 1;
}
}
@ -138,7 +138,7 @@ int main(int argc, char **argv) {
try {
LoadLoot(&database);
} catch(std::exception &ex) {
Log.Log(EQEmuLogSys::Error, "%s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "%s", ex.what());
return 1;
}
}
@ -148,7 +148,7 @@ int main(int argc, char **argv) {
try {
LoadSkillCaps(&database);
} catch(std::exception &ex) {
Log.Log(EQEmuLogSys::Error, "%s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "%s", ex.what());
return 1;
}
}
@ -158,7 +158,7 @@ int main(int argc, char **argv) {
try {
LoadSpells(&database);
} catch(std::exception &ex) {
Log.Log(EQEmuLogSys::Error, "%s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "%s", ex.what());
return 1;
}
}
@ -168,7 +168,7 @@ int main(int argc, char **argv) {
try {
LoadBaseData(&database);
} catch(std::exception &ex) {
Log.Log(EQEmuLogSys::Error, "%s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "%s", ex.what());
return 1;
}
}

View File

@ -74,7 +74,7 @@ bool Database::Connect(const char* host, const char* user, const char* passwd, c
char errbuf[MYSQL_ERRMSG_SIZE];
if (!Open(host, user, passwd, database, port, &errnum, errbuf))
{
Log.Log(EQEmuLogSys::Error, "Failed to connect to database: Error: %s", errbuf);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to connect to database: Error: %s", errbuf);
HandleMysqlError(errnum);
return false;

View File

@ -386,7 +386,7 @@ void Adventure::MoveCorpsesToGraveyard()
std::string query = StringFormat("SELECT id, charid FROM character_corpses WHERE instanceid=%d", GetInstanceID());
auto results = database.QueryDatabase(query);
if(!results.Success())
Log.Log(EQEmuLogSys::Error, "Error in AdventureManager:::MoveCorpsesToGraveyard: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in AdventureManager:::MoveCorpsesToGraveyard: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
for(auto row = results.begin(); row != results.end(); ++row) {
dbid_list.push_back(atoi(row[0]));
@ -405,7 +405,7 @@ void Adventure::MoveCorpsesToGraveyard()
x, y, z, GetInstanceID());
auto results = database.QueryDatabase(query);
if(!results.Success())
Log.Log(EQEmuLogSys::Error, "Error in AdventureManager:::MoveCorpsesToGraveyard: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in AdventureManager:::MoveCorpsesToGraveyard: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
}
auto c_iter = charid_list.begin();

View File

@ -652,7 +652,7 @@ bool AdventureManager::LoadAdventureTemplates()
"graveyard_radius FROM adventure_template";
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in AdventureManager:::LoadAdventures: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in AdventureManager:::LoadAdventures: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -702,7 +702,7 @@ bool AdventureManager::LoadAdventureEntries()
auto results = database.QueryDatabase(query);
if (!results.Success())
{
Log.Log(EQEmuLogSys::Error, "Error in AdventureManager:::LoadAdventureEntries: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in AdventureManager:::LoadAdventureEntries: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -1079,7 +1079,7 @@ void AdventureManager::LoadLeaderboardInfo()
"AS adv_stats LEFT JOIN `character_data` AS ch ON adv_stats.player_id = ch.id;";
auto results = database.QueryDatabase(query);
if(!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in AdventureManager:::GetLeaderboardInfo: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in AdventureManager:::GetLeaderboardInfo: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
return;
}

View File

@ -42,7 +42,7 @@ void EQLConfig::LoadSettings() {
std::string query = StringFormat("SELECT dynamics FROM launcher WHERE name = '%s'", namebuf);
auto results = database.QueryDatabase(query);
if (!results.Success())
Log.Log(EQEmuLogSys::Error, "EQLConfig::LoadSettings: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "EQLConfig::LoadSettings: %s", results.ErrorMessage().c_str());
else {
auto row = results.begin();
m_dynamics = atoi(row[0]);
@ -51,7 +51,7 @@ void EQLConfig::LoadSettings() {
query = StringFormat("SELECT zone, port FROM launcher_zones WHERE launcher = '%s'", namebuf);
results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "EQLConfig::LoadSettings: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "EQLConfig::LoadSettings: %s", results.ErrorMessage().c_str());
return;
}
@ -73,7 +73,7 @@ EQLConfig *EQLConfig::CreateLauncher(const char *name, uint8 dynamic_count) {
std::string query = StringFormat("INSERT INTO launcher (name, dynamics) VALUES('%s', %d)", namebuf, dynamic_count);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in CreateLauncher query: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in CreateLauncher query: %s", results.ErrorMessage().c_str());
return nullptr;
}
@ -118,14 +118,14 @@ void EQLConfig::DeleteLauncher() {
std::string query = StringFormat("DELETE FROM launcher WHERE name = '%s'", namebuf);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in DeleteLauncher 1st query: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DeleteLauncher 1st query: %s", results.ErrorMessage().c_str());
return;
}
query = StringFormat("DELETE FROM launcher_zones WHERE launcher = '%s'", namebuf);
results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in DeleteLauncher 2nd query: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DeleteLauncher 2nd query: %s", results.ErrorMessage().c_str());
return;
}
}
@ -173,7 +173,7 @@ bool EQLConfig::BootStaticZone(Const_char *short_name, uint16 port) {
"VALUES('%s', '%s', %d)", namebuf, zonebuf, port);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in BootStaticZone query: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in BootStaticZone query: %s", results.ErrorMessage().c_str());
return false;
}
@ -202,7 +202,7 @@ bool EQLConfig::ChangeStaticZone(Const_char *short_name, uint16 port) {
res = m_zones.find(short_name);
if(res == m_zones.end()) {
//not found.
Log.Log(EQEmuLogSys::Error, "Update for unknown zone %s", short_name);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Update for unknown zone %s", short_name);
return false;
}
@ -217,7 +217,7 @@ bool EQLConfig::ChangeStaticZone(Const_char *short_name, uint16 port) {
"launcher = '%s' AND zone = '%s'",port, namebuf, zonebuf);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in ChangeStaticZone query: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ChangeStaticZone query: %s", results.ErrorMessage().c_str());
return false;
}
@ -239,7 +239,7 @@ bool EQLConfig::DeleteStaticZone(Const_char *short_name) {
res = m_zones.find(short_name);
if(res == m_zones.end()) {
//not found.
Log.Log(EQEmuLogSys::Error, "Update for unknown zone %s", short_name);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Update for unknown zone %s", short_name);
return false;
}
@ -254,7 +254,7 @@ bool EQLConfig::DeleteStaticZone(Const_char *short_name) {
"launcher = '%s' AND zone = '%s'", namebuf, zonebuf);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in DeleteStaticZone query: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DeleteStaticZone query: %s", results.ErrorMessage().c_str());
return false;
}
@ -279,7 +279,7 @@ bool EQLConfig::SetDynamicCount(int count) {
std::string query = StringFormat("UPDATE launcher SET dynamics=%d WHERE name='%s'", count, namebuf);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in SetDynamicCount query: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SetDynamicCount query: %s", results.ErrorMessage().c_str());
return false;
}

View File

@ -298,7 +298,7 @@ bool WorldDatabase::GetStartZone(PlayerProfile_Struct* in_pp, CharCreate_Struct*
in_cc->race);
auto results = QueryDatabase(query);
if(!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Start zone query failed: %s : %s\n", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Start zone query failed: %s : %s\n", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -478,7 +478,7 @@ void WorldDatabase::GetLauncherList(std::vector<std::string> &rl) {
const std::string query = "SELECT name FROM launcher";
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "WorldDatabase::GetLauncherList: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "WorldDatabase::GetLauncherList: %s", results.ErrorMessage().c_str());
return;
}
@ -500,7 +500,7 @@ void WorldDatabase::SetMailKey(int CharID, int IPAddress, int MailKey) {
MailKeyString, CharID);
auto results = QueryDatabase(query);
if (!results.Success())
Log.Log(EQEmuLogSys::Error, "WorldDatabase::SetMailKey(%i, %s) : %s", CharID, MailKeyString, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "WorldDatabase::SetMailKey(%i, %s) : %s", CharID, MailKeyString, results.ErrorMessage().c_str());
}
@ -509,7 +509,7 @@ bool WorldDatabase::GetCharacterLevel(const char *name, int &level)
std::string query = StringFormat("SELECT level FROM character_data WHERE name = '%s'", name);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "WorldDatabase::GetCharacterLevel: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "WorldDatabase::GetCharacterLevel: %s", results.ErrorMessage().c_str());
return false;
}

View File

@ -445,7 +445,7 @@ void Client::HandleAAAction(aaID activate) {
break;
default:
Log.Log(EQEmuLogSys::Error, "Unknown AA nonspell action type %d", caa->action);
Log.DebugCategory(EQEmuLogSys::General, 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))
{
Log.Log(EQEmuLogSys::Error, "Unknown swarm pet spell id: %d, check pets table", spell_id);
Log.DebugCategory(EQEmuLogSys::General, 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
Log.Log(EQEmuLogSys::Error, "Unknown npc type for swarm pet spell id: %d", spell_id);
Log.DebugCategory(EQEmuLogSys::General, 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
Log.Log(EQEmuLogSys::Error, "Unknown npc type for swarm pet type id: %d", typesid);
Log.DebugCategory(EQEmuLogSys::General, 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() {
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading AA information...");
totalAAs = database.CountAAs();
if(totalAAs == 0) {
Log.Log(EQEmuLogSys::Error, "Failed to load AAs!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to load AAs!");
aas = nullptr;
return;
}
@ -1451,7 +1451,7 @@ void Zone::LoadAAs() {
if (database.LoadAAEffects2())
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loaded %d AA Effects.", aa_effects.size());
else
Log.Log(EQEmuLogSys::Error, "Failed to load AA Effects!");
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAEffects2 query: '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAEffects2 query: '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
if (!results.RowCount()) { //no results
Log.Log(EQEmuLogSys::Error, "Error loading AA Effects, none found in the database.");
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadAAEffects query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetTotalAALevels '%s: %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::CountAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::CountAALevels query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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 {
Log.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::LoadAAs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetAASkillVars '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return nullptr;
}

View File

@ -1128,7 +1128,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
{
if (!other) {
SetTarget(nullptr);
Log.Log(EQEmuLogSys::Error, "A null Mob object was passed to Client::Attack() for evaluation!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Client::Attack() for evaluation!");
return false;
}
@ -1692,7 +1692,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
if (!other) {
SetTarget(nullptr);
Log.Log(EQEmuLogSys::Error, "A null Mob object was passed to NPC::Attack() for evaluation!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to NPC::Attack() for evaluation!");
return false;
}
@ -3887,7 +3887,7 @@ void Mob::TryDefensiveProc(const ItemInst* weapon, Mob *on, uint16 hand) {
if (!on) {
SetTarget(nullptr);
Log.Log(EQEmuLogSys::Error, "A null Mob object was passed to Mob::TryDefensiveProc for evaluation!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Mob::TryDefensiveProc for evaluation!");
return;
}
@ -3918,7 +3918,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);
Log.Log(EQEmuLogSys::Error, "A null Mob object was passed to Mob::TryWeaponProc for evaluation!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Mob::TryWeaponProc for evaluation!");
return;
}
@ -4467,7 +4467,7 @@ void Mob::TrySkillProc(Mob *on, uint16 skill, uint16 ReuseTime, bool Success, ui
if (!on) {
SetTarget(nullptr);
Log.Log(EQEmuLogSys::Error, "A null Mob object was passed to Mob::TrySkillProc for evaluation!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Mob::TrySkillProc for evaluation!");
return;
}

View File

@ -1225,7 +1225,7 @@ int32 Bot::acmod()
return (65 + ((agility-300) / 21));
}
#if EQDEBUG >= 11
Log.Log(EQEmuLogSys::Error, "Error in Bot::acmod(): Agility: %i, Level: %i",agility,level);
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in Bot::LoadAAs()");
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "Error in Bot::LoadStance()");
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in Bot::SaveStance()");
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in Bot::LoadTimers()");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Bot::LoadTimers()");
return;
}
@ -2847,7 +2847,7 @@ void Bot::SaveTimers() {
}
if(hadError)
Log.Log(EQEmuLogSys::Error, "Error in Bot::SaveTimers()");
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "Warning: botid %i has an invalid item_id %i in inventory slot %i", this->GetBotID(), item_id, slot_id);
Log.DebugCategory(EQEmuLogSys::General, 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)
Log.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);
Log.DebugCategory(EQEmuLogSys::General, 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);
Log.Log(EQEmuLogSys::Error, "A null Mob object was passed to Bot::Attack for evaluation!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "A null Mob object was passed to Bot::Attack for evaluation!");
return false;
}
@ -15454,7 +15454,7 @@ bool EntityList::Bot_AICheckCloseBeneficialSpells(Bot* caster, uint8 iChance, fl
// according to Rogean, Live NPCs will just cast through walls/floors, no problem..
//
// This check was put in to address an idle-mob CPU issue
Log.Log(EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!");
return(false);
}

View File

@ -5294,7 +5294,7 @@ void Client::SendRewards()
"ORDER BY reward_id", AccountID());
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in Client::SendRewards(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::SendRewards(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -5362,7 +5362,7 @@ bool Client::TryReward(uint32 claim_id) {
AccountID(), claim_id);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -5389,7 +5389,7 @@ bool Client::TryReward(uint32 claim_id) {
AccountID(), claim_id);
auto results = database.QueryDatabase(query);
if(!results.Success())
Log.Log(EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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) "
@ -5397,7 +5397,7 @@ bool Client::TryReward(uint32 claim_id) {
AccountID(), claim_id);
auto results = database.QueryDatabase(query);
if(!results.Success())
Log.Log(EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::TryReward(): %s (%s)", query.c_str(), results.ErrorMessage().c_str());
}
InternalVeteranReward ivr = (*iter);
@ -6211,7 +6211,7 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid
PetRecord record;
if(!database.GetPetEntry(spells[spell_id].teleport_zone, &record))
{
Log.Log(EQEmuLogSys::Error, "Unknown doppelganger spell id: %d, check pets table", spell_id);
Log.DebugCategory(EQEmuLogSys::General, 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;
}
@ -6225,7 +6225,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) {
Log.Log(EQEmuLogSys::Error, "Unknown npc type for doppelganger spell id: %d", spell_id);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown npc type for doppelganger spell id: %d", spell_id);
Message(0,"Unable to find pet!");
return;
}
@ -8289,11 +8289,11 @@ std::string Client::TextLink::GenerateLink()
if ((m_Link.length() == 0) || (m_Link.length() > 250)) {
m_Error = true;
m_Link = "<LINKER ERROR>";
Log.Log(EQEmuLogSys::Error, "TextLink::GenerateLink() failed to generate a useable text link (LinkType: %i, Lengths: {link: %u, body: %u, text: %u})",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "TextLink::GenerateLink() failed to generate a useable text link (LinkType: %i, Lengths: {link: %u, body: %u, text: %u})",
m_LinkType, m_Link.length(), m_LinkBody.length(), m_LinkText.length());
#if EQDEBUG >= 5
Log.Log(EQEmuLogSys::Error, ">> LinkBody: %s", m_LinkBody.c_str());
Log.Log(EQEmuLogSys::Error, ">> LinkText: %s", m_LinkText.c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, ">> LinkBody: %s", m_LinkBody.c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, ">> LinkText: %s", m_LinkText.c_str());
#endif
}

View File

@ -826,7 +826,7 @@ int32 Client::acmod() {
return (65 + ((agility-300) / 21));
}
#if EQDEBUG >= 11
Log.Log(EQEmuLogSys::Error, "Error in Client::acmod(): Agility: %i, Level: %i",agility,level);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Client::acmod(): Agility: %i, Level: %i",agility,level);
#endif
return 0;
};

View File

@ -431,7 +431,7 @@ int Client::HandlePacket(const EQApplicationPacket *app)
parse->EventPlayer(EVENT_UNHANDLED_OPCODE, this, "", 1, &args);
#if EQDEBUG >= 10
Log.Log(EQEmuLogSys::Error, "HandlePacket() Opcode error: Unexpected packet during CLIENT_CONNECTING: opcode:"
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "Invalid size on OP_ApproveZone: Expected %i, Got %i",
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "Invalid size on OP_ClientError: Expected %i, Got %i",
Log.DebugCategory(EQEmuLogSys::General, 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;
Log.Log(EQEmuLogSys::Error, "Client error: %s", error->character_name);
Log.Log(EQEmuLogSys::Error, "Error message: %s", error->message);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Client error: %s", error->character_name);
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "Received invalid sized OP_SetServerFilter");
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "Invalid size on OP_TGB: Expected %i, Got %i",
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "GetAuth() returned false kicking client");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "GetAuth() returned false kicking client");
if (client != 0) {
client->Save();
client->Kick();
@ -1340,7 +1340,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
struct in_addr ghost_addr;
ghost_addr.s_addr = eqs->GetRemoteIP();
Log.Log(EQEmuLogSys::Error, "Ghosting client: Account ID:%i Name:%s Character:%s IP:%s",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Ghosting client: Account ID:%i Name:%s Character:%s IP:%s",
client->AccountID(), client->AccountName(), client->GetName(), inet_ntoa(ghost_addr));
client->Save();
client->Disconnect();
@ -1729,7 +1729,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
p_timers.SetCharID(CharacterID());
if (!p_timers.Load(&database)) {
Log.Log(EQEmuLogSys::Error, "Unable to load ability timers from the database for %s (%i)!", GetCleanName(), CharacterID());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load ability timers from the database for %s (%i)!", GetCleanName(), CharacterID());
}
/* Load Spell Slot Refresh from Currently Memoried Spells */
@ -1955,7 +1955,7 @@ void Client::Handle_OP_AdventureInfoRequest(const EQApplicationPacket *app)
{
if (app->size < sizeof(EntityId_Struct))
{
Log.Log(EQEmuLogSys::Error, "Handle_OP_AdventureInfoRequest had a packet that was too small.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Handle_OP_AdventureInfoRequest had a packet that was too small.");
return;
}
EntityId_Struct* ent = (EntityId_Struct*)app->pBuffer;
@ -2010,7 +2010,7 @@ void Client::Handle_OP_AdventureMerchantPurchase(const EQApplicationPacket *app)
{
if (app->size != sizeof(Adventure_Purchase_Struct))
{
Log.Log(EQEmuLogSys::Error, "OP size error: OP_AdventureMerchantPurchase expected:%i got:%i", sizeof(Adventure_Purchase_Struct), app->size);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "OP size error: OP_AdventureMerchantPurchase expected:%i got:%i", sizeof(Adventure_Purchase_Struct), app->size);
return;
}
@ -2190,7 +2190,7 @@ void Client::Handle_OP_AdventureMerchantRequest(const EQApplicationPacket *app)
{
if (app->size != sizeof(AdventureMerchant_Struct))
{
Log.Log(EQEmuLogSys::Error, "OP size error: OP_AdventureMerchantRequest expected:%i got:%i", sizeof(AdventureMerchant_Struct), app->size);
Log.DebugCategory(EQEmuLogSys::General, 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);
@ -2412,7 +2412,7 @@ void Client::Handle_OP_AdventureRequest(const EQApplicationPacket *app)
{
if (app->size < sizeof(AdventureRequest_Struct))
{
Log.Log(EQEmuLogSys::Error, "Handle_OP_AdventureRequest had a packet that was too small.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Handle_OP_AdventureRequest had a packet that was too small.");
return;
}
@ -2938,7 +2938,7 @@ void Client::Handle_OP_AltCurrencySellSelection(const EQApplicationPacket *app)
void Client::Handle_OP_Animation(const EQApplicationPacket *app)
{
if (app->size != sizeof(Animation_Struct)) {
Log.Log(EQEmuLogSys::Error, "Received invalid sized "
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received invalid sized "
"OP_Animation: got %d, expected %d", app->size,
sizeof(Animation_Struct));
DumpPacket(app);
@ -2957,7 +2957,7 @@ void Client::Handle_OP_Animation(const EQApplicationPacket *app)
void Client::Handle_OP_ApplyPoison(const EQApplicationPacket *app)
{
if (app->size != sizeof(ApplyPoison_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_ApplyPoison, size=%i, expected %i", app->size, sizeof(ApplyPoison_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_ApplyPoison, size=%i, expected %i", app->size, sizeof(ApplyPoison_Struct));
DumpPacket(app);
return;
}
@ -3071,7 +3071,7 @@ void Client::Handle_OP_AugmentInfo(const EQApplicationPacket *app)
void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
{
if (app->size != sizeof(AugmentItem_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for AugmentItem_Struct: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for AugmentItem_Struct: Expected: %i, Got: %i",
sizeof(AugmentItem_Struct), app->size);
return;
}
@ -3228,7 +3228,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
void Client::Handle_OP_AutoAttack(const EQApplicationPacket *app)
{
if (app->size != 4) {
Log.Log(EQEmuLogSys::Error, "OP size error: OP_AutoAttack expected:4 got:%i", app->size);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "OP size error: OP_AutoAttack expected:4 got:%i", app->size);
return;
}
@ -3580,7 +3580,7 @@ void Client::Handle_OP_Barter(const EQApplicationPacket *app)
void Client::Handle_OP_BazaarInspect(const EQApplicationPacket *app)
{
if (app->size != sizeof(BazaarInspect_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for BazaarInspect_Struct: Expected %i, Got %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for BazaarInspect_Struct: Expected %i, Got %i",
sizeof(BazaarInspect_Struct), app->size);
return;
}
@ -3636,7 +3636,7 @@ void Client::Handle_OP_BazaarSearch(const EQApplicationPacket *app)
}
else {
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Malformed BazaarSearch_Struct packe, Action %it received, ignoring...");
Log.Log(EQEmuLogSys::Error, "Malformed BazaarSearch_Struct packet received, ignoring...\n");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Malformed BazaarSearch_Struct packet received, ignoring...\n");
}
return;
@ -3721,13 +3721,13 @@ void Client::Handle_OP_Begging(const EQApplicationPacket *app)
void Client::Handle_OP_Bind_Wound(const EQApplicationPacket *app)
{
if (app->size != sizeof(BindWound_Struct)){
Log.Log(EQEmuLogSys::Error, "Size mismatch for Bind wound packet");
Log.DebugCategory(EQEmuLogSys::General, 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){
Log.Log(EQEmuLogSys::Error, "Bindwound on non-exsistant mob from %s", this->GetName());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Bindwound on non-exsistant mob from %s", this->GetName());
}
else {
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "BindWound in: to:\'%s\' from=\'%s\'", bindmob->GetName(), GetName());
@ -3838,7 +3838,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) {
Log.Log(EQEmuLogSys::Error, "Size mismatch in OP_BoardBoad. Expected greater than 5 less than 64, got %i", app->size);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Size mismatch in OP_BoardBoad. Expected greater than 5 less than 64, got %i", app->size);
DumpPacket(app);
return;
}
@ -3859,7 +3859,7 @@ void Client::Handle_OP_Buff(const EQApplicationPacket *app)
{
if (app->size != sizeof(SpellBuffFade_Struct))
{
Log.Log(EQEmuLogSys::Error, "Size mismatch in OP_Buff. expected %i got %i", sizeof(SpellBuffFade_Struct), app->size);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Size mismatch in OP_Buff. expected %i got %i", sizeof(SpellBuffFade_Struct), app->size);
DumpPacket(app);
return;
}
@ -3955,7 +3955,7 @@ void Client::Handle_OP_CancelTask(const EQApplicationPacket *app)
void Client::Handle_OP_CancelTrade(const EQApplicationPacket *app)
{
if (app->size != sizeof(CancelTrade_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_CancelTrade, size=%i, expected %i", app->size, sizeof(CancelTrade_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_CancelTrade, size=%i, expected %i", app->size, sizeof(CancelTrade_Struct));
return;
}
Mob* with = trade->With();
@ -4234,7 +4234,7 @@ void Client::Handle_OP_ClearSurname(const EQApplicationPacket *app)
void Client::Handle_OP_ClickDoor(const EQApplicationPacket *app)
{
if (app->size != sizeof(ClickDoor_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_ClickDoor, size=%i, expected %i", app->size, sizeof(ClickDoor_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_ClickDoor, size=%i, expected %i", app->size, sizeof(ClickDoor_Struct));
return;
}
ClickDoor_Struct* cd = (ClickDoor_Struct*)app->pBuffer;
@ -4259,7 +4259,7 @@ void Client::Handle_OP_ClickDoor(const EQApplicationPacket *app)
void Client::Handle_OP_ClickObject(const EQApplicationPacket *app)
{
if (app->size != sizeof(ClickObject_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size on ClickObject_Struct: Expected %i, Got %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size on ClickObject_Struct: Expected %i, Got %i",
sizeof(ClickObject_Struct), app->size);
return;
}
@ -4310,7 +4310,7 @@ void Client::Handle_OP_ClickObjectAction(const EQApplicationPacket *app)
else
{
if (app->size != sizeof(ClickObjectAction_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size on OP_ClickObjectAction: Expected %i, Got %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size on OP_ClickObjectAction: Expected %i, Got %i",
sizeof(ClickObjectAction_Struct), app->size);
return;
}
@ -4323,11 +4323,11 @@ void Client::Handle_OP_ClickObjectAction(const EQApplicationPacket *app)
object->Close();
}
else {
Log.Log(EQEmuLogSys::Error, "Unsupported action %d in OP_ClickObjectAction", oos->open);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unsupported action %d in OP_ClickObjectAction", oos->open);
}
}
else {
Log.Log(EQEmuLogSys::Error, "Invalid object %d in OP_ClickObjectAction", oos->drop_id);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid object %d in OP_ClickObjectAction", oos->drop_id);
}
}
@ -4344,8 +4344,8 @@ void Client::Handle_OP_ClickObjectAction(const EQApplicationPacket *app)
void Client::Handle_OP_ClientError(const EQApplicationPacket *app)
{
ClientError_Struct* error = (ClientError_Struct*)app->pBuffer;
Log.Log(EQEmuLogSys::Error, "Client error: %s", error->character_name);
Log.Log(EQEmuLogSys::Error, "Error message:%s", error->message);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Client error: %s", error->character_name);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error message:%s", error->message);
return;
}
@ -4366,7 +4366,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
if (app->size != sizeof(PlayerPositionUpdateClient_Struct)
&& app->size != (sizeof(PlayerPositionUpdateClient_Struct)+1)
) {
Log.Log(EQEmuLogSys::Error, "OP size error: OP_ClientUpdate expected:%i got:%i", sizeof(PlayerPositionUpdateClient_Struct), app->size);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "OP size error: OP_ClientUpdate expected:%i got:%i", sizeof(PlayerPositionUpdateClient_Struct), app->size);
return;
}
PlayerPositionUpdateClient_Struct* ppu = (PlayerPositionUpdateClient_Struct*)app->pBuffer;
@ -4872,7 +4872,7 @@ void Client::Handle_OP_Consume(const EQApplicationPacket *app)
{
if (app->size != sizeof(Consume_Struct))
{
Log.Log(EQEmuLogSys::Error, "OP size error: OP_Consume expected:%i got:%i", sizeof(Consume_Struct), app->size);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "OP size error: OP_Consume expected:%i got:%i", sizeof(Consume_Struct), app->size);
return;
}
Consume_Struct* pcs = (Consume_Struct*)app->pBuffer;
@ -4909,7 +4909,7 @@ void Client::Handle_OP_Consume(const EQApplicationPacket *app)
ItemInst *myitem = GetInv().GetItem(pcs->slot);
if (myitem == nullptr) {
Log.Log(EQEmuLogSys::Error, "Consuming from empty slot %d", pcs->slot);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Consuming from empty slot %d", pcs->slot);
return;
}
@ -4921,7 +4921,7 @@ void Client::Handle_OP_Consume(const EQApplicationPacket *app)
Consume(eat_item, ItemTypeDrink, pcs->slot, (pcs->auto_consumed == 0xffffffff));
}
else {
Log.Log(EQEmuLogSys::Error, "OP_Consume: unknown type, type:%i", (int)pcs->type);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "OP_Consume: unknown type, type:%i", (int)pcs->type);
return;
}
if (m_pp.hunger_level > 50000)
@ -4942,7 +4942,7 @@ void Client::Handle_OP_Consume(const EQApplicationPacket *app)
void Client::Handle_OP_ControlBoat(const EQApplicationPacket *app)
{
if (app->size != sizeof(ControlBoat_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_ControlBoat, size=%i, expected %i", app->size, sizeof(ControlBoat_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_ControlBoat, size=%i, expected %i", app->size, sizeof(ControlBoat_Struct));
return;
}
ControlBoat_Struct* cbs = (ControlBoat_Struct*)app->pBuffer;
@ -5098,7 +5098,7 @@ void Client::Handle_OP_CrystalReclaim(const EQApplicationPacket *app)
void Client::Handle_OP_Damage(const EQApplicationPacket *app)
{
if (app->size != sizeof(CombatDamage_Struct)) {
Log.Log(EQEmuLogSys::Error, "Received invalid sized OP_Damage: got %d, expected %d", app->size,
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received invalid sized OP_Damage: got %d, expected %d", app->size,
sizeof(CombatDamage_Struct));
DumpPacket(app);
return;
@ -5445,7 +5445,7 @@ void Client::Handle_OP_Dye(const EQApplicationPacket *app)
void Client::Handle_OP_Emote(const EQApplicationPacket *app)
{
if (app->size != sizeof(Emote_Struct)) {
Log.Log(EQEmuLogSys::Error, "Received invalid sized "
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received invalid sized "
"OP_Emote: got %d, expected %d", app->size,
sizeof(Emote_Struct));
DumpPacket(app);
@ -5536,7 +5536,7 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app)
}
if (app->size != sizeof(EnvDamage2_Struct)) {
Log.Log(EQEmuLogSys::Error, "Received invalid sized OP_EnvDamage: got %d, expected %d", app->size,
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received invalid sized OP_EnvDamage: got %d, expected %d", app->size,
sizeof(EnvDamage2_Struct));
DumpPacket(app);
return;
@ -5591,7 +5591,7 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app)
void Client::Handle_OP_FaceChange(const EQApplicationPacket *app)
{
if (app->size != sizeof(FaceChange_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for OP_FaceChange: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for OP_FaceChange: Expected: %i, Got: %i",
sizeof(FaceChange_Struct), app->size);
return;
}
@ -5858,7 +5858,7 @@ void Client::Handle_OP_GMBecomeNPC(const EQApplicationPacket *app)
return;
}
if (app->size != sizeof(BecomeNPC_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_GMBecomeNPC, size=%i, expected %i", app->size, sizeof(BecomeNPC_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_GMBecomeNPC, size=%i, expected %i", app->size, sizeof(BecomeNPC_Struct));
return;
}
//entity_list.QueueClients(this, app, false);
@ -5910,7 +5910,7 @@ void Client::Handle_OP_GMEmoteZone(const EQApplicationPacket *app)
return;
}
if (app->size != sizeof(GMEmoteZone_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_GMEmoteZone, size=%i, expected %i", app->size, sizeof(GMEmoteZone_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_GMEmoteZone, size=%i, expected %i", app->size, sizeof(GMEmoteZone_Struct));
return;
}
GMEmoteZone_Struct* gmez = (GMEmoteZone_Struct*)app->pBuffer;
@ -5943,7 +5943,7 @@ void Client::Handle_OP_GMFind(const EQApplicationPacket *app)
return;
}
if (app->size != sizeof(GMSummon_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_GMFind, size=%i, expected %i", app->size, sizeof(GMSummon_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_GMFind, size=%i, expected %i", app->size, sizeof(GMSummon_Struct));
return;
}
//Break down incoming
@ -6008,7 +6008,7 @@ void Client::Handle_OP_GMHideMe(const EQApplicationPacket *app)
return;
}
if (app->size != sizeof(SpawnAppearance_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_GMHideMe, size=%i, expected %i", app->size, sizeof(SpawnAppearance_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_GMHideMe, size=%i, expected %i", app->size, sizeof(SpawnAppearance_Struct));
return;
}
SpawnAppearance_Struct* sa = (SpawnAppearance_Struct*)app->pBuffer;
@ -6058,7 +6058,7 @@ void Client::Handle_OP_GMKill(const EQApplicationPacket *app)
return;
}
if (app->size != sizeof(GMKill_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_GMKill, size=%i, expected %i", app->size, sizeof(GMKill_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_GMKill, size=%i, expected %i", app->size, sizeof(GMKill_Struct));
return;
}
GMKill_Struct* gmk = (GMKill_Struct *)app->pBuffer;
@ -6125,7 +6125,7 @@ void Client::Handle_OP_GMLastName(const EQApplicationPacket *app)
void Client::Handle_OP_GMNameChange(const EQApplicationPacket *app)
{
if (app->size != sizeof(GMName_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_GMNameChange, size=%i, expected %i", app->size, sizeof(GMName_Struct));
Log.DebugCategory(EQEmuLogSys::General, 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;
@ -6379,7 +6379,7 @@ void Client::Handle_OP_GMZoneRequest2(const EQApplicationPacket *app)
return;
}
if (app->size < sizeof(uint32)) {
Log.Log(EQEmuLogSys::Error, "OP size error: OP_GMZoneRequest2 expected:%i got:%i", sizeof(uint32), app->size);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "OP size error: OP_GMZoneRequest2 expected:%i got:%i", sizeof(uint32), app->size);
return;
}
@ -6396,7 +6396,7 @@ void Client::Handle_OP_GroupAcknowledge(const EQApplicationPacket *app)
void Client::Handle_OP_GroupCancelInvite(const EQApplicationPacket *app)
{
if (app->size != sizeof(GroupCancel_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for OP_GroupCancelInvite: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for OP_GroupCancelInvite: Expected: %i, Got: %i",
sizeof(GroupCancel_Struct), app->size);
return;
}
@ -6440,7 +6440,7 @@ void Client::Handle_OP_GroupDelete(const EQApplicationPacket *app)
void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
{
if (app->size != sizeof(GroupGeneric_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for GroupGeneric_Struct: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for GroupGeneric_Struct: Expected: %i, Got: %i",
sizeof(GroupGeneric_Struct), app->size);
return;
}
@ -6587,7 +6587,7 @@ void Client::Handle_OP_GroupDisband(const EQApplicationPacket *app)
}
else
{
Log.Log(EQEmuLogSys::Error, "Failed to remove player from group. Unable to find player named %s in player group", gd->name2);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to remove player from group. Unable to find player named %s in player group", gd->name2);
}
}
if (LFP)
@ -6607,7 +6607,7 @@ void Client::Handle_OP_GroupFollow(const EQApplicationPacket *app)
void Client::Handle_OP_GroupFollow2(const EQApplicationPacket *app)
{
if (app->size != sizeof(GroupGeneric_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for OP_GroupFollow: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for OP_GroupFollow: Expected: %i, Got: %i",
sizeof(GroupGeneric_Struct), app->size);
return;
}
@ -6656,7 +6656,7 @@ void Client::Handle_OP_GroupInvite(const EQApplicationPacket *app)
void Client::Handle_OP_GroupInvite2(const EQApplicationPacket *app)
{
if (app->size != sizeof(GroupInvite_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for OP_GroupInvite: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for OP_GroupInvite: Expected: %i, Got: %i",
sizeof(GroupInvite_Struct), app->size);
return;
}
@ -6734,7 +6734,7 @@ void Client::Handle_OP_GroupMakeLeader(const EQApplicationPacket *app)
void Client::Handle_OP_GroupMentor(const EQApplicationPacket *app)
{
if (app->size != sizeof(GroupMentor_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_GroupMentor, size=%i, expected %i", app->size, sizeof(GroupMentor_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_GroupMentor, size=%i, expected %i", app->size, sizeof(GroupMentor_Struct));
DumpPacket(app);
return;
}
@ -6770,7 +6770,7 @@ void Client::Handle_OP_GroupMentor(const EQApplicationPacket *app)
void Client::Handle_OP_GroupRoles(const EQApplicationPacket *app)
{
if (app->size != sizeof(GroupRole_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_GroupRoles, size=%i, expected %i", app->size, sizeof(GroupRole_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_GroupRoles, size=%i, expected %i", app->size, sizeof(GroupRole_Struct));
DumpPacket(app);
return;
}
@ -6864,7 +6864,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
}
if (app->size < sizeof(uint32)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_GuildBank, size=%i, expected %i", app->size, sizeof(uint32));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_GuildBank, size=%i, expected %i", app->size, sizeof(uint32));
DumpPacket(app);
return;
}
@ -6889,7 +6889,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
{
if ((Action != GuildBankDeposit) && (Action != GuildBankViewItem) && (Action != GuildBankWithdraw))
{
Log.Log(EQEmuLogSys::Error, "Suspected hacking attempt on guild bank from %s", GetName());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Suspected hacking attempt on guild bank from %s", GetName());
GuildBankAck();
@ -7050,7 +7050,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
if (!IsGuildBanker() && !GuildBanks->AllowedToWithdraw(GuildID(), gbwis->Area, gbwis->SlotID, GetName()))
{
Log.Log(EQEmuLogSys::Error, "Suspected attempted hack on the guild bank from %s", GetName());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Suspected attempted hack on the guild bank from %s", GetName());
GuildBankAck();
@ -7121,7 +7121,7 @@ void Client::Handle_OP_GuildBank(const EQApplicationPacket *app)
{
Message(13, "Unexpected GuildBank action.");
Log.Log(EQEmuLogSys::Error, "Received unexpected guild bank action code %i from %s", Action, GetName());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received unexpected guild bank action code %i from %s", Action, GetName());
}
}
}
@ -7972,7 +7972,7 @@ void Client::Handle_OP_Ignore(const EQApplicationPacket *app)
void Client::Handle_OP_Illusion(const EQApplicationPacket *app)
{
if (app->size != sizeof(Illusion_Struct)) {
Log.Log(EQEmuLogSys::Error, "Received invalid sized OP_Illusion: got %d, expected %d", app->size,
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received invalid sized OP_Illusion: got %d, expected %d", app->size,
sizeof(Illusion_Struct));
DumpPacket(app);
return;
@ -8002,7 +8002,7 @@ void Client::Handle_OP_InspectAnswer(const EQApplicationPacket *app)
{
if (app->size != sizeof(InspectResponse_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_InspectAnswer, size=%i, expected %i", app->size, sizeof(InspectResponse_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_InspectAnswer, size=%i, expected %i", app->size, sizeof(InspectResponse_Struct));
return;
}
@ -8057,7 +8057,7 @@ void Client::Handle_OP_InspectMessageUpdate(const EQApplicationPacket *app)
{
if (app->size != sizeof(InspectMessage_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_InspectMessageUpdate, size=%i, expected %i", app->size, sizeof(InspectMessage_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_InspectMessageUpdate, size=%i, expected %i", app->size, sizeof(InspectMessage_Struct));
return;
}
@ -8071,7 +8071,7 @@ void Client::Handle_OP_InspectRequest(const EQApplicationPacket *app)
{
if (app->size != sizeof(Inspect_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_InspectRequest, size=%i, expected %i", app->size, sizeof(Inspect_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_InspectRequest, size=%i, expected %i", app->size, sizeof(Inspect_Struct));
return;
}
@ -8108,7 +8108,7 @@ void Client::Handle_OP_InstillDoubt(const EQApplicationPacket *app)
void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app)
{
if (app->size != sizeof(ItemViewRequest_Struct)){
Log.Log(EQEmuLogSys::Error, "Wrong size on OP_ItemLinkClick. Got: %i, Expected: %i", app->size, sizeof(ItemViewRequest_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size on OP_ItemLinkClick. Got: %i, Expected: %i", app->size, sizeof(ItemViewRequest_Struct));
DumpPacket(app);
return;
}
@ -8208,7 +8208,7 @@ void Client::Handle_OP_ItemLinkClick(const EQApplicationPacket *app)
void Client::Handle_OP_ItemLinkResponse(const EQApplicationPacket *app)
{
if (app->size != sizeof(LDONItemViewRequest_Struct)) {
Log.Log(EQEmuLogSys::Error, "OP size error: OP_ItemLinkResponse expected:%i got:%i", sizeof(LDONItemViewRequest_Struct), app->size);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "OP size error: OP_ItemLinkResponse expected:%i got:%i", sizeof(LDONItemViewRequest_Struct), app->size);
return;
}
LDONItemViewRequest_Struct* item = (LDONItemViewRequest_Struct*)app->pBuffer;
@ -8223,7 +8223,7 @@ void Client::Handle_OP_ItemLinkResponse(const EQApplicationPacket *app)
void Client::Handle_OP_ItemName(const EQApplicationPacket *app)
{
if (app->size != sizeof(ItemNamePacket_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for ItemNamePacket_Struct: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for ItemNamePacket_Struct: Expected: %i, Got: %i",
sizeof(ItemNamePacket_Struct), app->size);
return;
}
@ -8421,7 +8421,7 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
{
if (app->size != sizeof(ItemVerifyRequest_Struct))
{
Log.Log(EQEmuLogSys::Error, "OP size error: OP_ItemVerifyRequest expected:%i got:%i", sizeof(ItemVerifyRequest_Struct), app->size);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "OP size error: OP_ItemVerifyRequest expected:%i got:%i", sizeof(ItemVerifyRequest_Struct), app->size);
return;
}
@ -8874,7 +8874,7 @@ void Client::Handle_OP_LFGGetMatchesRequest(const EQApplicationPacket *app)
{
if (app->size != sizeof(LFGGetMatchesRequest_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_LFGGetMatchesRequest, size=%i, expected %i", app->size, sizeof(LFGGetMatchesRequest_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_LFGGetMatchesRequest, size=%i, expected %i", app->size, sizeof(LFGGetMatchesRequest_Struct));
DumpPacket(app);
return;
}
@ -9034,7 +9034,7 @@ void Client::Handle_OP_LFPCommand(const EQApplicationPacket *app)
{
if (app->size != sizeof(LFP_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_LFPCommand, size=%i, expected %i", app->size, sizeof(LFP_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_LFPCommand, size=%i, expected %i", app->size, sizeof(LFP_Struct));
DumpPacket(app);
return;
}
@ -9071,7 +9071,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)) {
Log.Log(EQEmuLogSys::Error, "Client sent LFP on for character %s who is grouped but not leader.", GetName());
Log.DebugCategory(EQEmuLogSys::General, 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
@ -9096,7 +9096,7 @@ void Client::Handle_OP_LFPGetMatchesRequest(const EQApplicationPacket *app)
{
if (app->size != sizeof(LFPGetMatchesRequest_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_LFPGetMatchesRequest, size=%i, expected %i", app->size, sizeof(LFPGetMatchesRequest_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_LFPGetMatchesRequest, size=%i, expected %i", app->size, sizeof(LFPGetMatchesRequest_Struct));
DumpPacket(app);
return;
}
@ -9150,7 +9150,7 @@ void Client::Handle_OP_Logout(const EQApplicationPacket *app)
void Client::Handle_OP_LootItem(const EQApplicationPacket *app)
{
if (app->size != sizeof(LootingItem_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_LootItem, size=%i, expected %i", app->size, sizeof(LootingItem_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_LootItem, size=%i, expected %i", app->size, sizeof(LootingItem_Struct));
return;
}
@ -9698,7 +9698,7 @@ void Client::Handle_OP_MercenaryTimerRequest(const EQApplicationPacket *app)
void Client::Handle_OP_MoveCoin(const EQApplicationPacket *app)
{
if (app->size != sizeof(MoveCoin_Struct)){
Log.Log(EQEmuLogSys::Error, "Wrong size on OP_MoveCoin. Got: %i, Expected: %i", app->size, sizeof(MoveCoin_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size on OP_MoveCoin. Got: %i, Expected: %i", app->size, sizeof(MoveCoin_Struct));
DumpPacket(app);
return;
}
@ -9714,7 +9714,7 @@ void Client::Handle_OP_MoveItem(const EQApplicationPacket *app)
}
if (app->size != sizeof(MoveItem_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_MoveItem, size=%i, expected %i", app->size, sizeof(MoveItem_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_MoveItem, size=%i, expected %i", app->size, sizeof(MoveItem_Struct));
return;
}
@ -9856,7 +9856,7 @@ void Client::Handle_OP_OpenTributeMaster(const EQApplicationPacket *app)
void Client::Handle_OP_PDeletePetition(const EQApplicationPacket *app)
{
if (app->size < 2) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_PDeletePetition, size=%i, expected %i", app->size, 2);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_PDeletePetition, size=%i, expected %i", app->size, 2);
return;
}
if (petition_list.DeletePetitionByCharName((char*)app->pBuffer))
@ -9869,7 +9869,7 @@ void Client::Handle_OP_PDeletePetition(const EQApplicationPacket *app)
void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
{
if (app->size != sizeof(PetCommand_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_PetCommands, size=%i, expected %i", app->size, sizeof(PetCommand_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_PetCommands, size=%i, expected %i", app->size, sizeof(PetCommand_Struct));
return;
}
char val1[20] = { 0 };
@ -10332,7 +10332,7 @@ void Client::Handle_OP_PetitionBug(const EQApplicationPacket *app)
void Client::Handle_OP_PetitionCheckIn(const EQApplicationPacket *app)
{
if (app->size != sizeof(Petition_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_PetitionCheckIn, size=%i, expected %i", app->size, sizeof(Petition_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_PetitionCheckIn, size=%i, expected %i", app->size, sizeof(Petition_Struct));
return;
}
Petition_Struct* inpet = (Petition_Struct*)app->pBuffer;
@ -10376,7 +10376,7 @@ void Client::Handle_OP_PetitionCheckout(const EQApplicationPacket *app)
void Client::Handle_OP_PetitionDelete(const EQApplicationPacket *app)
{
if (app->size != sizeof(PetitionUpdate_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_PetitionDelete, size=%i, expected %i", app->size, sizeof(PetitionUpdate_Struct));
Log.DebugCategory(EQEmuLogSys::General, 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));
@ -10446,7 +10446,7 @@ void Client::Handle_OP_PickPocket(const EQApplicationPacket *app)
{
if (app->size != sizeof(PickPocket_Struct))
{
Log.Log(EQEmuLogSys::Error, "Size mismatch for Pick Pocket packet");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Size mismatch for Pick Pocket packet");
DumpPacket(app);
}
@ -10720,7 +10720,7 @@ void Client::Handle_OP_PVPLeaderBoardRequest(const EQApplicationPacket *app)
void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
{
if (app->size < sizeof(RaidGeneral_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_RaidCommand, size=%i, expected at least %i", app->size, sizeof(RaidGeneral_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_RaidCommand, size=%i, expected at least %i", app->size, sizeof(RaidGeneral_Struct));
DumpPacket(app);
return;
}
@ -11305,7 +11305,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
void Client::Handle_OP_RandomReq(const EQApplicationPacket *app)
{
if (app->size != sizeof(RandomReq_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_RandomReq, size=%i, expected %i", app->size, sizeof(RandomReq_Struct));
Log.DebugCategory(EQEmuLogSys::General, 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;
@ -11334,7 +11334,7 @@ void Client::Handle_OP_RandomReq(const EQApplicationPacket *app)
void Client::Handle_OP_ReadBook(const EQApplicationPacket *app)
{
if (app->size != sizeof(BookRequest_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_ReadBook, size=%i, expected %i", app->size, sizeof(BookRequest_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_ReadBook, size=%i, expected %i", app->size, sizeof(BookRequest_Struct));
return;
}
BookRequest_Struct* book = (BookRequest_Struct*)app->pBuffer;
@ -11350,7 +11350,7 @@ void Client::Handle_OP_ReadBook(const EQApplicationPacket *app)
void Client::Handle_OP_RecipeAutoCombine(const EQApplicationPacket *app)
{
if (app->size != sizeof(RecipeAutoCombine_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for RecipeAutoCombine_Struct: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for RecipeAutoCombine_Struct: Expected: %i, Got: %i",
sizeof(RecipeAutoCombine_Struct), app->size);
return;
}
@ -11364,7 +11364,7 @@ void Client::Handle_OP_RecipeAutoCombine(const EQApplicationPacket *app)
void Client::Handle_OP_RecipeDetails(const EQApplicationPacket *app)
{
if (app->size < sizeof(uint32)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for RecipeDetails Request: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for RecipeDetails Request: Expected: %i, Got: %i",
sizeof(uint32), app->size);
return;
}
@ -11378,7 +11378,7 @@ void Client::Handle_OP_RecipeDetails(const EQApplicationPacket *app)
void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app)
{
if (app->size != sizeof(TradeskillFavorites_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for TradeskillFavorites_Struct: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for TradeskillFavorites_Struct: Expected: %i, Got: %i",
sizeof(TradeskillFavorites_Struct), app->size);
return;
}
@ -11437,7 +11437,7 @@ void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app)
void Client::Handle_OP_RecipesSearch(const EQApplicationPacket *app)
{
if (app->size != sizeof(RecipesSearch_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for RecipesSearch_Struct: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for RecipesSearch_Struct: Expected: %i, Got: %i",
sizeof(RecipesSearch_Struct), app->size);
return;
}
@ -11727,7 +11727,7 @@ void Client::Handle_OP_Sacrifice(const EQApplicationPacket *app)
Sacrifice_Struct *ss = (Sacrifice_Struct*)app->pBuffer;
if (!PendingSacrifice) {
Log.Log(EQEmuLogSys::Error, "Unexpected OP_Sacrifice reply");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected OP_Sacrifice reply");
DumpPacket(app);
return;
}
@ -11771,7 +11771,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))
Log.Log(EQEmuLogSys::Error, "Invalid size on OP_SelectTribute packet");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size on OP_SelectTribute packet");
else {
SelectTributeReq_Struct *t = (SelectTributeReq_Struct *)app->pBuffer;
SendTributeDetails(t->client_id, t->tribute_id);
@ -11884,7 +11884,7 @@ void Client::Handle_OP_SetRunMode(const EQApplicationPacket *app)
void Client::Handle_OP_SetServerFilter(const EQApplicationPacket *app)
{
if (app->size != sizeof(SetServerFilter_Struct)) {
Log.Log(EQEmuLogSys::Error, "Received invalid sized "
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received invalid sized "
"OP_SetServerFilter: got %d, expected %d", app->size,
sizeof(SetServerFilter_Struct));
DumpPacket(app);
@ -11904,7 +11904,7 @@ void Client::Handle_OP_SetStartCity(const EQApplicationPacket *app)
}
if (app->size < 1) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_SetStartCity, size=%i, expected %i", app->size, 1);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_SetStartCity, size=%i, expected %i", app->size, 1);
DumpPacket(app);
return;
}
@ -11918,7 +11918,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()) {
Log.Log(EQEmuLogSys::Error, "No valid start zones found for /setstartcity");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "No valid start zones found for /setstartcity");
return;
}
@ -11993,7 +11993,7 @@ void Client::Handle_OP_SetTitle(const EQApplicationPacket *app)
void Client::Handle_OP_Shielding(const EQApplicationPacket *app)
{
if (app->size != sizeof(Shielding_Struct)) {
Log.Log(EQEmuLogSys::Error, "OP size error: OP_Shielding expected:%i got:%i", sizeof(Shielding_Struct), app->size);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "OP size error: OP_Shielding expected:%i got:%i", sizeof(Shielding_Struct), app->size);
return;
}
if (GetClass() != WARRIOR)
@ -12090,7 +12090,7 @@ void Client::Handle_OP_ShopEnd(const EQApplicationPacket *app)
void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app)
{
if (app->size != sizeof(Merchant_Sell_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size on OP_ShopPlayerBuy: Expected %i, Got %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size on OP_ShopPlayerBuy: Expected %i, Got %i",
sizeof(Merchant_Sell_Struct), app->size);
return;
}
@ -12258,7 +12258,7 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app)
SendItemPacket(freeslotid, inst, ItemPacketTrade);
}
else if (!stacked){
Log.Log(EQEmuLogSys::Error, "OP_ShopPlayerBuy: item->ItemClass Unknown! Type: %i", item->ItemClass);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "OP_ShopPlayerBuy: item->ItemClass Unknown! Type: %i", item->ItemClass);
}
QueuePacket(outapp);
if (inst && tmpmer_used){
@ -12348,7 +12348,7 @@ void Client::Handle_OP_ShopPlayerBuy(const EQApplicationPacket *app)
void Client::Handle_OP_ShopPlayerSell(const EQApplicationPacket *app)
{
if (app->size != sizeof(Merchant_Purchase_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size on OP_ShopPlayerSell: Expected %i, Got %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size on OP_ShopPlayerSell: Expected %i, Got %i",
sizeof(Merchant_Purchase_Struct), app->size);
return;
}
@ -12504,7 +12504,7 @@ void Client::Handle_OP_ShopPlayerSell(const EQApplicationPacket *app)
void Client::Handle_OP_ShopRequest(const EQApplicationPacket *app)
{
if (app->size != sizeof(Merchant_Click_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_ShopRequest, size=%i, expected %i", app->size, sizeof(Merchant_Click_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size: OP_ShopRequest, size=%i, expected %i", app->size, sizeof(Merchant_Click_Struct));
return;
}
@ -12797,7 +12797,7 @@ void Client::Handle_OP_SpawnAppearance(const EQApplicationPacket *app)
void Client::Handle_OP_Split(const EQApplicationPacket *app)
{
if (app->size != sizeof(Split_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_Split, size=%i, expected %i", app->size, sizeof(Split_Struct));
Log.DebugCategory(EQEmuLogSys::General, 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
@ -12924,7 +12924,7 @@ void Client::Handle_OP_SwapSpell(const EQApplicationPacket *app)
void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
{
if (app->size != sizeof(ClientTarget_Struct)) {
Log.Log(EQEmuLogSys::Error, "OP size error: OP_TargetMouse expected:%i got:%i", sizeof(ClientTarget_Struct), app->size);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "OP size error: OP_TargetMouse expected:%i got:%i", sizeof(ClientTarget_Struct), app->size);
return;
}
@ -13202,7 +13202,7 @@ void Client::Handle_OP_Track(const EQApplicationPacket *app)
CheckIncreaseSkill(SkillTracking, nullptr, 15);
if (!entity_list.MakeTrackPacket(this))
Log.Log(EQEmuLogSys::Error, "Unable to generate OP_Track packet requested by client.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to generate OP_Track packet requested by client.");
return;
}
@ -13216,7 +13216,7 @@ void Client::Handle_OP_TrackTarget(const EQApplicationPacket *app)
if (app->size != sizeof(TrackTarget_Struct))
{
Log.Log(EQEmuLogSys::Error, "Invalid size for OP_TrackTarget: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for OP_TrackTarget: Expected: %i, Got: %i",
sizeof(TrackTarget_Struct), app->size);
return;
}
@ -13369,7 +13369,7 @@ void Client::Handle_OP_TradeAcceptClick(const EQApplicationPacket *app)
void Client::Handle_OP_TradeBusy(const EQApplicationPacket *app)
{
if (app->size != sizeof(TradeBusy_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_TradeBusy, size=%i, expected %i", app->size, sizeof(TradeBusy_Struct));
Log.DebugCategory(EQEmuLogSys::General, 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
@ -13515,7 +13515,7 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app)
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Client::Handle_OP_Trader: Unknown TraderStruct code of: %i\n",
ints->Code);
Log.Log(EQEmuLogSys::Error, "Unknown TraderStruct code of: %i\n", ints->Code);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown TraderStruct code of: %i\n", ints->Code);
}
}
@ -13525,7 +13525,7 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app)
}
else {
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Trading, "Unknown size for OP_Trader: %i\n", app->size);
Log.Log(EQEmuLogSys::Error, "Unknown size for OP_Trader: %i\n", app->size);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unknown size for OP_Trader: %i\n", app->size);
DumpPacket(app);
return;
}
@ -13563,7 +13563,7 @@ void Client::Handle_OP_TraderBuy(const EQApplicationPacket *app)
void Client::Handle_OP_TradeRequest(const EQApplicationPacket *app)
{
if (app->size != sizeof(TradeRequest_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_TradeRequest, size=%i, expected %i", app->size, sizeof(TradeRequest_Struct));
Log.DebugCategory(EQEmuLogSys::General, 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
@ -13599,7 +13599,7 @@ void Client::Handle_OP_TradeRequest(const EQApplicationPacket *app)
void Client::Handle_OP_TradeRequestAck(const EQApplicationPacket *app)
{
if (app->size != sizeof(TradeRequest_Struct)) {
Log.Log(EQEmuLogSys::Error, "Wrong size: OP_TradeRequestAck, size=%i, expected %i", app->size, sizeof(TradeRequest_Struct));
Log.DebugCategory(EQEmuLogSys::General, 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
@ -13670,7 +13670,7 @@ void Client::Handle_OP_TraderShop(const EQApplicationPacket *app)
void Client::Handle_OP_TradeSkillCombine(const EQApplicationPacket *app)
{
if (app->size != sizeof(NewCombine_Struct)) {
Log.Log(EQEmuLogSys::Error, "Invalid size for NewCombine_Struct: Expected: %i, Got: %i",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size for NewCombine_Struct: Expected: %i, Got: %i",
sizeof(NewCombine_Struct), app->size);
return;
}
@ -13809,7 +13809,7 @@ void Client::Handle_OP_TributeToggle(const EQApplicationPacket *app)
_pkt(TRIBUTE__IN, app);
if (app->size != sizeof(uint32))
Log.Log(EQEmuLogSys::Error, "Invalid size on OP_TributeToggle packet");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size on OP_TributeToggle packet");
else {
uint32 *val = (uint32 *)app->pBuffer;
ToggleTribute(*val ? true : false);
@ -13824,7 +13824,7 @@ void Client::Handle_OP_TributeUpdate(const EQApplicationPacket *app)
//sent when the client changes their tribute settings...
if (app->size != sizeof(TributeInfo_Struct))
Log.Log(EQEmuLogSys::Error, "Invalid size on OP_TributeUpdate packet");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Invalid size on OP_TributeUpdate packet");
else {
TributeInfo_Struct *t = (TributeInfo_Struct *)app->pBuffer;
ChangeTributeSettings(t);

View File

@ -1201,7 +1201,7 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
{
if(app->size != sizeof(MemorizeSpell_Struct))
{
Log.Log(EQEmuLogSys::Error, "Wrong size on OP_MemorizeSpell. Got: %i, Expected: %i", app->size, sizeof(MemorizeSpell_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Wrong size on OP_MemorizeSpell. Got: %i, Expected: %i", app->size, sizeof(MemorizeSpell_Struct));
DumpPacket(app);
return;
}

View File

@ -494,7 +494,7 @@ int command_add(const char *command_string, const char *desc, int access, CmdFun
std::string cstr(command_string);
if(commandlist.count(cstr) != 0) {
Log.Log(EQEmuLogSys::Error, "command_add() - Command '%s' is a duplicate - check command.cpp." , command_string);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "command_add() - Command '%s' is a duplicate - check command.cpp." , command_string);
return(-1);
}
@ -573,7 +573,7 @@ int command_realdispatch(Client *c, const char *message)
#endif
if(cur->function == nullptr) {
Log.Log(EQEmuLogSys::Error, "Command '%s' has a null function\n", cstr.c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Command '%s' has a null function\n", cstr.c_str());
return(-1);
} else {
//dispatch C++ command

View File

@ -875,7 +875,7 @@ bool Corpse::Process() {
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "Tagged %s player corpse has burried.", this->GetName());
}
else {
Log.Log(EQEmuLogSys::Error, "Unable to bury %s player corpse.", this->GetName());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to bury %s player corpse.", this->GetName());
return true;
}
}

View File

@ -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!");
Log.Log(EQEmuLogSys::Error, "Unable to find turned in tome id %lu\n", (unsigned long)itemid);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to find turned in tome id %lu\n", (unsigned long)itemid);
return(false);
}

View File

@ -3519,7 +3519,7 @@ EXTERN_C XS(boot_quest)
file[255] = '\0';
if(items != 1)
Log.Log(EQEmuLogSys::Error, "boot_quest does not take any arguments.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "boot_quest does not take any arguments.");
char buf[128]; //shouldent have any function names longer than this.

View File

@ -64,7 +64,7 @@ EXTERN_C XS(boot_qc)
file[255] = '\0';
if(items != 1)
Log.Log(EQEmuLogSys::Error, "boot_qc does not take any arguments.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "boot_qc does not take any arguments.");
char buf[128]; //shouldent have any function names longer than this.

View File

@ -371,7 +371,7 @@ void EntityList::CheckGroupList (const char *fname, const int fline)
{
if (*it == nullptr)
{
Log.Log(EQEmuLogSys::Error, "nullptr group, %s:%i", fname, fline);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "nullptr group, %s:%i", fname, fline);
}
}
}
@ -520,12 +520,12 @@ void EntityList::MobProcess()
zone->StartShutdownTimer();
Group *g = GetGroupByMob(mob);
if(g) {
Log.Log(EQEmuLogSys::Error, "About to delete a client still in a group.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "About to delete a client still in a group.");
g->DelMember(mob);
}
Raid *r = entity_list.GetRaidByClient(mob->CastToClient());
if(r) {
Log.Log(EQEmuLogSys::Error, "About to delete a client still in a raid.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "About to delete a client still in a raid.");
r->MemberZoned(mob->CastToClient());
}
entity_list.RemoveClient(id);
@ -557,7 +557,7 @@ void EntityList::AddGroup(Group *group)
uint32 gid = worldserver.NextGroupID();
if (gid == 0) {
Log.Log(EQEmuLogSys::Error,
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error,
"Unable to get new group ID from world server. group is going to be broken.");
return;
}
@ -586,7 +586,7 @@ void EntityList::AddRaid(Raid *raid)
uint32 gid = worldserver.NextGroupID();
if (gid == 0) {
Log.Log(EQEmuLogSys::Error,
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error,
"Unable to get new group ID from world server. group is going to be broken.");
return;
}
@ -2509,7 +2509,7 @@ char *EntityList::MakeNameUnique(char *name)
return name;
}
}
Log.Log(EQEmuLogSys::Error, "Fatal error in EntityList::MakeNameUnique: Unable to find unique name for '%s'", name);
Log.DebugCategory(EQEmuLogSys::General, 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);

View File

@ -430,7 +430,7 @@ void Client::SetEXP(uint32 set_exp, uint32 set_aaxp, bool isrezzexp) {
void Client::SetLevel(uint8 set_level, bool command)
{
if (GetEXPForLevel(set_level) == 0xFFFFFFFF) {
Log.Log(EQEmuLogSys::Error, "Client::SetLevel() GetEXPForLevel(%i) = 0xFFFFFFFF", set_level);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Client::SetLevel() GetEXPForLevel(%i) = 0xFFFFFFFF", set_level);
return;
}

View File

@ -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()) {
Log.Log(EQEmuLogSys::Error, "Error in Forage query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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;
Log.Log(EQEmuLogSys::Error, "Possible Forage: %d with a %d chance", item[index], chance[index]);
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "nullptr returned from database.GetItem in ClientForageItem");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "nullptr returned from database.GetItem in ClientForageItem");
return;
}

View File

@ -1069,7 +1069,7 @@ bool Group::LearnMembers() {
return false;
if (results.RowCount() == 0) {
Log.Log(EQEmuLogSys::Error, "Error getting group members for group %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to set group main tank: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to set group main assist: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to set group main puller: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to clear group main tank: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to clear group main assist: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to clear group main puller: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to set group mentor: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to clear group mentor: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to set group mark npc: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to clear group marknpc: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
}

View File

@ -409,7 +409,7 @@ bool ZoneDatabase::CheckGuildDoor(uint8 doorid, uint16 guild_id, const char* zon
doorid-128, zone);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in CheckGuildDoor query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in CheckGuildDoor query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -429,7 +429,7 @@ bool ZoneDatabase::SetGuildDoor(uint8 doorid,uint16 guild_id, const char* zone)
guild_id, doorid, zone);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in SetGuildDoor query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SetGuildDoor query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}

View File

@ -261,7 +261,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
switch(pack->opcode) {
case ServerOP_RefreshGuild: {
if(pack->size != sizeof(ServerGuildRefresh_Struct)) {
Log.Log(EQEmuLogSys::Error, "Received ServerOP_RefreshGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildRefresh_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received ServerOP_RefreshGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildRefresh_Struct));
return;
}
ServerGuildRefresh_Struct *s = (ServerGuildRefresh_Struct *) pack->pBuffer;
@ -295,7 +295,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
case ServerOP_GuildCharRefresh: {
if(pack->size != sizeof(ServerGuildCharRefresh_Struct)) {
Log.Log(EQEmuLogSys::Error, "Received ServerOP_RefreshGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildCharRefresh_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received ServerOP_RefreshGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildCharRefresh_Struct));
return;
}
ServerGuildCharRefresh_Struct *s = (ServerGuildCharRefresh_Struct *) pack->pBuffer;
@ -338,7 +338,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
{
if(pack->size != sizeof(ServerGuildRankUpdate_Struct))
{
Log.Log(EQEmuLogSys::Error, "Received ServerOP_RankUpdate of incorrect size %d, expected %d",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received ServerOP_RankUpdate of incorrect size %d, expected %d",
pack->size, sizeof(ServerGuildRankUpdate_Struct));
return;
@ -364,7 +364,7 @@ void ZoneGuildManager::ProcessWorldPacket(ServerPacket *pack) {
case ServerOP_DeleteGuild: {
if(pack->size != sizeof(ServerGuildID_Struct)) {
Log.Log(EQEmuLogSys::Error, "Received ServerOP_DeleteGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildID_Struct));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Received ServerOP_DeleteGuild of incorrect size %d, expected %d", pack->size, sizeof(ServerGuildID_Struct));
return;
}
ServerGuildID_Struct *s = (ServerGuildID_Struct *) pack->pBuffer;
@ -603,7 +603,7 @@ bool GuildBankManager::Load(uint32 guildID)
"FROM `guild_bank` WHERE `guildid` = %i", guildID);
auto results = database.QueryDatabase(query);
if(!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error Loading guild bank: %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error Loading guild bank: %s, %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -684,7 +684,7 @@ void GuildBankManager::SendGuildBank(Client *c)
if(Iterator == Banks.end())
{
Log.Log(EQEmuLogSys::Error, "Unable to find guild bank for guild ID %i", c->GuildID());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to find guild bank for guild ID %i", c->GuildID());
return;
}
@ -800,7 +800,7 @@ bool GuildBankManager::AddItem(uint32 GuildID, uint8 Area, uint32 ItemID, int32
if(Iterator == Banks.end())
{
Log.Log(EQEmuLogSys::Error, "Unable to find guild bank for guild ID %i", GuildID);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to find guild bank for guild ID %i", GuildID);
return false;
}
@ -846,7 +846,7 @@ bool GuildBankManager::AddItem(uint32 GuildID, uint8 Area, uint32 ItemID, int32
if(Slot < 0)
{
Log.Log(EQEmuLogSys::Error, "No space to add item to the guild bank.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "No space to add item to the guild bank.");
return false;
}
@ -857,7 +857,7 @@ bool GuildBankManager::AddItem(uint32 GuildID, uint8 Area, uint32 ItemID, int32
GuildID, Area, Slot, ItemID, QtyOrCharges, Donator, Permissions, WhoFor);
auto results = database.QueryDatabase(query);
if(!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Insert Error: %s : %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Insert Error: %s : %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -922,7 +922,7 @@ int GuildBankManager::Promote(uint32 guildID, int slotID)
"LIMIT 1", mainSlot, guildID, slotID);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "error promoting item: %s : %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "error promoting item: %s : %s", query.c_str(), results.ErrorMessage().c_str());
return -1;
}
@ -974,7 +974,7 @@ void GuildBankManager::SetPermissions(uint32 guildID, uint16 slotID, uint32 perm
auto results = database.QueryDatabase(query);
if(!results.Success())
{
Log.Log(EQEmuLogSys::Error, "error changing permissions: %s : %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "error changing permissions: %s : %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -1124,7 +1124,7 @@ bool GuildBankManager::DeleteItem(uint32 guildID, uint16 area, uint16 slotID, ui
guildID, area, slotID);
auto results = database.QueryDatabase(query);
if(!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Delete item failed. %s : %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Delete item failed. %s : %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -1136,7 +1136,7 @@ bool GuildBankManager::DeleteItem(uint32 guildID, uint16 area, uint16 slotID, ui
BankArea[slotID].Quantity - quantity, guildID, area, slotID);
auto results = database.QueryDatabase(query);
if(!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Update item failed. %s : %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Update item failed. %s : %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
@ -1299,7 +1299,7 @@ void GuildBankManager::UpdateItemQuantity(uint32 guildID, uint16 area, uint16 sl
quantity, guildID, area, slotID);
auto results = database.QueryDatabase(query);
if(!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Update item quantity failed. %s : %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Update item quantity failed. %s : %s", query.c_str(), results.ErrorMessage().c_str());
return;
}

View File

@ -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()) {
Log.Log(EQEmuLogSys::Error, "Error in Mount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Mount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return nullptr;
}
if (results.RowCount() != 1) {
Log.Log(EQEmuLogSys::Error, "No Database entry for mount: %s, check the horses table", fileName);
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "%s tried to summon an unknown horse, spell id %d", GetName(), spell_id);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "%s tried to summon an unknown horse, spell id %d", GetName(), spell_id);
return;
}

View File

@ -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
Log.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",
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "Player %s on account %s was found exploiting the shared bank.\n", GetName(), account_name);
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "Player %s on account %s was found exploting the shared bank.\n", GetName(), account_name);
Log.DebugCategory(EQEmuLogSys::General, 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);
}
@ -2594,7 +2594,7 @@ void Client::SetBandolier(const EQApplicationPacket *app) {
if(MoveItemToInventory(InvItem))
database.SaveInventory(character_id, 0, WeaponSlot);
else
Log.Log(EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(),
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(),
InvItem->GetItem()->Name);
safe_delete(InvItem);
}
@ -2629,7 +2629,7 @@ void Client::SetBandolier(const EQApplicationPacket *app) {
if(InvItem) {
// If there was already an item in that weapon slot that we replaced, find a place to put it
if(!MoveItemToInventory(InvItem))
Log.Log(EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(),
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(),
InvItem->GetItem()->Name);
safe_delete(InvItem);
}
@ -2646,7 +2646,7 @@ void Client::SetBandolier(const EQApplicationPacket *app) {
if(MoveItemToInventory(InvItem))
database.SaveInventory(character_id, 0, WeaponSlot);
else
Log.Log(EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(),
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Char: %s, ERROR returning %s to inventory", GetName(),
InvItem->GetItem()->Name);
safe_delete(InvItem);
}
@ -2865,7 +2865,7 @@ bool Client::InterrogateInventory(Client* requester, bool log, bool silent, bool
}
if (log) {
Log.Log(EQEmuLogSys::Error, "Target interrogate inventory flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE"));
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Target interrogate inventory flag: %s", (GetInterrogateInvState() ? "TRUE" : "FALSE"));
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::None, "[CLIENT] Client::InterrogateInventory() -- End");
}
if (!silent) {
@ -2910,7 +2910,7 @@ void Client::InterrogateInventory_(bool errorcheck, Client* requester, int16 hea
else { e = ""; }
if (log)
Log.Log(EQEmuLogSys::Error, "Head: %i, Depth: %i, Instance: %s, Parent: %s%s",
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Head: %i, Depth: %i, Instance: %s, Parent: %s%s",
head, depth, i.c_str(), p.c_str(), e.c_str());
if (!silent)
requester->Message(1, "%i:%i - inst: %s - parent: %s%s",

View File

@ -1873,7 +1873,7 @@ bool EntityList::Merc_AICheckCloseBeneficialSpells(Merc* caster, uint8 iChance,
// according to Rogean, Live NPCs will just cast through walls/floors, no problem..
//
// This check was put in to address an idle-mob CPU issue
Log.Log(EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!");
return(false);
}
@ -4451,7 +4451,7 @@ bool Merc::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, boo
{
if (!other) {
SetTarget(nullptr);
Log.Log(EQEmuLogSys::Error, "A null Mob object was passed to Merc::Attack() for evaluation!");
Log.DebugCategory(EQEmuLogSys::General, 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())
{
Log.Log(EQEmuLogSys::Error, "Error in NPC::LoadMercTypes()");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in NPC::LoadMercTypes()");
return;
}
@ -6019,7 +6019,7 @@ void NPC::LoadMercs() {
if (!results.Success())
{
Log.Log(EQEmuLogSys::Error, "Error in NPC::LoadMercTypes()");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in NPC::LoadMercTypes()");
return;
}

View File

@ -355,7 +355,7 @@ bool EntityList::AICheckCloseBeneficialSpells(NPC* caster, uint8 iChance, float
// according to Rogean, Live NPCs will just cast through walls/floors, no problem..
//
// This check was put in to address an idle-mob CPU issue
Log.Log(EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error: detrimental spells requested from AICheckCloseBeneficialSpells!!");
return(false);
}

View File

@ -150,7 +150,7 @@ int main(int argc, char** argv) {
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading server configuration..");
if (!ZoneConfig::LoadConfig()) {
Log.Log(EQEmuLogSys::Error, "Loading server configuration failed.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading server configuration failed.");
return 1;
}
const ZoneConfig *Config=ZoneConfig::get();
@ -169,7 +169,7 @@ int main(int argc, char** argv) {
Config->DatabasePassword.c_str(),
Config->DatabaseDB.c_str(),
Config->DatabasePort)) {
Log.Log(EQEmuLogSys::Error, "Cannot continue without a database connection.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Cannot continue without a database connection.");
return 1;
}
@ -192,16 +192,16 @@ int main(int argc, char** argv) {
* Setup nice signal handlers
*/
if (signal(SIGINT, CatchSignal) == SIG_ERR) {
Log.Log(EQEmuLogSys::Error, "Could not set signal handler");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not set signal handler");
return 1;
}
if (signal(SIGTERM, CatchSignal) == SIG_ERR) {
Log.Log(EQEmuLogSys::Error, "Could not set signal handler");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not set signal handler");
return 1;
}
#ifndef WIN32
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) {
Log.Log(EQEmuLogSys::Error, "Could not set signal handler");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Could not set signal handler");
return 1;
}
#endif
@ -223,25 +223,25 @@ int main(int argc, char** argv) {
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading items");
if (!database.LoadItems()) {
Log.Log(EQEmuLogSys::Error, "Loading items FAILED!");
Log.Log(EQEmuLogSys::Error, "Failed. But ignoring error and going on...");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading items FAILED!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed. But ignoring error and going on...");
}
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading npc faction lists");
if (!database.LoadNPCFactionLists()) {
Log.Log(EQEmuLogSys::Error, "Loading npcs faction lists FAILED!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading npcs faction lists FAILED!");
CheckEQEMuErrorAndPause();
return 1;
}
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading loot tables");
if (!database.LoadLoot()) {
Log.Log(EQEmuLogSys::Error, "Loading loot FAILED!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading loot FAILED!");
CheckEQEMuErrorAndPause();
return 1;
}
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading skill caps");
if (!database.LoadSkillCaps()) {
Log.Log(EQEmuLogSys::Error, "Loading skill caps FAILED!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading skill caps FAILED!");
CheckEQEMuErrorAndPause();
return 1;
}
@ -252,7 +252,7 @@ int main(int argc, char** argv) {
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading base data");
if (!database.LoadBaseData()) {
Log.Log(EQEmuLogSys::Error, "Loading base data FAILED!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading base data FAILED!");
CheckEQEMuErrorAndPause();
return 1;
}
@ -278,7 +278,7 @@ int main(int argc, char** argv) {
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading commands");
int retval=command_init();
if(retval<0)
Log.Log(EQEmuLogSys::Error, "Command loading FAILED");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Command loading FAILED");
else
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "%d commands loaded", retval);
@ -288,7 +288,7 @@ int main(int argc, char** argv) {
if (database.GetVariable("RuleSet", tmp, sizeof(tmp)-1)) {
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Loading rule set '%s'", tmp);
if(!RuleManager::Instance()->LoadRules(&database, tmp)) {
Log.Log(EQEmuLogSys::Error, "Failed to load ruleset '%s', falling back to defaults.", tmp);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to load ruleset '%s', falling back to defaults.", tmp);
}
} else {
if(!RuleManager::Instance()->LoadRules(&database, "default")) {
@ -321,7 +321,7 @@ int main(int argc, char** argv) {
parse->ReloadQuests();
if (!worldserver.Connect()) {
Log.Log(EQEmuLogSys::Error, "Worldserver Connection Failed :: worldserver.Connect()");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Worldserver Connection Failed :: worldserver.Connect()");
}
Timer InterserverTimer(INTERSERVER_TIMER); // does MySQL pings and auto-reconnect
@ -334,7 +334,7 @@ int main(int argc, char** argv) {
if (!strlen(zone_name) || !strcmp(zone_name,".")) {
Log.DebugCategory(EQEmuLogSys::Detail, EQEmuLogSys::Zone_Server, "Entering sleep mode");
} else if (!Zone::Bootup(database.GetZoneID(zone_name), 0, true)) { //todo: go above and fix this to allow cmd line instance
Log.Log(EQEmuLogSys::Error, "Zone Bootup failed :: Zone::Bootup");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Zone Bootup failed :: Zone::Bootup");
zone = 0;
}
@ -371,7 +371,7 @@ int main(int argc, char** argv) {
// log_sys.StartZoneLogs(StringFormat("%s_ver-%u_instid-%u_port-%u", zone->GetShortName(), zone->GetInstanceVersion(), zone->GetInstanceID(), ZoneConfig::get()->ZonePort));
if (!eqsf.Open(Config->ZonePort)) {
Log.Log(EQEmuLogSys::Error, "Failed to open port %d",Config->ZonePort);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Failed to open port %d",Config->ZonePort);
ZoneConfig::SetZonePort(0);
worldserver.Disconnect();
worldwasconnected = false;
@ -628,7 +628,7 @@ void LoadSpells(EQEmu::MemoryMappedFile **mmf) {
spells = reinterpret_cast<SPDat_Spell_Struct*>((*mmf)->Get());
mutex.Unlock();
} catch(std::exception &ex) {
Log.Log(EQEmuLogSys::Error, "Error loading spells: %s", ex.what());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error loading spells: %s", ex.what());
return;
}

View File

@ -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) {
Log.Log(EQEmuLogSys::Error, "Database error, invalid item");
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "NPCSpawnDB Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "CreateNewNPCSpawnGroupCommand Error: %s %s", query.c_str(), results.ErrorMessage().c_str());
return 0;
}

View File

@ -336,7 +336,7 @@ const ItemInst* Object::GetItem(uint8 index) {
void Object::PutItem(uint8 index, const ItemInst* inst)
{
if (index > 9) {
Log.Log(EQEmuLogSys::Error, "Object::PutItem: Invalid index specified (%i)", index);
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Unable to insert object: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Unable to update object: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Unable to delete object: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to delete object: %s", results.ErrorMessage().c_str());
}
}

View File

@ -66,14 +66,14 @@ PathManager* PathManager::LoadPathFile(const char* ZoneName)
}
else
{
Log.Log(EQEmuLogSys::Error, "Path File %s failed to load.", ZonePathFileName);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Path File %s failed to load.", ZonePathFileName);
safe_delete(Ret);
}
fclose(PathFile);
}
else
{
Log.Log(EQEmuLogSys::Error, "Path File %s not found.", ZonePathFileName);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Path File %s not found.", ZonePathFileName);
}
return Ret;
@ -103,7 +103,7 @@ bool PathManager::loadPaths(FILE *PathFile)
if(strncmp(Magic, "EQEMUPATH", 9))
{
Log.Log(EQEmuLogSys::Error, "Bad Magic String in .path file.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Bad Magic String in .path file.");
return false;
}
@ -114,7 +114,7 @@ bool PathManager::loadPaths(FILE *PathFile)
if(Head.version != 2)
{
Log.Log(EQEmuLogSys::Error, "Unsupported path file version.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unsupported path file version.");
return false;
}
@ -138,7 +138,7 @@ bool PathManager::loadPaths(FILE *PathFile)
{
if(PathNodes[i].Neighbours[j].id > MaxNodeID)
{
Log.Log(EQEmuLogSys::Error, "Path Node %i, Neighbour %i (%i) out of range.", i, j, PathNodes[i].Neighbours[j].id);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Path Node %i, Neighbour %i (%i) out of range.", i, j, PathNodes[i].Neighbours[j].id);
PathFileValid = false;
}

View File

@ -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())
Log.Log(EQEmuLogSys::Error, "Error in DeletePetitionFromDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in UpdatePetitionToDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in InsertPetitionToDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in RefreshPetitionsFromDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in RefreshPetitionsFromDB query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return;
}

View File

@ -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);
Log.Log(EQEmuLogSys::Error, "Unable to find data for pet %s, check pets table.", pettype);
Log.DebugCategory(EQEmuLogSys::General, 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);
Log.Log(EQEmuLogSys::Error, "Unable to load NPC data for pet %s (NPC ID %d), check pets and npc_types tables.", pettype, record.npc_type);
Log.DebugCategory(EQEmuLogSys::General, 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
Log.Log(EQEmuLogSys::Error, "Error querying database for monster summoning pet in zone %s (%s)", zone->GetShortName(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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
Log.Log(EQEmuLogSys::Error, "Error loading NPC data for monster summoning pet (NPC ID %d)", monsterid);
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetPoweredPetEntry query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetBasePetItems query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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
Log.Log(EQEmuLogSys::Error, "Error in GetBasePetItems equipment set '%d' does not exist", curset);
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in GetBasePetItems query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetBasePetItems query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
else {
for (row = results.begin(); row != results.end(); ++row)
{

View File

@ -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()) {
Log.Log(EQEmuLogSys::Error, "Error in saylink phrase queries", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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 {
Log.Log(EQEmuLogSys::Error, "Error in saylink phrase queries", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in saylink phrase queries", results.ErrorMessage().c_str());
}
}
}

View File

@ -99,7 +99,7 @@ void Raid::AddMember(Client *c, uint32 group, bool rleader, bool groupleader, bo
auto results = database.QueryDatabase(query);
if(!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error inserting into raid members: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Set Raid Leader error: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Set Raid Leader error: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to store LeadershipAA: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "Error getting raid details for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "Error getting raid members for raid %lu: %s", (unsigned long)GetID(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to set raid group mentor: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to clear raid group mentor: %s\n", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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

View File

@ -364,7 +364,7 @@ bool ZoneDatabase::PopulateZoneSpawnList(uint32 zoneid, LinkedList<Spawn2*> &spa
zone_name, version);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in PopulateZoneLists query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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*> &spawn2_list, uint32 spawn2
"WHERE id = %i", spawn2id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return nullptr;
}
if (results.RowCount() != 1) {
Log.Log(EQEmuLogSys::Error, "Error in LoadSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in CreateSpawn2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to update spawn event '%s': %s\n", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Unable to update spawn condition '%s': %s\n", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadDBEvent query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadSpawnConditions query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadSpawnConditions query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadSpawnConditions events query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "Refusing to load spawn event #%d because it has a period of 0\n", event.id);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Refusing to load spawn event #%d because it has a period of 0\n", event.id);
continue;
}

View File

@ -167,7 +167,7 @@ bool ZoneDatabase::LoadSpawnGroups(const char* zone_name, uint16 version, SpawnG
"AND zone = '%s'", zone_name);
results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error2 in PopulateZoneLists query '%'", query.c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error2 in PopulateZoneLists query '%'", query.c_str());
return false;
}
@ -195,7 +195,7 @@ bool ZoneDatabase::LoadSpawnGroupsByID(int spawngroupid, SpawnGroupList* spawn_g
"FROM spawngroup WHERE spawngroup.ID = '%i'", spawngroupid);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error2 in PopulateZoneLists query %s", query.c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error2 in PopulateZoneLists query %s", query.c_str());
return false;
}
@ -210,7 +210,7 @@ bool ZoneDatabase::LoadSpawnGroupsByID(int spawngroupid, SpawnGroupList* spawn_g
"ORDER BY chance", spawngroupid);
results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error3 in PopulateZoneLists query '%s'", query.c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error3 in PopulateZoneLists query '%s'", query.c_str());
return false;
}

View File

@ -1772,7 +1772,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial)
}
else {
Message_StringID(4, TARGET_NOT_FOUND);
Log.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);
Log.DebugCategory(EQEmuLogSys::General, 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);
}
}

View File

@ -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
Log.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!",
Log.DebugCategory(EQEmuLogSys::General, 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
Log.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!",
Log.DebugCategory(EQEmuLogSys::General, 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
Log.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);
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error while querying Spell ID %i spell_globals table query '%s': %s", spell_ID, query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.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);
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.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);
Log.DebugCategory(EQEmuLogSys::General, 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
Log.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);
Log.DebugCategory(EQEmuLogSys::General, 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;
}

View File

@ -74,7 +74,7 @@ bool TaskManager::LoadTaskSets() {
MAXTASKSETS, MAXTASKS);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadTaskSets: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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
Log.Log(EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading tasks from database", taskID);
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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
Log.Log(EQEmuLogSys::Error, "[TASKS]Task or Activity ID (%i, %i) out of range while loading "
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Task or Activity ID (%i, %i) out of range while loading "
"activities from database", taskID, activityID);
continue;
}
if(Tasks[taskID]==nullptr) {
Log.Log(EQEmuLogSys::Error, "[TASKS]Activity for non-existent task (%i, %i) while loading activities from database", taskID, activityID);
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "[TASKS]Activities for Task %i are not sequential starting at 0. Not loading task.", taskID, activityID);
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load Tasks: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading character tasks from database", taskID);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading character tasks from database", taskID);
continue;
}
if((slot<0) || (slot>=MAXACTIVETASKS)) {
Log.Log(EQEmuLogSys::Error, "[TASKS] Slot %i out of range while loading character tasks from database", slot);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS] Slot %i out of range while loading character tasks from database", slot);
continue;
}
if(state->ActiveTasks[slot].TaskID != TASKSLOTEMPTY) {
Log.Log(EQEmuLogSys::Error, "[TASKS] Slot %i for Task %is is already occupied.", slot, taskID);
Log.DebugCategory(EQEmuLogSys::General, 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()){
Log.Log(EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load Activities: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading character activities from database", taskID);
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "[TASKS]Activity ID %i out of range while loading character activities from database", activityID);
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "[TASKS]Activity %i found for task %i which client does not have.", activityID, taskID);
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load completed tasks: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "[TASKS]Task ID %i out of range while loading completed tasks from database", taskID);
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "[TASKS]Activity ID %i out of range while loading completed tasks from database", activityID);
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "[TASKS]Error in TaskManager::LoadClientState load enabled tasks: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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);
Log.Log(EQEmuLogSys::Error, "[TASKS]Character %i has task %i which does not exist.", characterID, taskID);
Log.DebugCategory(EQEmuLogSys::General, 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);
Log.Log(EQEmuLogSys::Error, "[TASKS]Fatal error in character %i task state. Activity %i for "
Log.DebugCategory(EQEmuLogSys::General, 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.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Executing query %s", query.c_str());
auto results = database.QueryDatabase(query);
if(!results.Success())
Log.Log(EQEmuLogSys::Error, "[TASKS]Error in ClientTaskState::EnableTask %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Tasks, "[UPDATE] Executing query %s", query.c_str());
auto results = database.QueryDatabase(query);
if(!results.Success())
Log.Log(EQEmuLogSys::Error, "[TASKS]Error in ClientTaskState::DisableTask %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "[TASKS]Error in CientTaskState::CancelTask %s, %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str());
return;
}
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::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())
Log.Log(EQEmuLogSys::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "[TASKS] Error in CientTaskState::CancelTask %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::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()) {
Log.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, ERR_MYSQLERROR, query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in TaskProximityManager::LoadProximities %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in TaskProximityManager::LoadProximities %s %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}

View File

@ -40,7 +40,7 @@ bool TitleManager::LoadTitles()
"`status`, `item_id`, `prefix`, `suffix`, `title_set` FROM titles";
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Unable to load titles: %s : %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error adding title: %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error adding title suffix: %s %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in EnableTitle query for titleset %i and charid %i", titleSet, CharacterID());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in CheckTitle query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in RemoveTitle query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in RemoveTitle query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
}

View File

@ -42,7 +42,7 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
{
if (!user || !in_augment)
{
Log.Log(EQEmuLogSys::Error, "Client or AugmentItem_Struct not set in Object::HandleAugmentation");
Log.DebugCategory(EQEmuLogSys::General, 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)
{
Log.Log(EQEmuLogSys::Error, "Player tried to augment an item without a container set.");
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "Client or NewCombine_Struct not set in Object::HandleCombine");
Log.DebugCategory(EQEmuLogSys::General, 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
Log.Log(EQEmuLogSys::Error, "Replace container combine executed in a world container.");
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "Unknown recipe for HandleAutoCombine: %u\n", rac->recipe_id);
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in HandleAutoCombine query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "Error in HandleAutoCombine: no components returned");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in HandleAutoCombine: no components returned");
user->QueuePacket(outapp);
safe_delete(outapp);
return;
}
if(results.RowCount() > 10) {
Log.Log(EQEmuLogSys::Error, "Error in HandleAutoCombine: too many components returned (%u)", results.RowCount());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in TradeskillSearchResults query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "Error in TradeskillSearchResults query '%s': Invalid column count in result", query.c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in SendTradeskillDetails query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SendTradeskillDetails query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
if(results.RowCount() < 1) {
Log.Log(EQEmuLogSys::Error, "Error in SendTradeskillDetails: no components returned");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SendTradeskillDetails: no components returned");
return;
}
if(results.RowCount() > 10) {
Log.Log(EQEmuLogSys::Error, "Error in SendTradeskillDetails: too many components returned (%u)", results.RowCount());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe search, query: %s", query.c_str());
Log.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe search, error: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe search, query: %s", query.c_str());
Log.DebugCategory(EQEmuLogSys::General, 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)
Log.Log(EQEmuLogSys::Error, "GetTradeRecipe warning: Too many matches. Unable to search all recipe entries. Searched %u of %u possible entries.", index + 1, results.RowCount());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe, re-query: %s", query.c_str());
Log.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, re-query: %s", query.c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe, re-query: %s", query.c_str());
Log.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, re-query: %s", query.c_str());
Log.DebugCategory(EQEmuLogSys::General, 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
Log.Log(EQEmuLogSys::Error, "Combine error: Incorrect container is being used!");
Log.DebugCategory(EQEmuLogSys::General, 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
Log.Log(EQEmuLogSys::Error, "Combine error: Recipe is not unique! %u matches found for container %u. Continuing with first recipe match.", results.RowCount(), containerId);
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in tradeskill verify query: '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe, query: %s", query.c_str());
Log.Log(EQEmuLogSys::Error, "Error in GetTradeRecipe, error: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecipe, query: %s", query.c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetTradeRecept success query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetTradeRecept success query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}
if(results.RowCount() < 1) {
Log.Log(EQEmuLogSys::Error, "Error in GetTradeRecept success: no success items returned");
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in UpdateRecipeMadecount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in Client::LearnRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in LearnRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in EnableRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in DisableRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in DisableRecipe query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return results.RowsAffected() > 0;
}

View File

@ -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");
Log.Log(EQEmuLogSys::Error, "Bazaar: Zero price transaction between %s and %s aborted."
Log.DebugCategory(EQEmuLogSys::General, 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);
@ -2515,7 +2515,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
Quantity = i;
break;
}
Log.Log(EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
Message(13, "Internal error while processing transaction.");
return;
}
@ -2523,7 +2523,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
ItemInst* ItemToTransfer = m_inv.PopItem(SellerSlot);
if(!ItemToTransfer || !Buyer->MoveItemToInventory(ItemToTransfer, true)) {
Log.Log(EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
Message(13, "Internal error while processing transaction.");
if(ItemToTransfer)
@ -2561,7 +2561,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
int16 SellerSlot = m_inv.HasItem(ItemID, 1, invWhereWorn|invWherePersonal|invWhereCursor);
if (SellerSlot == INVALID_INDEX) {
Log.Log(EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
Message(13, "Internal error while processing transaction.");
return;
}
@ -2569,7 +2569,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
ItemInst* ItemToTransfer = m_inv.PopItem(SellerSlot);
if(!ItemToTransfer) {
Log.Log(EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
Message(13, "Internal error while processing transaction.");
return;
}
@ -2581,7 +2581,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
QuantityMoved += ItemToTransfer->GetCharges();
if(!Buyer->MoveItemToInventory(ItemToTransfer, true)) {
Log.Log(EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
Message(13, "Internal error while processing transaction.");
safe_delete(ItemToTransfer);
return;
@ -2616,7 +2616,7 @@ void Client::SellToBuyer(const EQApplicationPacket *app) {
ItemToTransfer->SetCharges(QuantityToRemoveFromStack);
if(!Buyer->MoveItemToInventory(ItemToTransfer, true)) {
Log.Log(EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unexpected error while moving item from seller to buyer.");
Message(13, "Internal error while processing transaction.");
safe_delete(ItemToTransfer);
return;

View File

@ -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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadTraps query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTraps query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return false;
}

View File

@ -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) {
Log.Log(EQEmuLogSys::Error, "Details request for invalid tribute %lu", (unsigned long)tribute_id);
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadTributes first query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadTributes level query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "Error in LoadTributes: unknown tribute %lu in tribute_levels", (unsigned long)id);
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "Error in LoadTributes: on tribute %lu: more tiers defined than permitted", (unsigned long)id);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTributes: on tribute %lu: more tiers defined than permitted", (unsigned long)id);
continue;
}

View File

@ -116,7 +116,7 @@ void NPC::ResumeWandering()
}
else
{
Log.Log(EQEmuLogSys::Error, "NPC not paused - can't resume wandering: %lu", (unsigned long)GetNPCTypeID());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "NPC not paused - can't resume wandering: %lu", (unsigned long)GetNPCTypeID());
return;
}
@ -131,7 +131,7 @@ void NPC::ResumeWandering()
}
else
{
Log.Log(EQEmuLogSys::Error, "NPC not on grid - can't resume wandering: %lu", (unsigned long)GetNPCTypeID());
Log.DebugCategory(EQEmuLogSys::General, 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 {
Log.Log(EQEmuLogSys::Error, "NPC not on grid - can't pause wandering: %lu", (unsigned long)GetNPCTypeID());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "MySQL Error while trying to assign grid %u to mob %s: %s", grid, name, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "MySQL Error while trying to assign waypoints from grid %u to mob %s: %s", grid, name, results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetHighestGrid query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetGridType2 query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetWaypoints query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error querying spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error querying fuzzy spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
{
Log.Log(EQEmuLogSys::Error, "Error updating spawn2 '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error creating grid entry '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error deleting grid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error deleting grid entries '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error adding waypoint '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error deleting waypoint '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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
Log.Log(EQEmuLogSys::Error, "Error setting pathgrid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error adding grid '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error updating spawn2 pathing '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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
Log.Log(EQEmuLogSys::Error, "Error getting next waypoint id '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error adding grid entry '%s': '%s'", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetFreeGrid query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetHighestWaypoint query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in GetHighestWaypoint query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return 0;
}

View File

@ -391,7 +391,7 @@ void WorldServer::Process() {
}
}
else
Log.Log(EQEmuLogSys::Error, "WhoAllReturnStruct: Could not get return struct!");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "WhoAllReturnStruct: Could not get return struct!");
break;
}
case ServerOP_EmoteMessage: {
@ -1381,7 +1381,7 @@ void WorldServer::Process() {
if(NewCorpse)
NewCorpse->Spawn();
else
Log.Log(EQEmuLogSys::Error, "Unable to load player corpse id %u for zone %s.", s->player_corpse_id, zone->GetShortName());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to load player corpse id %u for zone %s.", s->player_corpse_id, zone->GetShortName());
break;
}
@ -2061,7 +2061,7 @@ uint32 WorldServer::NextGroupID() {
if(cur_groupid >= last_groupid) {
//this is an error... This means that 50 groups were created before
//1 packet could make the zone->world->zone trip... so let it error.
Log.Log(EQEmuLogSys::Error, "Ran out of group IDs before the server sent us more.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Ran out of group IDs before the server sent us more.");
return(0);
}
if(cur_groupid > (last_groupid - /*50*/995)) {

View File

@ -167,7 +167,7 @@ bool Zone::LoadZoneObjects() {
zoneid, instanceversion);
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error Loading Objects from DB: %s",results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadTempMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadTempMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
std::map<uint32, std::list<TempMerchantList> >::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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadNewMerchantData query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::LoadMercTemplates()");
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::LoadMercTemplates()");
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::LoadEXPLevelMods()");
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in Zone::LoadMercSpells()");
Log.DebugCategory(EQEmuLogSys::General, 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)) {
Log.Log(EQEmuLogSys::Error, "... Failed to load doors.");
Log.DebugCategory(EQEmuLogSys::General, 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)
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::None, "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
Log.Log(EQEmuLogSys::Error, "Unable to load the graveyard id %i for zone %s.", graveyard_id(), short_name);
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading spawn conditions...");
if(!spawn_conditions.LoadSpawnConditions(short_name, instanceid)) {
Log.Log(EQEmuLogSys::Error, "Loading spawn conditions failed, continuing without them.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading spawn conditions failed, continuing without them.");
}
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading static zone points...");
if (!database.LoadStaticZonePoints(&zone_point_list, short_name, GetInstanceVersion())) {
Log.Log(EQEmuLogSys::Error, "Loading static zone points failed.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading static zone points failed.");
return false;
}
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading spawn groups...");
if (!database.LoadSpawnGroups(short_name, GetInstanceVersion(), &spawn_group_list)) {
Log.Log(EQEmuLogSys::Error, "Loading spawn groups failed.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading spawn groups failed.");
return false;
}
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading spawn2 points...");
if (!database.PopulateZoneSpawnList(zoneid, spawn2_list, GetInstanceVersion()))
{
Log.Log(EQEmuLogSys::Error, "Loading spawn2 points failed.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading spawn2 points failed.");
return false;
}
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading player corpses...");
if (!database.LoadCharacterCorpses(zoneid, instanceid)) {
Log.Log(EQEmuLogSys::Error, "Loading player corpses failed.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading player corpses failed.");
return false;
}
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading traps...");
if (!database.LoadTraps(short_name, GetInstanceVersion()))
{
Log.Log(EQEmuLogSys::Error, "Loading traps failed.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading traps failed.");
return false;
}
@ -942,13 +942,13 @@ bool Zone::Init(bool iStaticZone) {
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading ground spawns...");
if (!LoadGroundSpawns())
{
Log.Log(EQEmuLogSys::Error, "Loading ground spawns failed. continuing.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading ground spawns failed. continuing.");
}
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Loading World Objects from DB...");
if (!LoadZoneObjects())
{
Log.Log(EQEmuLogSys::Error, "Loading World Objects failed. continuing.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading World Objects failed. continuing.");
}
//load up the zone's doors (prints inside)
@ -1024,27 +1024,27 @@ void Zone::ReloadStaticData() {
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading static zone points...");
zone_point_list.Clear();
if (!database.LoadStaticZonePoints(&zone_point_list, GetShortName(), GetInstanceVersion())) {
Log.Log(EQEmuLogSys::Error, "Loading static zone points failed.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Loading static zone points failed.");
}
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading traps...");
entity_list.RemoveAllTraps();
if (!database.LoadTraps(GetShortName(), GetInstanceVersion()))
{
Log.Log(EQEmuLogSys::Error, "Reloading traps failed.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Reloading traps failed.");
}
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading ground spawns...");
if (!LoadGroundSpawns())
{
Log.Log(EQEmuLogSys::Error, "Reloading ground spawns failed. continuing.");
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Reloading ground spawns failed. continuing.");
}
entity_list.RemoveAllObjects();
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Status, "Reloading World Objects from DB...");
if (!LoadZoneObjects())
{
Log.Log(EQEmuLogSys::Error, "Reloading World Objects failed. continuing.");
Log.DebugCategory(EQEmuLogSys::General, 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))
{
Log.Log(EQEmuLogSys::Error, "Error loading the Zone Config.");
Log.DebugCategory(EQEmuLogSys::General, 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))
{
Log.Log(EQEmuLogSys::Error, "Error loading the Zone Config.");
Log.DebugCategory(EQEmuLogSys::General, 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))
{
Log.Log(EQEmuLogSys::Error, "... Failed to load blocked spells.");
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in Zone::LoadLDoNTraps: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in Zone::LoadLDoNTrapEntries: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in Zone::LoadVeteranRewards: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in Zone::LoadAlternateCurrencies: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in Zone::LoadAdventureFlavor: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadAdventureFlavor: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -2228,7 +2228,7 @@ void Zone::LoadNPCEmotes(LinkedList<NPC_Emote_Struct*>* NPCEmoteList)
const std::string query = "SELECT emoteid, event_, type, text FROM npc_emotes";
auto results = database.QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in Zone::LoadNPCEmotes: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in Zone::LoadTickItems: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in Zone::LoadTickItems: %s (%s)", query.c_str(), results.ErrorMessage().c_str());
return;
}

View File

@ -86,7 +86,7 @@ bool ZoneDatabase::SaveZoneCFG(uint32 zoneid, uint16 instance_id, NewZone_Struct
zoneid, instance_id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in SaveZoneCFG query %s: %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetZoneCFG query %s: %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in UpdateTimeLeft query %s: %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in UpdateTimeLeft query %s: %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in GetSpawnTimeLeft query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in UpdateSpawn2Status query %s: %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "Programming error: LoadWorldContainer passed nullptr pointer");
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in DB::LoadWorldContainer: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::SaveWorldContainer: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::DeleteWorldContainer: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error While Deleting Merc Buffs before save: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error Saving Merc Buffs: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error Loading Merc Buffs: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "Error Loading Merc Buffs: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
{
Log.Log(EQEmuLogSys::Error, "Error Deleting Merc Buffs: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
{
Log.Log(EQEmuLogSys::Error, "Error Deleting Merc: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error Loading Merc Inventory: %s", results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::GroupCount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in ZoneDatabase::RaidGroupCount query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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::map<uint32, uint32
"WHERE char_id = '%u'", char_id);
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadAltCurrencyValues query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in LoadAltCurrencyValues query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
@ -2866,7 +2866,7 @@ void ZoneDatabase::SaveBuffs(Client *client) {
buffs[index].ExtraDIChance);
auto results = QueryDatabase(query);
if (!results.Success())
Log.Log(EQEmuLogSys::Error, "Error in SaveBuffs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Error in SaveBuffs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
}
}
@ -2885,7 +2885,7 @@ void ZoneDatabase::LoadBuffs(Client *client) {
"FROM `character_buffs` WHERE `character_id` = '%u'", client->CharacterID());
auto results = QueryDatabase(query);
if (!results.Success()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadBuffs query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "Error in LoadPetInfo query '%s': %s", query.c_str(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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))
Log.Log(EQEmuLogSys::Error, "Unable to unbury a summoned player corpse for character id %u.", char_id);
Log.DebugCategory(EQEmuLogSys::General, 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{
Log.Log(EQEmuLogSys::Error, "Unable to construct a player corpse for character id %u.", char_id);
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "Unable to construct a player corpse for character id %u.", char_id);
}
}

View File

@ -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.");
Log.Log(EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id);
Log.DebugCategory(EQEmuLogSys::General, 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) {
Log.Log(EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%d'.", GetName(), target_zone_id);
Log.DebugCategory(EQEmuLogSys::General, 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.");
Log.Log(EQEmuLogSys::Error, "Zoning %s: Unable to get zone name for zone id '%d'.", GetName(), target_zone_id);
Log.DebugCategory(EQEmuLogSys::General, 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.");
Log.Log(EQEmuLogSys::Error, "Zoning %s: Unable to get safe coordinates for zone '%s'.", GetName(), target_zone_name);
Log.DebugCategory(EQEmuLogSys::General, 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);
Log.Log(EQEmuLogSys::Error, "Zoning %s: Invalid unsolicited zone request to zone id '%s'. Not near a zone point.", GetName(), target_zone_name);
Log.DebugCategory(EQEmuLogSys::General, 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 {
Log.Log(EQEmuLogSys::Error, "Zoning %s: Rules prevent this char from zoning into '%s'", GetName(), target_zone_name);
Log.DebugCategory(EQEmuLogSys::General, 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)
{
Log.Log(EQEmuLogSys::Error, "Zone %i is not available because target wasn't found or character insufficent level", zc->zoneID);
Log.DebugCategory(EQEmuLogSys::General, 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:
Log.Log(EQEmuLogSys::Error, "Client::ProcessMovePC received a reguest to perform an unsupported client zone operation.");
Log.DebugCategory(EQEmuLogSys::General, 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:
Log.Log(EQEmuLogSys::Error, "Client::ZonePC() received a reguest to perform an unsupported client zone operation.");
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "MySQL Error while trying to set zone flag for %s: %s", GetName(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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())
Log.Log(EQEmuLogSys::Error, "MySQL Error while trying to clear zone flag for %s: %s", GetName(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, 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()) {
Log.Log(EQEmuLogSys::Error, "MySQL Error while trying to load zone flags for %s: %s", GetName(), results.ErrorMessage().c_str());
Log.DebugCategory(EQEmuLogSys::General, EQEmuLogSys::Error, "MySQL Error while trying to load zone flags for %s: %s", GetName(), results.ErrorMessage().c_str());
return;
}