[9838] More log filters and macro uses.

* LogFilter_Weather
* LogFilter_PeriodicAffects
* LogFilter_PlayerMoves
* LogFilter_SQLText
* LogFilter_AIAndMovegens
* LogFilter_PlayerStats
This commit is contained in:
VladimirMangos 2010-05-05 01:21:55 +04:00
parent e83aa1ba9d
commit 722135b326
89 changed files with 996 additions and 997 deletions

View file

@ -234,7 +234,7 @@ void Spell::EffectEmpty(SpellEffectIndex /*eff_idx*/)
void Spell::EffectNULL(SpellEffectIndex /*eff_idx*/)
{
sLog.outDebug("WORLD: Spell Effect DUMMY");
DEBUG_LOG("WORLD: Spell Effect DUMMY");
}
void Spell::EffectUnused(SpellEffectIndex /*eff_idx*/)
@ -2901,7 +2901,7 @@ void Spell::EffectApplyAura(SpellEffectIndex eff_idx)
return;
}
sLog.outDebug("Spell: Aura is: %u", m_spellInfo->EffectApplyAuraName[eff_idx]);
DEBUG_LOG("Spell: Aura is: %u", m_spellInfo->EffectApplyAuraName[eff_idx]);
Aura* Aur = CreateAura(m_spellInfo, eff_idx, &m_currentBasePoints[eff_idx], unitTarget, caster, m_CastItem);
@ -2937,7 +2937,7 @@ void Spell::EffectUnlearnSpecialization(SpellEffectIndex eff_idx)
_player->removeSpell(spellToUnlearn);
sLog.outDebug( "Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow() );
DEBUG_LOG( "Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow() );
}
void Spell::EffectPowerDrain(SpellEffectIndex eff_idx)
@ -2996,7 +2996,7 @@ void Spell::EffectSendEvent(SpellEffectIndex effectIndex)
/*
we do not handle a flag dropping or clicking on flag in battleground by sendevent system
*/
sLog.outDebug("Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->EffectMiscValue[effectIndex], m_spellInfo->Id);
DEBUG_LOG("Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->EffectMiscValue[effectIndex], m_spellInfo->Id);
m_caster->GetMap()->ScriptsStart(sEventScripts, m_spellInfo->EffectMiscValue[effectIndex], m_caster, focusObject);
}
@ -3187,7 +3187,7 @@ void Spell::EffectHealthLeech(SpellEffectIndex eff_idx)
if (damage < 0)
return;
sLog.outDebug("HealthLeech :%i", damage);
DEBUG_LOG("HealthLeech :%i", damage);
uint32 curHealth = unitTarget->GetHealth();
damage = m_caster->SpellNonMeleeDamageLog(unitTarget, m_spellInfo->Id, damage );
@ -3532,7 +3532,7 @@ void Spell::EffectOpenLock(SpellEffectIndex eff_idx)
{
if (!m_caster || m_caster->GetTypeId() != TYPEID_PLAYER)
{
sLog.outDebug( "WORLD: Open Lock - No Player Caster!");
DEBUG_LOG( "WORLD: Open Lock - No Player Caster!");
return;
}
@ -3580,7 +3580,7 @@ void Spell::EffectOpenLock(SpellEffectIndex eff_idx)
}
else
{
sLog.outDebug( "WORLD: Open Lock - No GameObject/Item Target!");
DEBUG_LOG( "WORLD: Open Lock - No GameObject/Item Target!");
return;
}
@ -3976,7 +3976,7 @@ void Spell::EffectLearnSpell(SpellEffectIndex eff_idx)
uint32 spellToLearn = ((m_spellInfo->Id==SPELL_ID_GENERIC_LEARN) || (m_spellInfo->Id==SPELL_ID_GENERIC_LEARN_PET)) ? damage : m_spellInfo->EffectTriggerSpell[eff_idx];
player->learnSpell(spellToLearn, false);
sLog.outDebug( "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow() );
DEBUG_LOG( "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow() );
}
void Spell::EffectDispel(SpellEffectIndex eff_idx)
@ -4103,7 +4103,7 @@ void Spell::EffectDualWield(SpellEffectIndex /*eff_idx*/)
void Spell::EffectPull(SpellEffectIndex /*eff_idx*/)
{
// TODO: create a proper pull towards distract spell center for distract
sLog.outDebug("WORLD: Spell Effect DUMMY");
DEBUG_LOG("WORLD: Spell Effect DUMMY");
}
void Spell::EffectDistract(SpellEffectIndex /*eff_idx*/)
@ -4152,7 +4152,7 @@ void Spell::EffectPickPocket(SpellEffectIndex /*eff_idx*/)
if (chance > irand(0, 19))
{
// Stealing successful
//sLog.outDebug("Sending loot from pickpocket");
//DEBUG_LOG("Sending loot from pickpocket");
((Player*)m_caster)->SendLoot(unitTarget->GetGUID(),LOOT_PICKPOCKETING);
}
else
@ -4390,7 +4390,7 @@ void Spell::EffectAddHonor(SpellEffectIndex /*eff_idx*/)
if (m_CastItem)
{
((Player*)unitTarget)->RewardHonor(NULL, 1, float(damage / 10));
sLog.outDebug("SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(),((Player*)unitTarget)->GetGUIDLow());
DEBUG_LOG("SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(),((Player*)unitTarget)->GetGUIDLow());
return;
}
@ -4399,7 +4399,7 @@ void Spell::EffectAddHonor(SpellEffectIndex /*eff_idx*/)
{
float honor_reward = MaNGOS::Honor::hk_honor_at_level(unitTarget->getLevel(), damage);
((Player*)unitTarget)->RewardHonor(NULL, 1, honor_reward);
sLog.outDebug("SpellEffect::AddHonor (spell_id %u) rewards %f honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, ((Player*)unitTarget)->GetGUIDLow());
DEBUG_LOG("SpellEffect::AddHonor (spell_id %u) rewards %f honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, ((Player*)unitTarget)->GetGUIDLow());
}
else
{
@ -4868,7 +4868,7 @@ void Spell::EffectSummonPet(SpellEffectIndex eff_idx)
map->Add((Creature*)NewSummon);
m_caster->SetPet(NewSummon);
sLog.outDebug("New Pet has guid %u", NewSummon->GetGUIDLow());
DEBUG_LOG("New Pet has guid %u", NewSummon->GetGUIDLow());
if(m_caster->GetTypeId() == TYPEID_PLAYER)
{
@ -6215,7 +6215,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
if (!unitTarget)
return;
sLog.outDebug("Spell ScriptStart spellid %u in EffectScriptEffect ", m_spellInfo->Id);
DEBUG_LOG("Spell ScriptStart spellid %u in EffectScriptEffect ", m_spellInfo->Id);
m_caster->GetMap()->ScriptsStart(sSpellScripts, m_spellInfo->Id, m_caster, unitTarget);
}
@ -6346,8 +6346,8 @@ void Spell::EffectStuck(SpellEffectIndex /*eff_idx*/)
Player* pTarget = (Player*)unitTarget;
sLog.outDebug("Spell Effect: Stuck");
sLog.outDetail("Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", pTarget->GetName(), pTarget->GetGUIDLow(), m_caster->GetMapId(), m_caster->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ());
DEBUG_LOG("Spell Effect: Stuck");
DETAIL_LOG("Player %s (guid %u) used auto-unstuck future at map %u (%f, %f, %f)", pTarget->GetName(), pTarget->GetGUIDLow(), m_caster->GetMapId(), m_caster->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ());
if(pTarget->isInFlight())
return;
@ -7340,7 +7340,7 @@ void Spell::EffectMilling(SpellEffectIndex /*eff_idx*/)
void Spell::EffectSkill(SpellEffectIndex /*eff_idx*/)
{
sLog.outDebug("WORLD: SkillEFFECT");
DEBUG_LOG("WORLD: SkillEFFECT");
}
void Spell::EffectSpiritHeal(SpellEffectIndex /*eff_idx*/)
@ -7362,7 +7362,7 @@ void Spell::EffectSpiritHeal(SpellEffectIndex /*eff_idx*/)
// remove insignia spell effect
void Spell::EffectSkinPlayerCorpse(SpellEffectIndex /*eff_idx*/)
{
sLog.outDebug("Effect: SkinPlayerCorpse");
DEBUG_LOG("Effect: SkinPlayerCorpse");
if ( (m_caster->GetTypeId() != TYPEID_PLAYER) || (unitTarget->GetTypeId() != TYPEID_PLAYER) || (unitTarget->isAlive()) )
return;
@ -7371,7 +7371,7 @@ void Spell::EffectSkinPlayerCorpse(SpellEffectIndex /*eff_idx*/)
void Spell::EffectStealBeneficialBuff(SpellEffectIndex eff_idx)
{
sLog.outDebug("Effect: StealBeneficialBuff");
DEBUG_LOG("Effect: StealBeneficialBuff");
if(!unitTarget || unitTarget==m_caster) // can't steal from self
return;