Convert 'SPELLS' debugging _log to logger.LogDebugType

This commit is contained in:
Akkadius
2015-01-12 22:52:11 -06:00
parent 3390164aea
commit 683ff1ea60
9 changed files with 23 additions and 23 deletions
+4 -4
View File
@@ -1482,7 +1482,7 @@ int SharedDatabase::GetMaxSpellID() {
std::string query = "SELECT MAX(id) FROM spells_new";
auto results = QueryDatabase(query);
if (!results.Success()) {
_log(SPELLS__LOAD_ERR, "Error in GetMaxSpellID query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Error in GetMaxSpellID query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return -1;
}
@@ -1497,12 +1497,12 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
const std::string query = "SELECT * FROM spells_new ORDER BY id ASC";
auto results = QueryDatabase(query);
if (!results.Success()) {
_log(SPELLS__LOAD_ERR, "Error in LoadSpells query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Error in LoadSpells query '%s' %s", query.c_str(), results.ErrorMessage().c_str());
return;
}
if(results.ColumnCount() <= SPELL_LOAD_FIELD_COUNT) {
_log(SPELLS__LOAD_ERR, "Fatal error loading spells: Spell field count < SPELL_LOAD_FIELD_COUNT(%u)", SPELL_LOAD_FIELD_COUNT);
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Fatal error loading spells: Spell field count < SPELL_LOAD_FIELD_COUNT(%u)", SPELL_LOAD_FIELD_COUNT);
return;
}
@@ -1512,7 +1512,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
for (auto row = results.begin(); row != results.end(); ++row) {
tempid = atoi(row[0]);
if(tempid >= max_spells) {
_log(SPELLS__LOAD_ERR, "Non fatal error: spell.id >= max_spells, ignoring.");
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "Non fatal error: spell.id >= max_spells, ignoring.");
continue;
}
+1 -1
View File
@@ -838,7 +838,7 @@ DmgShieldType GetDamageShieldType(uint16 spell_id, int32 DSType)
// If we have a DamageShieldType for this spell from the damageshieldtypes table, return that,
// else, make a guess, based on the resist type. Default return value is DS_THORNS
if (IsValidSpell(spell_id)) {
_log(SPELLS__EFFECT_VALUES, "DamageShieldType for spell %i (%s) is %X\n", spell_id,
logger.LogDebugType(EQEmuLogSys::Detail, EQEmuLogSys::Spells, "DamageShieldType for spell %i (%s) is %X\n", spell_id,
spells[spell_id].name, spells[spell_id].DamageShieldType);
if (spells[spell_id].DamageShieldType)