aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellEffects.cpp
diff options
context:
space:
mode:
authorMachiavelli <machiavelli.trinity@gmail.com>2011-02-20 20:16:34 +0100
committerMachiavelli <machiavelli.trinity@gmail.com>2011-02-20 20:16:34 +0100
commite07e20ffcaf6911d4dd47e0895fbdc52c5a52f05 (patch)
treefcc0c8865a387c67b925df174e22f49820a985a0 /src/server/game/Spells/SpellEffects.cpp
parent45db1591a4959ca9d58fc40ea2294936bcf4bd10 (diff)
Core/Log: Implement log masks for debug log level, to allow selective debug output. Update your worldserver.conf.
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rwxr-xr-xsrc/server/game/Spells/SpellEffects.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 86268cfbb32..9136cf2c9cb 100755
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -233,7 +233,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
void Spell::EffectNULL(SpellEffIndex /*effIndex*/)
{
- sLog->outDebug("WORLD: Spell Effect DUMMY");
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "WORLD: Spell Effect DUMMY");
}
void Spell::EffectUnused(SpellEffIndex /*effIndex*/)
@@ -869,7 +869,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
Creature* creatureTarget = unitTarget->ToCreature();
m_caster->SummonGameObject(179644, creatureTarget->GetPositionX(), creatureTarget->GetPositionY(), creatureTarget->GetPositionZ(), creatureTarget->GetOrientation(), 0, 0, 0, 0, uint32(creatureTarget->GetRespawnTime()-time(NULL)));
- sLog->outDebug("SummonGameObject at SpellEfects.cpp EffectDummy for Spell 23019");
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SummonGameObject at SpellEfects.cpp EffectDummy for Spell 23019");
creatureTarget->DespawnOrUnsummon();
@@ -1550,7 +1550,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
}
// normal DB scripted effect
- sLog->outDebug("Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex);
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex);
m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget);
// Script based implementation. Must be used only for not good for implementation in core spell effects
@@ -1983,7 +1983,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
m_targets.m_dstPos.GetPosition(x, y, z, orientation);
if (!orientation && m_targets.getUnitTarget())
orientation = m_targets.getUnitTarget()->GetOrientation();
- sLog->outDebug("Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation);
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation);
if (mapid == unitTarget->GetMapId())
unitTarget->NearTeleportTo(x, y, z, orientation, unitTarget == m_caster);
@@ -2113,7 +2113,7 @@ void Spell::EffectUnlearnSpecialization(SpellEffIndex effIndex)
_player->removeSpell(spellToUnlearn);
- sLog->outDebug("Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow());
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow());
}
void Spell::EffectPowerDrain(SpellEffIndex effIndex)
@@ -2155,7 +2155,7 @@ void Spell::EffectSendEvent(SpellEffIndex effIndex)
/*
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[effIndex], m_spellInfo->Id);
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->EffectMiscValue[effIndex], m_spellInfo->Id);
Object *pTarget;
if (focusObject)
@@ -2363,7 +2363,7 @@ void Spell::EffectHealthLeech(SpellEffIndex effIndex)
if (!unitTarget || !unitTarget->isAlive() || damage < 0)
return;
- sLog->outDebug("HealthLeech :%i", damage);
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "HealthLeech :%i", damage);
float healMultiplier = SpellMgr::CalculateSpellEffectValueMultiplier(m_spellInfo, effIndex, m_originalCaster, this);
@@ -2743,7 +2743,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
// TODO: possible must be moved to loot release (in different from linked triggering)
if (gameObjTarget->GetGOInfo()->chest.eventId)
{
- sLog->outDebug("Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId,gameObjTarget->GetDBTableGUIDLow());
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId,gameObjTarget->GetDBTableGUIDLow());
player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->chest.eventId, player, gameObjTarget);
}
@@ -2765,7 +2765,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)
{
- sLog->outDebug("WORLD: Open Lock - No Player Caster!");
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "WORLD: Open Lock - No Player Caster!");
return;
}
@@ -2820,7 +2820,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
}
else
{
- sLog->outDebug("WORLD: Open Lock - No GameObject/Item Target!");
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "WORLD: Open Lock - No GameObject/Item Target!");
return;
}
@@ -3178,7 +3178,7 @@ void Spell::EffectLearnSpell(SpellEffIndex effIndex)
uint32 spellToLearn = (m_spellInfo->Id == 483 || m_spellInfo->Id == 55884) ? damage : m_spellInfo->EffectTriggerSpell[effIndex];
player->learnSpell(spellToLearn, false);
- sLog->outDebug("Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow());
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow());
}
typedef std::list< std::pair<uint32, uint64> > DispelList;
@@ -3438,7 +3438,7 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
if (m_CastItem)
{
unitTarget->ToPlayer()->RewardHonor(NULL, 1, 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(),unitTarget->ToPlayer()->GetGUIDLow());
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage/10, m_CastItem->GetEntry(),unitTarget->ToPlayer()->GetGUIDLow());
return;
}
@@ -3447,13 +3447,13 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
{
uint32 honor_reward = Trinity::Honor::hk_honor_at_level(unitTarget->getLevel(), float(damage));
unitTarget->ToPlayer()->RewardHonor(NULL, 1, honor_reward);
- sLog->outDebug("SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUIDLow());
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUIDLow());
}
else
{
//maybe we have correct honor_gain in damage already
unitTarget->ToPlayer()->RewardHonor(NULL, 1, damage);
- sLog->outDebug("SpellEffect::AddHonor (spell_id %u) rewards %u honor points (non scale) for player: %u", m_spellInfo->Id, damage, unitTarget->ToPlayer()->GetGUIDLow());
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (non scale) for player: %u", m_spellInfo->Id, damage, unitTarget->ToPlayer()->GetGUIDLow());
}
}
@@ -5419,7 +5419,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
}
// normal DB scripted effect
- sLog->outDebug("Spell ScriptStart spellid %u in EffectScriptEffect(%u)", m_spellInfo->Id, effIndex);
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart spellid %u in EffectScriptEffect(%u)", m_spellInfo->Id, effIndex);
m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget);
}
@@ -5569,7 +5569,7 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/)
Player* pTarget = (Player*)unitTarget;
- sLog->outDebug("Spell Effect: Stuck");
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "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());
if (pTarget->isInFlight())
@@ -6557,7 +6557,7 @@ void Spell::EffectMilling(SpellEffIndex /*effIndex*/)
void Spell::EffectSkill(SpellEffIndex /*effIndex*/)
{
- sLog->outDebug("WORLD: SkillEFFECT");
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "WORLD: SkillEFFECT");
}
/* There is currently no need for this effect. We handle it in Battleground.cpp
@@ -6584,7 +6584,7 @@ void Spell::EffectSpiritHeal(SpellEffIndex /*effIndex*/)
// remove insignia spell effect
void Spell::EffectSkinPlayerCorpse(SpellEffIndex /*effIndex*/)
{
- sLog->outDebug("Effect: SkinPlayerCorpse");
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Effect: SkinPlayerCorpse");
if ((m_caster->GetTypeId() != TYPEID_PLAYER) || (unitTarget->GetTypeId() != TYPEID_PLAYER) || (unitTarget->isAlive()))
return;
@@ -6593,7 +6593,7 @@ void Spell::EffectSkinPlayerCorpse(SpellEffIndex /*effIndex*/)
void Spell::EffectStealBeneficialBuff(SpellEffIndex effIndex)
{
- sLog->outDebug("Effect: StealBeneficialBuff");
+ sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Effect: StealBeneficialBuff");
if (!unitTarget || unitTarget == m_caster) // can't steal from self
return;