From 928443d8993869dfbf3adceabe4ba0b3cfe0edef Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 23 Dec 2010 23:25:44 +0100 Subject: Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming) --HG-- branch : trunk --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 36 ++-- src/server/game/Spells/Auras/SpellAuras.cpp | 18 +- src/server/game/Spells/Spell.cpp | 110 +++++----- src/server/game/Spells/SpellEffects.cpp | 124 +++++------ src/server/game/Spells/SpellMgr.cpp | 250 +++++++++++----------- src/server/game/Spells/SpellMgr.h | 12 +- src/server/game/Spells/SpellScript.cpp | 48 ++--- 7 files changed, 299 insertions(+), 299 deletions(-) (limited to 'src/server/game/Spells') diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 9acb142f2d9..1026f3dc417 100755 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1127,7 +1127,7 @@ void AuraEffect::UpdatePeriodic(Unit * caster) if (aurEff->GetAuraType() != SPELL_AURA_MOD_POWER_REGEN) { m_isPeriodic = false; - sLog.outError("Aura %d structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId()); + sLog->outError("Aura %d structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId()); } else { @@ -1379,7 +1379,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const caster->CalcAbsorbResist(target, GetSpellSchoolMask(GetSpellProto()), DOT, damage, &absorb, &resist, m_spellProto); - sLog.outDetail("PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u", + sLog->outDetail("PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId(),absorb); caster->DealDamageMods(target,damage,&absorb); @@ -1461,7 +1461,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const if (target->GetHealth() < damage) damage = uint32(target->GetHealth()); - sLog.outDetail("PeriodicTick: %u (TypeId: %u) health leech of %u (TypeId: %u) for %u dmg inflicted by %u abs is %u", + sLog->outDetail("PeriodicTick: %u (TypeId: %u) health leech of %u (TypeId: %u) for %u dmg inflicted by %u abs is %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId(),absorb); caster->SendSpellNonMeleeDamageLog(target, GetId(), damage, GetSpellSchoolMask(GetSpellProto()), absorb, resist, false, 0, crit); @@ -1513,7 +1513,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const //donator->SendSpellNonMeleeDamageLog(donator, GetId(), damage, GetSpellSchoolMask(spellProto), 0, 0, false, 0); caster->ModifyHealth(-(int32)damage); - sLog.outDebug("PeriodicTick: donator %u target %u damage %u.", target->GetEntry(), target->GetEntry(), damage); + sLog->outDebug("PeriodicTick: donator %u target %u damage %u.", target->GetEntry(), target->GetEntry(), damage); float gainMultiplier = SpellMgr::CalculateSpellEffectValueMultiplier(GetSpellProto(), GetEffIndex(), caster); @@ -1594,7 +1594,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const if (crit) damage = caster->SpellCriticalHealingBonus(m_spellProto, damage, target); - sLog.outDetail("PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u", + sLog->outDetail("PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId()); uint32 absorb = 0; @@ -1680,7 +1680,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const damage = maxmana; } - sLog.outDetail("PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u", + sLog->outDetail("PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), damage, GetId()); int32 drain_amount = std::min(target->GetPower(power), damage); @@ -1772,7 +1772,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const return; uint32 amount = m_amount * target->GetMaxPower(power) /100; - sLog.outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u", + sLog->outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), amount, GetId()); SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f, false); @@ -1812,7 +1812,7 @@ void AuraEffect::PeriodicTick(AuraApplication * aurApp, Unit * caster) const SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f, false); target->SendPeriodicAuraLog(&pInfo); - sLog.outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u", + sLog->outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u", GUID_LOPART(GetCasterGUID()), GuidHigh2TypeId(GUID_HIPART(GetCasterGUID())), target->GetGUIDLow(), target->GetTypeId(), amount, GetId()); int32 gain = target->ModifyPower(power,amount); @@ -2413,14 +2413,14 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const { Unit * triggerCaster = GetTriggeredSpellCaster(triggeredSpellInfo, caster, triggerTarget); triggerCaster->CastSpell(triggerTarget, triggeredSpellInfo, true, NULL, this); - sLog.outDebug("AuraEffect::TriggerSpell: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id); + sLog->outDebug("AuraEffect::TriggerSpell: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id); } else { Creature* c = triggerTarget->ToCreature(); if (!c || (c && !sScriptMgr->OnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()), triggerTarget->ToCreature())) || (c && !c->AI()->sOnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex())))) - sLog.outError("AuraEffect::TriggerSpell: Spell %u has value 0 in EffectTriggered[%d] and is therefor not handled. Define as custom case?",GetId(),GetEffIndex()); + sLog->outError("AuraEffect::TriggerSpell: Spell %u has value 0 in EffectTriggered[%d] and is therefor not handled. Define as custom case?",GetId(),GetEffIndex()); } } @@ -2442,7 +2442,7 @@ void AuraEffect::TriggerSpellWithValue(Unit * target, Unit * caster) const triggerCaster->CastCustomSpell(triggerTarget, triggerSpellId, &basepoints0, 0, 0, true, 0, this); } else - sLog.outError("AuraEffect::TriggerSpellWithValue: Spell %u has value 0 in EffectTriggered[%d] and is therefor not handled. Define as custom case?",GetId(),GetEffIndex()); + sLog->outError("AuraEffect::TriggerSpellWithValue: Spell %u has value 0 in EffectTriggered[%d] and is therefor not handled. Define as custom case?",GetId(),GetEffIndex()); } bool AuraEffect::IsAffectedOnSpell(SpellEntry const *spell) const @@ -3017,7 +3017,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const * aurApp, uint8 m case FORM_SPIRITOFREDEMPTION: break; default: - sLog.outError("Auras: Unknown Shapeshift Type: %u", GetMiscValue()); + sLog->outError("Auras: Unknown Shapeshift Type: %u", GetMiscValue()); } modelid = target->GetModelForForm(form); @@ -3264,7 +3264,7 @@ void AuraEffect::HandleAuraTransform(AuraApplication const * aurApp, uint8 mode, if (!ci) { target->SetDisplayId(16358); // pig pink ^_^ - sLog.outError("Auras: unknown creature id = %d (only need its modelid) From Spell Aura Transform in Spell ID = %d", GetMiscValue(), GetId()); + sLog->outError("Auras: unknown creature id = %d (only need its modelid) From Spell Aura Transform in Spell ID = %d", GetMiscValue(), GetId()); } else { @@ -3781,7 +3781,7 @@ void AuraEffect::HandleAuraMounted(AuraApplication const * aurApp, uint8 mode, b CreatureInfo const* ci = ObjectMgr::GetCreatureTemplate(creatureEntry); if (!ci) { - sLog.outErrorDb("AuraMounted: `creature_template`='%u' not found in database (only need its modelid)",GetMiscValue()); + sLog->outErrorDb("AuraMounted: `creature_template`='%u' not found in database (only need its modelid)",GetMiscValue()); return; } @@ -4658,7 +4658,7 @@ void AuraEffect::HandleAuraModStat(AuraApplication const * aurApp, uint8 mode, b if (GetMiscValue() < -2 || GetMiscValue() > 4) { - sLog.outError("WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ",GetId(),GetEffIndex(),GetMiscValue()); + sLog->outError("WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ",GetId(),GetEffIndex(),GetMiscValue()); return; } @@ -4684,7 +4684,7 @@ void AuraEffect::HandleModPercentStat(AuraApplication const * aurApp, uint8 mode if (GetMiscValue() < -1 || GetMiscValue() > 4) { - sLog.outError("WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid"); + sLog->outError("WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid"); return; } @@ -4782,7 +4782,7 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const * aurApp, uint8 if (GetMiscValue() < -1 || GetMiscValue() > 4) { - sLog.outError("WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid"); + sLog->outError("WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid"); return; } @@ -4822,7 +4822,7 @@ void AuraEffect::HandleAuraModResistenceOfStatPercent(AuraApplication const * au { // support required adding replace UpdateArmor by loop by UpdateResistence at intellect update // and include in UpdateResistence same code as in UpdateArmor for aura mod apply. - sLog.outError("Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!"); + sLog->outError("Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!"); return; } diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 6257db65ade..aada5edc5fc 100755 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -72,10 +72,10 @@ m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(fa m_slot = slot; GetTarget()->SetVisibleAura(slot, this); SetNeedClientUpdate(); - sLog.outDebug("Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot); + sLog->outDebug("Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot); } else - sLog.outDebug("Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask()); + sLog->outDebug("Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask()); } m_isNeedManyNegativeEffects = false; @@ -140,7 +140,7 @@ void AuraApplication::_HandleEffect(uint8 effIndex, bool apply) ASSERT(aurEff); ASSERT(HasEffect(effIndex) == (!apply)); ASSERT((1<GetAuraType(), apply, aurEff->GetAmount()); + sLog->outDebug("AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount()); Unit * caster = GetBase()->GetCaster(); m_flags &= ~(AFLAG_POSITIVE | AFLAG_NEGATIVE); @@ -181,7 +181,7 @@ void AuraApplication::ClientUpdate(bool remove) { ASSERT(!m_target->GetVisibleAura(m_slot)); data << uint32(0); - sLog.outDebug("Aura %u removed slot %u",GetBase()->GetId(), m_slot); + sLog->outDebug("Aura %u removed slot %u",GetBase()->GetId(), m_slot); m_target->SendMessageToSet(&data, true); return; } @@ -429,7 +429,7 @@ void Aura::_UnapplyForTarget(Unit * target, Unit * caster, AuraApplication * aur // TODO: Figure out why this happens if (itr == m_applications.end()) { - sLog.outError("Aura::_UnapplyForTarget, target:%u, caster:%u, spell:%u was not found in owners application map!", + sLog->outError("Aura::_UnapplyForTarget, target:%u, caster:%u, spell:%u was not found in owners application map!", target->GetGUIDLow(), caster->GetGUIDLow(), auraApp->GetBase()->GetSpellProto()->Id); ASSERT(false); } @@ -962,7 +962,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster, case 31571: spellId = 57529; break; case 31572: spellId = 57531; break; default: - sLog.outError("Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId()); + sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId()); } if (spellId) caster->CastSpell(caster, spellId, true); @@ -1076,7 +1076,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster, case 49631: spellId = 50509; break; case 49032: spellId = 50508; break; default: - sLog.outError("Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId()); + sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId()); } caster->CastSpell(target, spellId, true, 0, GetEffect(0)); } @@ -1219,7 +1219,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster, case 53759: spellId = 60947; break; case 53754: spellId = 60946; break; default: - sLog.outError("Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId()); + sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId()); } if (spellId) caster->CastSpell(target, spellId, true); @@ -1633,7 +1633,7 @@ void Aura::_DeleteRemovedApplications() void Aura::LoadScripts() { - sLog.outDebug("Aura::LoadScripts"); + sLog->outDebug("Aura::LoadScripts"); sScriptMgr->CreateAuraScripts(m_spellProto->Id, m_loadedScripts); for(std::list::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;) { diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 05211e602cb..235b052c0b7 100755 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -258,50 +258,50 @@ void SpellCastTargets::Update(Unit* caster) void SpellCastTargets::OutDebug() { if (!m_targetMask) - sLog.outString("TARGET_FLAG_SELF"); + sLog->outString("TARGET_FLAG_SELF"); if (m_targetMask & TARGET_FLAG_UNIT) { - sLog.outString("TARGET_FLAG_UNIT: " UI64FMTD, m_unitTargetGUID); + sLog->outString("TARGET_FLAG_UNIT: " UI64FMTD, m_unitTargetGUID); } if (m_targetMask & TARGET_FLAG_UNK17) { - sLog.outString("TARGET_FLAG_UNK17: " UI64FMTD, m_unitTargetGUID); + sLog->outString("TARGET_FLAG_UNK17: " UI64FMTD, m_unitTargetGUID); } if (m_targetMask & TARGET_FLAG_OBJECT) { - sLog.outString("TARGET_FLAG_OBJECT: " UI64FMTD, m_GOTargetGUID); + sLog->outString("TARGET_FLAG_OBJECT: " UI64FMTD, m_GOTargetGUID); } if (m_targetMask & TARGET_FLAG_CORPSE) { - sLog.outString("TARGET_FLAG_CORPSE: " UI64FMTD, m_CorpseTargetGUID); + sLog->outString("TARGET_FLAG_CORPSE: " UI64FMTD, m_CorpseTargetGUID); } if (m_targetMask & TARGET_FLAG_PVP_CORPSE) { - sLog.outString("TARGET_FLAG_PVP_CORPSE: " UI64FMTD, m_CorpseTargetGUID); + sLog->outString("TARGET_FLAG_PVP_CORPSE: " UI64FMTD, m_CorpseTargetGUID); } if (m_targetMask & TARGET_FLAG_ITEM) { - sLog.outString("TARGET_FLAG_ITEM: " UI64FMTD, m_itemTargetGUID); + sLog->outString("TARGET_FLAG_ITEM: " UI64FMTD, m_itemTargetGUID); } if (m_targetMask & TARGET_FLAG_TRADE_ITEM) { - sLog.outString("TARGET_FLAG_TRADE_ITEM: " UI64FMTD, m_itemTargetGUID); + sLog->outString("TARGET_FLAG_TRADE_ITEM: " UI64FMTD, m_itemTargetGUID); } if (m_targetMask & TARGET_FLAG_SOURCE_LOCATION) { - sLog.outString("TARGET_FLAG_SOURCE_LOCATION: transport guid:" UI64FMTD " trans offset: %s position: %s", m_srcTransGUID, m_srcTransOffset.ToString().c_str(), m_srcPos.ToString().c_str()); + sLog->outString("TARGET_FLAG_SOURCE_LOCATION: transport guid:" UI64FMTD " trans offset: %s position: %s", m_srcTransGUID, m_srcTransOffset.ToString().c_str(), m_srcPos.ToString().c_str()); } if (m_targetMask & TARGET_FLAG_DEST_LOCATION) { - sLog.outString("TARGET_FLAG_DEST_LOCATION: transport guid:" UI64FMTD " trans offset: %s position: %s", m_dstTransGUID, m_dstTransOffset.ToString().c_str(), m_dstPos.ToString().c_str()); + sLog->outString("TARGET_FLAG_DEST_LOCATION: transport guid:" UI64FMTD " trans offset: %s position: %s", m_dstTransGUID, m_dstTransOffset.ToString().c_str(), m_dstPos.ToString().c_str()); } if (m_targetMask & TARGET_FLAG_STRING) { - sLog.outString("TARGET_FLAG_STRING: %s", m_strTarget.c_str()); + sLog->outString("TARGET_FLAG_STRING: %s", m_strTarget.c_str()); } - sLog.outString("speed: %f", m_speed); - sLog.outString("elevation: %f", m_elevation); + sLog->outString("speed: %f", m_speed); + sLog->outString("elevation: %f", m_elevation); } void SpellCastTargets::read (ByteBuffer & data, Unit * caster) @@ -549,7 +549,7 @@ Spell::~Spell() { // Clean the reference to avoid later crash. // If this error is repeating, we may have to add an ASSERT to better track down how we get into this case. - sLog.outError("SPELL: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id); + sLog->outError("SPELL: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id); *m_selfContainer = NULL; } @@ -1564,7 +1564,7 @@ void Spell::DoTriggersOnSpellHit(Unit *unit) if (roll_chance_i(i->second)) { m_caster->CastSpell(unit, i->first, true); - sLog.outDebug("Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->first->Id); + sLog->outDebug("Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->first->Id); } if (GetSpellDuration(i->first) == -1) { @@ -1829,7 +1829,7 @@ void Spell::SearchAreaTarget(std::list &TagUnitMap, float radius, SpellNo Unit *target = m_targets.getUnitTarget(); if (!target) { - sLog.outError("SPELL: cannot find unit target for spell ID %u\n", m_spellInfo->Id); + sLog->outError("SPELL: cannot find unit target for spell ID %u\n", m_spellInfo->Id); return; } pos = target; @@ -1887,7 +1887,7 @@ WorldObject* Spell::SearchNearbyTarget(float range, SpellTargets TargetType, Spe ConditionList conditions = sConditionMgr->GetConditionsForNotGroupedEntry(CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET, m_spellInfo->Id); if (conditions.empty()) { - sLog.outDebug("Spell (ID: %u) (caster Entry: %u) does not have record in `conditions` for spell script target (ConditionSourceType 13)", m_spellInfo->Id, m_caster->GetEntry()); + sLog->outDebug("Spell (ID: %u) (caster Entry: %u) does not have record in `conditions` for spell script target (ConditionSourceType 13)", m_spellInfo->Id, m_caster->GetEntry()); if (IsPositiveSpell(m_spellInfo->Id)) return SearchNearbyTarget(range, SPELL_TARGETS_ALLY, effIndex); else @@ -2044,7 +2044,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) Unit *target = m_targets.getUnitTarget(); if (!target) { - sLog.outError("SPELL: no unit target for spell ID %u", m_spellInfo->Id); + sLog->outError("SPELL: no unit target for spell ID %u", m_spellInfo->Id); break; } @@ -2195,7 +2195,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) Unit *target = m_targets.getUnitTarget(); if (!target) { - sLog.outError("SPELL: no unit target for spell ID %u", m_spellInfo->Id); + sLog->outError("SPELL: no unit target for spell ID %u", m_spellInfo->Id); break; } @@ -2238,7 +2238,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) { if (!m_targets.HasDst()) { - sLog.outError("SPELL: no destination for spell ID %u", m_spellInfo->Id); + sLog->outError("SPELL: no destination for spell ID %u", m_spellInfo->Id); break; } @@ -2293,7 +2293,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) } else { - sLog.outDebug("SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id); + sLog->outDebug("SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id); Unit *target = NULL; if (uint64 guid = m_caster->GetUInt64Value(UNIT_FIELD_TARGET)) target = ObjectAccessor::GetUnit(*m_caster, guid); @@ -2321,7 +2321,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) { if (!m_originalCaster || !m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL)) { - sLog.outError("SPELL: no current channeled spell for spell ID %u", m_spellInfo->Id); + sLog->outError("SPELL: no current channeled spell for spell ID %u", m_spellInfo->Id); break; } @@ -2332,7 +2332,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) if (Unit* target = Unit::GetUnit(*m_caster, m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL)->m_targets.getUnitTargetGUID())) AddUnitTarget(target, i); else - sLog.outError("SPELL: cannot find channel spell target for spell ID %u", m_spellInfo->Id); + sLog->outError("SPELL: cannot find channel spell target for spell ID %u", m_spellInfo->Id); break; case TARGET_DEST_CHANNEL_TARGET: if (m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL)->m_targets.HasDst()) @@ -2340,7 +2340,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) else if (Unit* target = Unit::GetUnit(*m_caster, m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL)->m_targets.getUnitTargetGUID())) m_targets.setDst(*target); else - sLog.outError("SPELL: cannot find channel spell destination for spell ID %u", m_spellInfo->Id); + sLog->outError("SPELL: cannot find channel spell destination for spell ID %u", m_spellInfo->Id); break; case TARGET_DEST_CHANNEL_CASTER: m_targets.setDst(*m_originalCaster->GetCurrentSpell(CURRENT_CHANNELED_SPELL)->GetCaster()); @@ -2369,7 +2369,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) AddUnitTarget(driver, i); break; default: - sLog.outError("Unhandled spell target %u", cur); + sLog->outError("Unhandled spell target %u", cur); break; } break; @@ -2381,7 +2381,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) Unit *target = m_targets.getUnitTarget(); if (!target) { - sLog.outError("SPELL: no chain unit target for spell ID %u", m_spellInfo->Id); + sLog->outError("SPELL: no chain unit target for spell ID %u", m_spellInfo->Id); return; } @@ -2559,7 +2559,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) break; default: - sLog.outDebug("Spell (ID: %u) (caster Entry: %u) does not have type CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET record in `conditions` table.", m_spellInfo->Id, m_caster->GetEntry()); + sLog->outDebug("Spell (ID: %u) (caster Entry: %u) does not have type CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET record in `conditions` table.", m_spellInfo->Id, m_caster->GetEntry()); if (m_spellInfo->Effect[i] == SPELL_EFFECT_TELEPORT_UNITS) SearchAreaTarget(unitList, radius, pushType, SPELL_TARGETS_ENTRY, 0); @@ -2589,7 +2589,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) else { if (m_spellInfo->Effect[i] == SPELL_EFFECT_ACTIVATE_OBJECT) - sLog.outDebug("Spell (ID: %u) (caster Entry: %u) with SPELL_EFFECT_ACTIVATE_OBJECT does not have type CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET record in `conditions` table.", m_spellInfo->Id, m_caster->GetEntry()); + sLog->outDebug("Spell (ID: %u) (caster Entry: %u) with SPELL_EFFECT_ACTIVATE_OBJECT does not have type CONDITION_SOURCE_TYPE_SPELL_SCRIPT_TARGET record in `conditions` table.", m_spellInfo->Id, m_caster->GetEntry()); SearchGOAreaTarget(gobjectList, radius, pushType, SPELL_TARGETS_GO); } break; @@ -3050,11 +3050,11 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const * triggere // set timer base at cast time ReSetTimer(); - sLog.outDebug("Spell::prepare: spell id %u source %u caster %d triggered %u mask %u", m_spellInfo->Id, m_caster->GetEntry(), m_originalCaster ? m_originalCaster->GetEntry() : -1, m_IsTriggeredSpell ? 1 : 0, m_targets.getTargetMask()); + sLog->outDebug("Spell::prepare: spell id %u source %u caster %d triggered %u mask %u", m_spellInfo->Id, m_caster->GetEntry(), m_originalCaster ? m_originalCaster->GetEntry() : -1, m_IsTriggeredSpell ? 1 : 0, m_targets.getTargetMask()); //if (m_targets.getUnitTarget()) - // sLog.outError("Spell::prepare: unit target %u", m_targets.getUnitTarget()->GetEntry()); + // sLog->outError("Spell::prepare: unit target %u", m_targets.getUnitTarget()->GetEntry()); //if (m_targets.HasDst()) - // sLog.outError("Spell::prepare: pos target %f %f %f", m_targets.m_dstPos.m_positionX, m_targets.m_dstPos.m_positionY, m_targets.m_dstPos.m_positionZ); + // sLog->outError("Spell::prepare: pos target %f %f %f", m_targets.m_dstPos.m_positionX, m_targets.m_dstPos.m_positionY, m_targets.m_dstPos.m_positionZ); //Containers for channeled spells have to be set //TODO:Apply this to all casted spells if needed @@ -3634,7 +3634,7 @@ void Spell::update(uint32 difftime) if (m_targets.getUnitTargetGUID() && !m_targets.getUnitTarget()) { - sLog.outDebug("Spell %u is cancelled due to removal of target.", m_spellInfo->Id); + sLog->outDebug("Spell %u is cancelled due to removal of target.", m_spellInfo->Id); cancel(); return; } @@ -3671,7 +3671,7 @@ void Spell::update(uint32 difftime) // check if there are alive targets left if (!UpdateChanneledTargetList()) { - sLog.outDebug("Channeled spell %d is removed due to lack of targets", m_spellInfo->Id); + sLog->outDebug("Channeled spell %d is removed due to lack of targets", m_spellInfo->Id); SendChannelUpdate(0); finish(); } @@ -3763,7 +3763,7 @@ void Spell::finish(bool ok) SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell); if (spellInfo && spellInfo->SpellIconID == 2056) { - sLog.outDebug("Statue %d is unsummoned in spell %d finish", m_caster->GetGUIDLow(), m_spellInfo->Id); + sLog->outDebug("Statue %d is unsummoned in spell %d finish", m_caster->GetGUIDLow(), m_spellInfo->Id); m_caster->setDeathState(JUST_DIED); return; } @@ -3901,7 +3901,7 @@ void Spell::SendSpellStart() if (!IsNeedSendToClient()) return; - //sLog.outDebug("Sending SMSG_SPELL_START id=%u", m_spellInfo->Id); + //sLog->outDebug("Sending SMSG_SPELL_START id=%u", m_spellInfo->Id); uint32 castFlags = CAST_FLAG_UNKNOWN_2; if (m_spellInfo->Attributes & SPELL_ATTR0_REQ_AMMO) @@ -3949,7 +3949,7 @@ void Spell::SendSpellGo() if (!IsNeedSendToClient()) return; - //sLog.outDebug("Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id); + //sLog->outDebug("Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id); uint32 castFlags = CAST_FLAG_UNKNOWN_9; @@ -4389,7 +4389,7 @@ void Spell::TakeCastItem() { // This code is to avoid a crash // I'm not sure, if this is really an error, but I guess every item needs a prototype - sLog.outError("Cast item has no item prototype highId=%d, lowId=%d",m_CastItem->GetGUIDHigh(), m_CastItem->GetGUIDLow()); + sLog->outError("Cast item has no item prototype highId=%d, lowId=%d",m_CastItem->GetGUIDHigh(), m_CastItem->GetGUIDLow()); return; } @@ -4481,7 +4481,7 @@ void Spell::TakePower() if (m_spellInfo->powerType >= MAX_POWERS) { - sLog.outError("Spell::TakePower: Unknown power type '%d'", m_spellInfo->powerType); + sLog->outError("Spell::TakePower: Unknown power type '%d'", m_spellInfo->powerType); return; } @@ -4635,7 +4635,7 @@ void Spell::TakeRunePower() // you can gain some runic power when use runes float rp = (float)src->runePowerGain; - rp *= sWorld.getRate(RATE_POWER_RUNICPOWER_INCOME); + rp *= sWorld->getRate(RATE_POWER_RUNICPOWER_INCOME); plr->ModifyPower(POWER_RUNIC_POWER, (int32)rp); } @@ -4712,7 +4712,7 @@ void Spell::HandleThreatSpells(uint32 spellId) m_targets.getUnitTarget()->AddThreat(m_caster, float(threat)); - sLog.outStaticDebug("Spell %u, rank %u, added an additional %i threat", spellId, sSpellMgr->GetSpellRank(spellId), threat); + sLog->outStaticDebug("Spell %u, rank %u, added an additional %i threat", spellId, sSpellMgr->GetSpellRank(spellId), threat); } void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTarget,uint32 i) @@ -4727,7 +4727,7 @@ void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTar uint8 eff = m_spellInfo->Effect[i]; - sLog.outDebug("Spell: %u Effect : %u", m_spellInfo->Id, eff); + sLog->outDebug("Spell: %u Effect : %u", m_spellInfo->Id, eff); //we do not need DamageMultiplier here. damage = CalculateDamage(i, NULL); @@ -5260,7 +5260,7 @@ SpellCastResult Spell::CheckCast(bool strict) // chance for fail at orange skinning attempt if ((m_selfContainer && (*m_selfContainer) == this) && - skillValue < sWorld.GetConfigMaxSkillValue() && + skillValue < sWorld->GetConfigMaxSkillValue() && (ReqValue < 0 ? 0 : ReqValue) > irand(skillValue - 25, skillValue + 37)) return SPELL_FAILED_TRY_AGAIN; @@ -5325,7 +5325,7 @@ SpellCastResult Spell::CheckCast(bool strict) bool canFailAtMax = skillId != SKILL_HERBALISM && skillId != SKILL_MINING; // chance for failure in orange gather / lockpick (gathering skill can't fail at maxskill) - if ((canFailAtMax || skillValue < sWorld.GetConfigMaxSkillValue()) && reqSkillValue > irand(skillValue - 25, skillValue + 37)) + if ((canFailAtMax || skillValue < sWorld->GetConfigMaxSkillValue()) && reqSkillValue > irand(skillValue - 25, skillValue + 37)) return SPELL_FAILED_TRY_AGAIN; } break; @@ -5915,7 +5915,7 @@ SpellCastResult Spell::CheckPower() // Check valid power type if (m_spellInfo->powerType >= MAX_POWERS) { - sLog.outError("Spell::CheckPower: Unknown power type '%d'", m_spellInfo->powerType); + sLog->outError("Spell::CheckPower: Unknown power type '%d'", m_spellInfo->powerType); return SPELL_FAILED_UNKNOWN; } @@ -6469,7 +6469,7 @@ void Spell::Delayed() // only called in DealDamage() else m_timer += delaytime; - sLog.outDetail("Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime); + sLog->outDetail("Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime); WorldPacket data(SMSG_SPELL_DELAYED, 8+4); data.append(m_caster->GetPackGUID()); @@ -6504,7 +6504,7 @@ void Spell::DelayedChannel() else m_timer -= delaytime; - sLog.outDebug("Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer); + sLog->outDebug("Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer); for (std::list::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit) if ((*ihit).missCondition == SPELL_MISS_NONE) @@ -6729,7 +6729,7 @@ SpellEvent::~SpellEvent() } else { - sLog.outError("~SpellEvent: %s %u tried to delete non-deletable spell %u. Was not deleted, causes memory leak.", + sLog->outError("~SpellEvent: %s %u tried to delete non-deletable spell %u. Was not deleted, causes memory leak.", (m_Spell->GetCaster()->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), m_Spell->GetCaster()->GetGUIDLow(), m_Spell->m_spellInfo->Id); ASSERT(false); } @@ -6859,7 +6859,7 @@ bool Spell::IsValidSingleTargetSpell(Unit const* target) const { if (target->GetMapId() == MAPID_INVALID) { - sLog.outDebug("Spell::IsValidSingleTargetSpell - a spell was cast on '%s' (GUIDLow: %u), but they have an invalid map id!", target->GetName(), target->GetGUIDLow()); + sLog->outDebug("Spell::IsValidSingleTargetSpell - a spell was cast on '%s' (GUIDLow: %u), but they have an invalid map id!", target->GetName(), target->GetGUIDLow()); return false; } for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) @@ -7123,7 +7123,7 @@ void Spell::SelectTrajTargets() float b = tangent(m_targets.m_elevation); float a = (dz - dist2d * b) / (dist2d * dist2d); if (a > -0.0001f) a = 0; - DEBUG_TRAJ(sLog.outError("Spell::SelectTrajTargets: a %f b %f", a, b);) + DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: a %f b %f", a, b);) float bestDist = GetSpellMaxRange(m_spellInfo, false); @@ -7138,11 +7138,11 @@ void Spell::SelectTrajTargets() const float objDist2d = m_targets.m_srcPos.GetExactDist2d(*itr) * cos(m_targets.m_srcPos.GetRelativeAngle(*itr)); const float dz = (*itr)->GetPositionZ() - m_targets.m_srcPos.m_positionZ; - DEBUG_TRAJ(sLog.outError("Spell::SelectTrajTargets: check %u, dist between %f %f, height between %f %f.", (*itr)->GetEntry(), objDist2d - size, objDist2d + size, dz - size, dz + size);) + DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: check %u, dist between %f %f, height between %f %f.", (*itr)->GetEntry(), objDist2d - size, objDist2d + size, dz - size, dz + size);) float dist = objDist2d - size; float height = dist * (a * dist + b); - DEBUG_TRAJ(sLog.outError("Spell::SelectTrajTargets: dist %f, height %f.", dist, height);) + DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: dist %f, height %f.", dist, height);) if (dist < bestDist && height < dz + size && height > dz - size) { bestDist = dist > 0 ? dist : 0; @@ -7150,7 +7150,7 @@ void Spell::SelectTrajTargets() } #define CHECK_DIST {\ - DEBUG_TRAJ(sLog.outError("Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\ + DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\ if (dist > bestDist) continue;\ if (dist < objDist2d + size && dist > objDist2d - size) { bestDist = dist; break; }\ } @@ -7207,7 +7207,7 @@ void Spell::SelectTrajTargets() float distSq = (*itr)->GetExactDistSq(x, y, z); float sizeSq = (*itr)->GetObjectSize(); sizeSq *= sizeSq; - DEBUG_TRAJ(sLog.outError("Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);) + DEBUG_TRAJ(sLog->outError("Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);) if (distSq > sizeSq) { float factor = 1 - sqrt(sizeSq / distSq); @@ -7216,7 +7216,7 @@ void Spell::SelectTrajTargets() z += factor * ((*itr)->GetPositionZ() - z); distSq = (*itr)->GetExactDistSq(x, y, z); - DEBUG_TRAJ(sLog.outError("Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);) + DEBUG_TRAJ(sLog->outError("Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);) } } @@ -7267,7 +7267,7 @@ void Spell::CheckEffectExecuteData() void Spell::LoadScripts() { - sLog.outDebug("Spell::LoadScripts"); + sLog->outDebug("Spell::LoadScripts"); sScriptMgr->CreateSpellScripts(m_spellInfo->Id, m_loadedScripts); for(std::list::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end() ;) { diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 1218aaa1ee3..f87d9ef140f 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("WORLD: Spell Effect DUMMY"); } void Spell::EffectUnused(SpellEffIndex /*effIndex*/) @@ -282,7 +282,7 @@ void Spell::EffectInstaKill(SpellEffIndex /*effIndex*/) case 1863: spellID = 18791; break; //succubus case 17252: spellID = 35701; break; //fellguard default: - sLog.outError("EffectInstaKill: Unhandled creature entry (%u) case.", entry); + sLog->outError("EffectInstaKill: Unhandled creature entry (%u) case.", entry); return; } @@ -818,7 +818,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) case 12850: damage *= 0.32f; break; // Rank 2 case 12868: damage *= 0.48f; break; // Rank 3 default: - sLog.outError("Spell::EffectDummy: Spell %u not handled in DW",m_spellInfo->Id); + sLog->outError("Spell::EffectDummy: Spell %u not handled in DW",m_spellInfo->Id); return; }; @@ -847,7 +847,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) m_caster->CastCustomSpell(unitTarget, 26470, &damage, NULL, NULL, true); break; default: - sLog.outError("EffectDummy: Non-handled case for spell 13567 for triggered aura %u",m_triggeredByAuraSpell->Id); + sLog->outError("EffectDummy: Non-handled case for spell 13567 for triggered aura %u",m_triggeredByAuraSpell->Id); break; } return; @@ -877,7 +877,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("SummonGameObject at SpellEfects.cpp EffectDummy for Spell 23019"); creatureTarget->ForcedDespawn(); @@ -1499,7 +1499,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex) if (!spellInfo) { - sLog.outError("EffectDummy of spell %u: triggering unknown spell id %i\n", m_spellInfo->Id, spell_id); + sLog->outError("EffectDummy of spell %u: triggering unknown spell id %i\n", m_spellInfo->Id, spell_id); return; } @@ -1517,7 +1517,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("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 @@ -1539,7 +1539,7 @@ void Spell::EffectTriggerSpellWithValue(SpellEffIndex effIndex) if (!spellInfo) { - sLog.outError("EffectTriggerSpellWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); + sLog->outError("EffectTriggerSpellWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); return; } @@ -1556,7 +1556,7 @@ void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex) if (!spellInfo) { - sLog.outError("EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); + sLog->outError("EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); return; } @@ -1577,7 +1577,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex) if (!spellInfo) { - sLog.outError("EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); + sLog->outError("EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); return; } @@ -1616,7 +1616,7 @@ void Spell::EffectForceCastWithValue(SpellEffIndex effIndex) if (!spellInfo) { - sLog.outError("EffectForceCastWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); + sLog->outError("EffectForceCastWithValue of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); return; } int32 bp = damage; @@ -1632,7 +1632,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) if (!unitTarget) { if (gameObjTarget || itemTarget) - sLog.outError("Spell::EffectTriggerSpell (Spell: %u): Unsupported non-unit case!",m_spellInfo->Id); + sLog->outError("Spell::EffectTriggerSpell (Spell: %u): Unsupported non-unit case!",m_spellInfo->Id); return; } @@ -1761,7 +1761,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex) SpellEntry const *spellInfo = sSpellStore.LookupEntry(triggered_spell_id); if (!spellInfo) { - sLog.outError("EffectTriggerSpell of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); + sLog->outError("EffectTriggerSpell of spell %u: triggering unknown spell id %i", m_spellInfo->Id,triggered_spell_id); return; } @@ -1787,13 +1787,13 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex) if (!spellInfo) { - sLog.outError("EffectTriggerMissileSpell of spell %u (eff: %u): triggering unknown spell id %u", + sLog->outError("EffectTriggerMissileSpell of spell %u (eff: %u): triggering unknown spell id %u", m_spellInfo->Id,effIndex,triggered_spell_id); return; } if (m_CastItem) - sLog.outStaticDebug("WORLD: cast Item spellId - %i", spellInfo->Id); + sLog->outStaticDebug("WORLD: cast Item spellId - %i", spellInfo->Id); // Remove spell cooldown (not category) if spell triggering spell with cooldown and same category // Needed by freezing arrow and few other spells @@ -1824,7 +1824,7 @@ void Spell::EffectJump(SpellEffIndex effIndex) } else { - sLog.outError("Spell::EffectJump - unsupported target mode for spell ID %u", m_spellInfo->Id); + sLog->outError("Spell::EffectJump - unsupported target mode for spell ID %u", m_spellInfo->Id); return; } @@ -1863,7 +1863,7 @@ void Spell::EffectJumpDest(SpellEffIndex effIndex) } else { - sLog.outError("Spell::EffectJumpDest - unsupported target mode for spell ID %u", m_spellInfo->Id); + sLog->outError("Spell::EffectJumpDest - unsupported target mode for spell ID %u", m_spellInfo->Id); return; } @@ -1912,7 +1912,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/) // If not exist data for dest location - return if (!m_targets.HasDst()) { - sLog.outError("Spell::EffectTeleportUnits - does not have destination for spell ID %u\n", m_spellInfo->Id); + sLog->outError("Spell::EffectTeleportUnits - does not have destination for spell ID %u\n", m_spellInfo->Id); return; } @@ -1924,7 +1924,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("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); @@ -2054,7 +2054,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("Spell: Player %u has unlearned spell %u from NpcGUID: %u", _player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow()); } void Spell::EffectPowerDrain(SpellEffIndex effIndex) @@ -2096,7 +2096,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("Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->EffectMiscValue[effIndex], m_spellInfo->Id); Object *pTarget; if (focusObject) @@ -2195,7 +2195,7 @@ void Spell::SpellDamageHeal(SpellEffIndex /*effIndex*/) if (!targetAura) { - sLog.outError("Target(GUID:" UI64FMTD ") has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID()); + sLog->outError("Target(GUID:" UI64FMTD ") has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID()); return; } @@ -2298,7 +2298,7 @@ void Spell::EffectHealthLeech(SpellEffIndex effIndex) if (!unitTarget || !unitTarget->isAlive() || damage < 0) return; - sLog.outDebug("HealthLeech :%i", damage); + sLog->outDebug("HealthLeech :%i", damage); float healMultiplier = SpellMgr::CalculateSpellEffectValueMultiplier(m_spellInfo, effIndex, m_originalCaster, this); @@ -2670,7 +2670,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("Chest ScriptStart id %u for GO %u", gameObjTarget->GetGOInfo()->chest.eventId,gameObjTarget->GetDBTableGUIDLow()); player->GetMap()->ScriptsStart(sEventScripts, gameObjTarget->GetGOInfo()->chest.eventId, player, gameObjTarget); } @@ -2692,7 +2692,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex) { if (m_caster->GetTypeId() != TYPEID_PLAYER) { - sLog.outDebug("WORLD: Open Lock - No Player Caster!"); + sLog->outDebug("WORLD: Open Lock - No Player Caster!"); return; } @@ -2747,7 +2747,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex) } else { - sLog.outDebug("WORLD: Open Lock - No GameObject/Item Target!"); + sLog->outDebug("WORLD: Open Lock - No GameObject/Item Target!"); return; } @@ -2917,7 +2917,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex) SummonPropertiesEntry const *properties = sSummonPropertiesStore.LookupEntry(m_spellInfo->EffectMiscValueB[effIndex]); if (!properties) { - sLog.outError("EffectSummonType: Unhandled summon type %u", m_spellInfo->EffectMiscValueB[effIndex]); + sLog->outError("EffectSummonType: Unhandled summon type %u", m_spellInfo->EffectMiscValueB[effIndex]); return; } @@ -3105,7 +3105,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("Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow()); } typedef std::list< std::pair > DispelList; @@ -3365,7 +3365,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("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; } @@ -3374,13 +3374,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("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("SpellEffect::AddHonor (spell_id %u) rewards %u honor points (non scale) for player: %u", m_spellInfo->Id, damage, unitTarget->ToPlayer()->GetGUIDLow()); } } @@ -3433,9 +3433,9 @@ void Spell::EffectEnchantItemPerm(SpellEffIndex effIndex) if (!item_owner) return; - if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE)) + if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE)) { - sLog.outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)", + sLog->outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)", p_caster->GetName(),p_caster->GetSession()->GetAccountId(), itemTarget->GetProto()->Name1,itemTarget->GetEntry(), item_owner->GetName(),item_owner->GetSession()->GetAccountId()); @@ -3483,7 +3483,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex) } if (!add_socket) { - sLog.outError("Spell::EffectEnchantItemPrismatic: attempt apply enchant spell %u with SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC (%u) but without ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET (%u), not suppoted yet.", + sLog->outError("Spell::EffectEnchantItemPrismatic: attempt apply enchant spell %u with SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC (%u) but without ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET (%u), not suppoted yet.", m_spellInfo->Id,SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC,ITEM_ENCHANTMENT_TYPE_PRISMATIC_SOCKET); return; } @@ -3494,9 +3494,9 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex) if (!item_owner) return; - if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE)) + if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE)) { - sLog.outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)", + sLog->outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(perm): %s (Entry: %d) for player: %s (Account: %u)", p_caster->GetName(),p_caster->GetSession()->GetAccountId(), itemTarget->GetProto()->Name1,itemTarget->GetEntry(), item_owner->GetName(),item_owner->GetSession()->GetAccountId()); @@ -3545,14 +3545,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) case 10: spell_id = 36758; break; // 14% case 11: spell_id = 36760; break; // 20% default: - sLog.outError("Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW",damage); + sLog->outError("Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW",damage); return; } SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id); if (!spellInfo) { - sLog.outError("Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id); + sLog->outError("Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id); return; } @@ -3579,14 +3579,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) if (!enchant_id) { - sLog.outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have 0 as enchanting id",m_spellInfo->Id,effIndex); + sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have 0 as enchanting id",m_spellInfo->Id,effIndex); return; } SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); if (!pEnchant) { - sLog.outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ",m_spellInfo->Id,effIndex,enchant_id); + sLog->outError("Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ",m_spellInfo->Id,effIndex,enchant_id); return; } @@ -3624,9 +3624,9 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex) if (!item_owner) return; - if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld.getBoolConfig(CONFIG_GM_LOG_TRADE)) + if (item_owner != p_caster && p_caster->GetSession()->GetSecurity() > SEC_PLAYER && sWorld->getBoolConfig(CONFIG_GM_LOG_TRADE)) { - sLog.outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(temp): %s (Entry: %d) for player: %s (Account: %u)", + sLog->outCommand(p_caster->GetSession()->GetAccountId(),"GM %s (Account: %u) enchanting(temp): %s (Entry: %d) for player: %s (Account: %u)", p_caster->GetName(), p_caster->GetSession()->GetAccountId(), itemTarget->GetProto()->Name1, itemTarget->GetEntry(), item_owner->GetName(), item_owner->GetSession()->GetAccountId()); @@ -5092,7 +5092,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) case 31893: spell_heal = 48084; break; case 31883: spell_heal = 48085; break; default: - sLog.outError("Unknown Lightwell spell caster %u", m_caster->GetEntry()); + sLog->outError("Unknown Lightwell spell caster %u", m_caster->GetEntry()); return; } Aura * chargesaura = m_caster->GetAura(59907); @@ -5209,7 +5209,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex) case 57774: spellId1 = 20185; break; // Judgement of Light case 53408: spellId1 = 20186; break; // Judgement of Wisdom default: - sLog.outError("Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect",m_spellInfo->Id); + sLog->outError("Unsupported Judgement (seal trigger) spell (Id: %u) in Spell::EffectScriptEffect",m_spellInfo->Id); return; } // all seals have aura dummy in 2 effect @@ -5340,7 +5340,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("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); } @@ -5485,13 +5485,13 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/) if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER) return; - if (!sWorld.getBoolConfig(CONFIG_CAST_UNSTUCK)) + if (!sWorld->getBoolConfig(CONFIG_CAST_UNSTUCK)) return; 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()); + 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()); if (pTarget->isInFlight()) return; @@ -6303,7 +6303,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) if (!goinfo) { - sLog.outErrorDb("Gameobject (Entry: %u) not exist and not created at spell (ID: %u) cast",name_id, m_spellInfo->Id); + sLog->outErrorDb("Gameobject (Entry: %u) not exist and not created at spell (ID: %u) cast",name_id, m_spellInfo->Id); return; } @@ -6407,7 +6407,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex) ExecuteLogEffectSummonObject(effIndex, pGameObj); - sLog.outStaticDebug("AddObject at SpellEfects.cpp EffectTransmitted"); + sLog->outStaticDebug("AddObject at SpellEfects.cpp EffectTransmitted"); //m_caster->AddGameObject(pGameObj); //m_ObjToDel.push_back(pGameObj); @@ -6449,7 +6449,7 @@ void Spell::EffectProspecting(SpellEffIndex /*effIndex*/) if (itemTarget->GetCount() < 5) return; - if (sWorld.getBoolConfig(CONFIG_SKILL_PROSPECTING)) + if (sWorld->getBoolConfig(CONFIG_SKILL_PROSPECTING)) { uint32 SkillValue = p_caster->GetPureSkillValue(SKILL_JEWELCRAFTING); uint32 reqSkillValue = itemTarget->GetProto()->RequiredSkillRank; @@ -6471,7 +6471,7 @@ void Spell::EffectMilling(SpellEffIndex /*effIndex*/) if (itemTarget->GetCount() < 5) return; - if (sWorld.getBoolConfig(CONFIG_SKILL_MILLING)) + if (sWorld->getBoolConfig(CONFIG_SKILL_MILLING)) { uint32 SkillValue = p_caster->GetPureSkillValue(SKILL_INSCRIPTION); uint32 reqSkillValue = itemTarget->GetProto()->RequiredSkillRank; @@ -6483,7 +6483,7 @@ void Spell::EffectMilling(SpellEffIndex /*effIndex*/) void Spell::EffectSkill(SpellEffIndex /*effIndex*/) { - sLog.outDebug("WORLD: SkillEFFECT"); + sLog->outDebug("WORLD: SkillEFFECT"); } /* There is currently no need for this effect. We handle it in Battleground.cpp @@ -6510,7 +6510,7 @@ void Spell::EffectSpiritHeal(SpellEffIndex /*effIndex*/) // remove insignia spell effect void Spell::EffectSkinPlayerCorpse(SpellEffIndex /*effIndex*/) { - sLog.outDebug("Effect: SkinPlayerCorpse"); + sLog->outDebug("Effect: SkinPlayerCorpse"); if ((m_caster->GetTypeId() != TYPEID_PLAYER) || (unitTarget->GetTypeId() != TYPEID_PLAYER) || (unitTarget->isAlive())) return; @@ -6519,7 +6519,7 @@ void Spell::EffectSkinPlayerCorpse(SpellEffIndex /*effIndex*/) void Spell::EffectStealBeneficialBuff(SpellEffIndex effIndex) { - sLog.outDebug("Effect: StealBeneficialBuff"); + sLog->outDebug("Effect: StealBeneficialBuff"); if (!unitTarget || unitTarget == m_caster) // can't steal from self return; @@ -6946,7 +6946,7 @@ void Spell::EffectPlayMusic(SpellEffIndex effIndex) if (!sSoundEntriesStore.LookupEntry(soundid)) { - sLog.outError("EffectPlayMusic: Sound (Id: %u) not exist in spell %u.",soundid,m_spellInfo->Id); + sLog->outError("EffectPlayMusic: Sound (Id: %u) not exist in spell %u.",soundid,m_spellInfo->Id); return; } @@ -7068,7 +7068,7 @@ void Spell::EffectBind(SpellEffIndex effIndex) SpellTargetPosition const* st = sSpellMgr->GetSpellTargetPosition(m_spellInfo->Id); if (!st) { - sLog.outError("Spell::EffectBind - unknown teleport coordinates for spell ID %u", m_spellInfo->Id); + sLog->outError("Spell::EffectBind - unknown teleport coordinates for spell ID %u", m_spellInfo->Id); return; } @@ -7096,11 +7096,11 @@ void Spell::EffectBind(SpellEffIndex effIndex) data << uint32(area_id); player->SendDirectMessage(&data); - sLog.outStaticDebug("New homebind X : %f", loc.m_positionX); - sLog.outStaticDebug("New homebind Y : %f", loc.m_positionY); - sLog.outStaticDebug("New homebind Z : %f", loc.m_positionZ); - sLog.outStaticDebug("New homebind MapId : %u", loc.m_mapId); - sLog.outStaticDebug("New homebind AreaId : %u", area_id); + sLog->outStaticDebug("New homebind X : %f", loc.m_positionX); + sLog->outStaticDebug("New homebind Y : %f", loc.m_positionY); + sLog->outStaticDebug("New homebind Z : %f", loc.m_positionZ); + sLog->outStaticDebug("New homebind MapId : %u", loc.m_mapId); + sLog->outStaticDebug("New homebind AreaId : %u", area_id); // zone update data.Initialize(SMSG_PLAYERBOUND, 8+4); diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 22379b1db68..550dafc449d 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -373,7 +373,7 @@ uint32 CalculatePowerCost(SpellEntry const * spellInfo, Unit const * caster, Spe // Else drain all power if (spellInfo->powerType < MAX_POWERS) return caster->GetPower(Powers(spellInfo->powerType)); - sLog.outError("CalculateManaCost: Unknown power type '%d' in spell %d", spellInfo->powerType, spellInfo->Id); + sLog->outError("CalculateManaCost: Unknown power type '%d' in spell %d", spellInfo->powerType, spellInfo->Id); return 0; } @@ -399,10 +399,10 @@ uint32 CalculatePowerCost(SpellEntry const * spellInfo, Unit const * caster, Spe break; case POWER_RUNE: case POWER_RUNIC_POWER: - sLog.outDebug("CalculateManaCost: Not implemented yet!"); + sLog->outDebug("CalculateManaCost: Not implemented yet!"); break; default: - sLog.outError("CalculateManaCost: Unknown power type '%d' in spell %d", spellInfo->powerType, spellInfo->Id); + sLog->outError("CalculateManaCost: Unknown power type '%d' in spell %d", spellInfo->powerType, spellInfo->Id); return 0; } } @@ -1074,7 +1074,7 @@ SpellCastResult GetErrorAtShapeshiftedCast (SpellEntry const *spellInfo, uint32 shapeInfo = sSpellShapeshiftStore.LookupEntry(form); if (!shapeInfo) { - sLog.outError("GetErrorAtShapeshiftedCast: unknown shapeshift %u", form); + sLog->outError("GetErrorAtShapeshiftedCast: unknown shapeshift %u", form); return SPELL_CAST_OK; } actAsShifted = !(shapeInfo->flags1 & 1); // shapeshift acts as normal form for spells @@ -1116,8 +1116,8 @@ void SpellMgr::LoadSpellTargetPositions() QueryResult result = WorldDatabase.Query("SELECT id, target_map, target_position_x, target_position_y, target_position_z, target_orientation FROM spell_target_position"); if (!result) { - sLog.outString(">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty."); - sLog.outString(); + sLog->outString(">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty."); + sLog->outString(); return; } @@ -1141,20 +1141,20 @@ void SpellMgr::LoadSpellTargetPositions() MapEntry const* mapEntry = sMapStore.LookupEntry(st.target_mapId); if (!mapEntry) { - sLog.outErrorDb("Spell (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.",Spell_ID,st.target_mapId); + sLog->outErrorDb("Spell (ID:%u) target map (ID: %u) does not exist in `Map.dbc`.",Spell_ID,st.target_mapId); continue; } if (st.target_X==0 && st.target_Y==0 && st.target_Z==0) { - sLog.outErrorDb("Spell (ID:%u) target coordinates not provided.",Spell_ID); + sLog->outErrorDb("Spell (ID:%u) target coordinates not provided.",Spell_ID); continue; } SpellEntry const* spellInfo = sSpellStore.LookupEntry(Spell_ID); if (!spellInfo) { - sLog.outErrorDb("Spell (ID:%u) listed in `spell_target_position` does not exist.",Spell_ID); + sLog->outErrorDb("Spell (ID:%u) listed in `spell_target_position` does not exist.",Spell_ID); continue; } @@ -1169,7 +1169,7 @@ void SpellMgr::LoadSpellTargetPositions() uint32 area_id = sMapMgr->GetAreaId(st.target_mapId, st.target_X, st.target_Y, st.target_Z); if (area_id != uint32(spellInfo->EffectMiscValue[i])) { - sLog.outErrorDb("Spell (Id: %u) listed in `spell_target_position` expected point to zone %u bit point to zone %u.",Spell_ID, spellInfo->EffectMiscValue[i], area_id); + sLog->outErrorDb("Spell (Id: %u) listed in `spell_target_position` expected point to zone %u bit point to zone %u.",Spell_ID, spellInfo->EffectMiscValue[i], area_id); break; } } @@ -1180,7 +1180,7 @@ void SpellMgr::LoadSpellTargetPositions() } if (!found) { - sLog.outErrorDb("Spell (Id: %u) listed in `spell_target_position` does not have target TARGET_DST_DB (17).",Spell_ID); + sLog->outErrorDb("Spell (Id: %u) listed in `spell_target_position` does not have target TARGET_DST_DB (17).",Spell_ID); continue; } @@ -1219,12 +1219,12 @@ void SpellMgr::LoadSpellTargetPositions() if (found) { // if (!sSpellMgr->GetSpellTargetPosition(i)) -// sLog.outDebug("Spell (ID: %u) does not have record in `spell_target_position`", i); +// sLog->outDebug("Spell (ID: %u) does not have record in `spell_target_position`", i); } } - sLog.outString(">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } bool SpellMgr::IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod) const @@ -1257,8 +1257,8 @@ void SpellMgr::LoadSpellProcEvents() QueryResult result = WorldDatabase.Query("SELECT entry, SchoolMask, SpellFamilyName, SpellFamilyMask0, SpellFamilyMask1, SpellFamilyMask2, procFlags, procEx, ppmRate, CustomChance, Cooldown FROM spell_proc_event"); if (!result) { - sLog.outString(">> Loaded %u spell proc event conditions", count); - sLog.outString(); + sLog->outString(">> Loaded %u spell proc event conditions", count); + sLog->outString(); return; } @@ -1273,7 +1273,7 @@ void SpellMgr::LoadSpellProcEvents() const SpellEntry *spell = sSpellStore.LookupEntry(entry); if (!spell) { - sLog.outErrorDb("Spell %u listed in `spell_proc_event` does not exist", entry); + sLog->outErrorDb("Spell %u listed in `spell_proc_event` does not exist", entry); continue; } @@ -1296,7 +1296,7 @@ void SpellMgr::LoadSpellProcEvents() { if (spe.procFlags == 0) { - sLog.outErrorDb("Spell %u listed in `spell_proc_event` probally not triggered spell", entry); + sLog->outErrorDb("Spell %u listed in `spell_proc_event` probally not triggered spell", entry); continue; } customProc++; @@ -1305,10 +1305,10 @@ void SpellMgr::LoadSpellProcEvents() } while (result->NextRow()); if (customProc) - sLog.outString(">> Loaded %u extra and %u custom spell proc event conditions in %u ms", count, customProc, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(">> Loaded %u extra and %u custom spell proc event conditions in %u ms", count, customProc, GetMSTimeDiffToNow(oldMSTime)); else - sLog.outString(">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } void SpellMgr::LoadSpellBonusess() @@ -1321,8 +1321,8 @@ void SpellMgr::LoadSpellBonusess() QueryResult result = WorldDatabase.Query("SELECT entry, direct_bonus, dot_bonus, ap_bonus, ap_dot_bonus FROM spell_bonus_data"); if (!result) { - sLog.outString(">> Loaded %u spell bonus data", count); - sLog.outString(); + sLog->outString(">> Loaded %u spell bonus data", count); + sLog->outString(); return; } @@ -1334,7 +1334,7 @@ void SpellMgr::LoadSpellBonusess() const SpellEntry *spell = sSpellStore.LookupEntry(entry); if (!spell) { - sLog.outErrorDb("Spell %u listed in `spell_bonus_data` does not exist", entry); + sLog->outErrorDb("Spell %u listed in `spell_bonus_data` does not exist", entry); continue; } @@ -1349,8 +1349,8 @@ void SpellMgr::LoadSpellBonusess() ++count; } while (result->NextRow()); - sLog.outString(">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const* spellProcEvent, uint32 EventProcFlag, SpellEntry const * procSpell, uint32 procFlags, uint32 procExtra, bool active) @@ -1498,8 +1498,8 @@ void SpellMgr::LoadSpellGroups() - sLog.outString(); - sLog.outString(">> Loaded %u spell group definitions", count); + sLog->outString(); + sLog->outString(">> Loaded %u spell group definitions", count); return; } @@ -1514,7 +1514,7 @@ void SpellMgr::LoadSpellGroups() uint32 group_id = fields[0].GetUInt32(); if (group_id <= SPELL_GROUP_DB_RANGE_MIN && group_id >= SPELL_GROUP_CORE_RANGE_MAX) { - sLog.outErrorDb("SpellGroup id %u listed in `spell_groups` is in core range, but is not defined in core!", group_id); + sLog->outErrorDb("SpellGroup id %u listed in `spell_groups` is in core range, but is not defined in core!", group_id); continue; } int32 spell_id = fields[1].GetInt32(); @@ -1530,7 +1530,7 @@ void SpellMgr::LoadSpellGroups() { if (groups.find(abs(itr->second)) == groups.end()) { - sLog.outErrorDb("SpellGroup id %u listed in `spell_groups` does not exist", abs(itr->second)); + sLog->outErrorDb("SpellGroup id %u listed in `spell_groups` does not exist", abs(itr->second)); mSpellGroupSpell.erase(itr++); } else @@ -1542,12 +1542,12 @@ void SpellMgr::LoadSpellGroups() if (!spellInfo) { - sLog.outErrorDb("Spell %u listed in `spell_group` does not exist", itr->second); + sLog->outErrorDb("Spell %u listed in `spell_group` does not exist", itr->second); mSpellGroupSpell.erase(itr++); } else if (GetSpellRank(itr->second) > 1) { - sLog.outErrorDb("Spell %u listed in `spell_group` is not first rank of spell", itr->second); + sLog->outErrorDb("Spell %u listed in `spell_group` is not first rank of spell", itr->second); mSpellGroupSpell.erase(itr++); } else @@ -1567,8 +1567,8 @@ void SpellMgr::LoadSpellGroups() } } - sLog.outString(">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } void SpellMgr::LoadSpellGroupStackRules() @@ -1585,8 +1585,8 @@ void SpellMgr::LoadSpellGroupStackRules() { - sLog.outString(">> Loaded 0 spell group stack rules"); - sLog.outString(); + sLog->outString(">> Loaded 0 spell group stack rules"); + sLog->outString(); return; } @@ -1600,7 +1600,7 @@ void SpellMgr::LoadSpellGroupStackRules() uint8 stack_rule = fields[1].GetUInt32(); if (stack_rule >= SPELL_GROUP_STACK_RULE_MAX) { - sLog.outErrorDb("SpellGroupStackRule %u listed in `spell_group_stack_rules` does not exist", stack_rule); + sLog->outErrorDb("SpellGroupStackRule %u listed in `spell_group_stack_rules` does not exist", stack_rule); continue; } @@ -1608,7 +1608,7 @@ void SpellMgr::LoadSpellGroupStackRules() if (spellGroup.first == spellGroup.second) { - sLog.outErrorDb("SpellGroup id %u listed in `spell_group_stack_rules` does not exist", group_id); + sLog->outErrorDb("SpellGroup id %u listed in `spell_group_stack_rules` does not exist", group_id); continue; } @@ -1617,8 +1617,8 @@ void SpellMgr::LoadSpellGroupStackRules() ++count; } while (result->NextRow()); - sLog.outString(">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } void SpellMgr::LoadSpellThreats() @@ -1636,8 +1636,8 @@ void SpellMgr::LoadSpellThreats() - sLog.outString(">> Loaded %u aggro generating spells", count); - sLog.outString(); + sLog->outString(">> Loaded %u aggro generating spells", count); + sLog->outString(); return; } @@ -1652,7 +1652,7 @@ void SpellMgr::LoadSpellThreats() if (!sSpellStore.LookupEntry(entry)) { - sLog.outErrorDb("Spell %u listed in `spell_threat` does not exist", entry); + sLog->outErrorDb("Spell %u listed in `spell_threat` does not exist", entry); continue; } @@ -1661,8 +1661,8 @@ void SpellMgr::LoadSpellThreats() ++count; } while (result->NextRow()); - sLog.outString(">> Loaded %u aggro generating spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u aggro generating spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } bool SpellMgr::IsRankSpellDueToSpell(SpellEntry const *spellInfo_1,uint32 spellId_2) const @@ -1971,8 +1971,8 @@ void SpellMgr::LoadSpellLearnSkills() } } - sLog.outString(">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } void SpellMgr::LoadSpellLearnSpells() @@ -1986,9 +1986,9 @@ void SpellMgr::LoadSpellLearnSpells() if (!result) { - sLog.outString(">> Loaded 0 spell learn spells"); - sLog.outString(); - sLog.outErrorDb("`spell_learn_spell` table is empty!"); + sLog->outString(">> Loaded 0 spell learn spells"); + sLog->outString(); + sLog->outErrorDb("`spell_learn_spell` table is empty!"); return; } @@ -2007,19 +2007,19 @@ void SpellMgr::LoadSpellLearnSpells() if (!sSpellStore.LookupEntry(spell_id)) { - sLog.outErrorDb("Spell %u listed in `spell_learn_spell` does not exist", spell_id); + sLog->outErrorDb("Spell %u listed in `spell_learn_spell` does not exist", spell_id); continue; } if (!sSpellStore.LookupEntry(node.spell)) { - sLog.outErrorDb("Spell %u listed in `spell_learn_spell` learning not existed spell %u", spell_id, node.spell); + sLog->outErrorDb("Spell %u listed in `spell_learn_spell` learning not existed spell %u", spell_id, node.spell); continue; } if (GetTalentSpellCost(node.spell)) { - sLog.outErrorDb("Spell %u listed in `spell_learn_spell` attempt learning talent spell %u, skipped", spell_id, node.spell); + sLog->outErrorDb("Spell %u listed in `spell_learn_spell` attempt learning talent spell %u, skipped", spell_id, node.spell); continue; } @@ -2061,7 +2061,7 @@ void SpellMgr::LoadSpellLearnSpells() { if (itr->second.spell == dbc_node.spell) { - sLog.outErrorDb("Spell %u auto-learn spell %u in spell.dbc then the record in `spell_learn_spell` is redundant, please fix DB.", + sLog->outErrorDb("Spell %u auto-learn spell %u in spell.dbc then the record in `spell_learn_spell` is redundant, please fix DB.", spell,dbc_node.spell); found = true; break; @@ -2077,8 +2077,8 @@ void SpellMgr::LoadSpellLearnSpells() } } - sLog.outString(">> Loaded %u spell learn spells + %u found in DBC in %u ms", count, dbc_count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u spell learn spells + %u found in DBC in %u ms", count, dbc_count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } void SpellMgr::LoadSpellPetAuras() @@ -2091,8 +2091,8 @@ void SpellMgr::LoadSpellPetAuras() QueryResult result = WorldDatabase.Query("SELECT spell, effectId, pet, aura FROM spell_pet_auras"); if (!result) { - sLog.outString(">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty."); - sLog.outString(); + sLog->outString(">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty."); + sLog->outString(); return; } @@ -2116,21 +2116,21 @@ void SpellMgr::LoadSpellPetAuras() SpellEntry const* spellInfo = sSpellStore.LookupEntry(spell); if (!spellInfo) { - sLog.outErrorDb("Spell %u listed in `spell_pet_auras` does not exist", spell); + sLog->outErrorDb("Spell %u listed in `spell_pet_auras` does not exist", spell); continue; } if (spellInfo->Effect[eff] != SPELL_EFFECT_DUMMY && (spellInfo->Effect[eff] != SPELL_EFFECT_APPLY_AURA || spellInfo->EffectApplyAuraName[eff] != SPELL_AURA_DUMMY)) { - sLog.outError("Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell); + sLog->outError("Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell); continue; } SpellEntry const* spellInfo2 = sSpellStore.LookupEntry(aura); if (!spellInfo2) { - sLog.outErrorDb("Aura %u listed in `spell_pet_auras` does not exist", aura); + sLog->outErrorDb("Aura %u listed in `spell_pet_auras` does not exist", aura); continue; } @@ -2141,8 +2141,8 @@ void SpellMgr::LoadSpellPetAuras() ++count; } while (result->NextRow()); - sLog.outString(">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } void SpellMgr::LoadPetLevelupSpellMap() @@ -2200,8 +2200,8 @@ void SpellMgr::LoadPetLevelupSpellMap() } } - sLog.outString(">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } bool LoadPetDefaultSpells_helper(CreatureInfo const* cInfo, PetDefaultSpellsEntry& petDefSpells) @@ -2289,10 +2289,10 @@ void SpellMgr::LoadPetDefaultSpells() } } - sLog.outString(">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); - sLog.outString("Loading summonable creature templates..."); + sLog->outString("Loading summonable creature templates..."); oldMSTime = getMSTime(); @@ -2336,8 +2336,8 @@ void SpellMgr::LoadPetDefaultSpells() } - sLog.outString(">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } /// Some checks for spells, to prevent adding deprecated/broken spells for trainers, spell book, etc @@ -2371,7 +2371,7 @@ bool SpellMgr::IsSpellValid(SpellEntry const *spellInfo, Player *pl, bool msg) if (pl) ChatHandler(pl).PSendSysMessage("Craft spell %u not have create item entry.",spellInfo->Id); else - sLog.outErrorDb("Craft spell %u not have create item entry.",spellInfo->Id); + sLog->outErrorDb("Craft spell %u not have create item entry.",spellInfo->Id); } return false; } @@ -2385,7 +2385,7 @@ bool SpellMgr::IsSpellValid(SpellEntry const *spellInfo, Player *pl, bool msg) if (pl) ChatHandler(pl).PSendSysMessage("Craft spell %u create not-exist in DB item (Entry: %u) and then...",spellInfo->Id,spellInfo->EffectItemType[i]); else - sLog.outErrorDb("Craft spell %u create not-exist in DB item (Entry: %u) and then...",spellInfo->Id,spellInfo->EffectItemType[i]); + sLog->outErrorDb("Craft spell %u create not-exist in DB item (Entry: %u) and then...",spellInfo->Id,spellInfo->EffectItemType[i]); } return false; } @@ -2403,7 +2403,7 @@ bool SpellMgr::IsSpellValid(SpellEntry const *spellInfo, Player *pl, bool msg) if (pl) ChatHandler(pl).PSendSysMessage("Spell %u learn to broken spell %u, and then...",spellInfo->Id,spellInfo->EffectTriggerSpell[i]); else - sLog.outErrorDb("Spell %u learn to invalid spell %u, and then...",spellInfo->Id,spellInfo->EffectTriggerSpell[i]); + sLog->outErrorDb("Spell %u learn to invalid spell %u, and then...",spellInfo->Id,spellInfo->EffectTriggerSpell[i]); } return false; } @@ -2423,7 +2423,7 @@ bool SpellMgr::IsSpellValid(SpellEntry const *spellInfo, Player *pl, bool msg) if (pl) ChatHandler(pl).PSendSysMessage("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...",spellInfo->Id,spellInfo->Reagent[j]); else - sLog.outErrorDb("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...",spellInfo->Id,spellInfo->Reagent[j]); + sLog->outErrorDb("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...",spellInfo->Id,spellInfo->Reagent[j]); } return false; } @@ -2448,8 +2448,8 @@ void SpellMgr::LoadSpellAreas() if (!result) { - sLog.outString(">> Loaded 0 spell area requirements. DB table `spell_area` is empty."); - sLog.outString(); + sLog->outString(">> Loaded 0 spell area requirements. DB table `spell_area` is empty."); + sLog->outString(); return; } @@ -2479,7 +2479,7 @@ void SpellMgr::LoadSpellAreas() } else { - sLog.outErrorDb("Spell %u listed in `spell_area` does not exist", spell); + sLog->outErrorDb("Spell %u listed in `spell_area` does not exist", spell); continue; } @@ -2508,20 +2508,20 @@ void SpellMgr::LoadSpellAreas() if (!ok) { - sLog.outErrorDb("Spell %u listed in `spell_area` already listed with similar requirements.", spell); + sLog->outErrorDb("Spell %u listed in `spell_area` already listed with similar requirements.", spell); continue; } } if (spellArea.areaId && !GetAreaEntryByAreaID(spellArea.areaId)) { - sLog.outErrorDb("Spell %u listed in `spell_area` have wrong area (%u) requirement", spell,spellArea.areaId); + sLog->outErrorDb("Spell %u listed in `spell_area` have wrong area (%u) requirement", spell,spellArea.areaId); continue; } if (spellArea.questStart && !sObjectMgr->GetQuestTemplate(spellArea.questStart)) { - sLog.outErrorDb("Spell %u listed in `spell_area` have wrong start quest (%u) requirement", spell,spellArea.questStart); + sLog->outErrorDb("Spell %u listed in `spell_area` have wrong start quest (%u) requirement", spell,spellArea.questStart); continue; } @@ -2529,13 +2529,13 @@ void SpellMgr::LoadSpellAreas() { if (!sObjectMgr->GetQuestTemplate(spellArea.questEnd)) { - sLog.outErrorDb("Spell %u listed in `spell_area` have wrong end quest (%u) requirement", spell,spellArea.questEnd); + sLog->outErrorDb("Spell %u listed in `spell_area` have wrong end quest (%u) requirement", spell,spellArea.questEnd); continue; } if (spellArea.questEnd == spellArea.questStart && !spellArea.questStartCanActive) { - sLog.outErrorDb("Spell %u listed in `spell_area` have quest (%u) requirement for start and end in same time", spell,spellArea.questEnd); + sLog->outErrorDb("Spell %u listed in `spell_area` have quest (%u) requirement for start and end in same time", spell,spellArea.questEnd); continue; } } @@ -2545,13 +2545,13 @@ void SpellMgr::LoadSpellAreas() SpellEntry const* spellInfo = sSpellStore.LookupEntry(abs(spellArea.auraSpell)); if (!spellInfo) { - sLog.outErrorDb("Spell %u listed in `spell_area` have wrong aura spell (%u) requirement", spell,abs(spellArea.auraSpell)); + sLog->outErrorDb("Spell %u listed in `spell_area` have wrong aura spell (%u) requirement", spell,abs(spellArea.auraSpell)); continue; } if (uint32(abs(spellArea.auraSpell)) == spellArea.spellId) { - sLog.outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell,abs(spellArea.auraSpell)); + sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell,abs(spellArea.auraSpell)); continue; } @@ -2571,7 +2571,7 @@ void SpellMgr::LoadSpellAreas() if (chain) { - sLog.outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell,spellArea.auraSpell); + sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell,spellArea.auraSpell); continue; } @@ -2587,7 +2587,7 @@ void SpellMgr::LoadSpellAreas() if (chain) { - sLog.outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell,spellArea.auraSpell); + sLog->outErrorDb("Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell,spellArea.auraSpell); continue; } } @@ -2595,13 +2595,13 @@ void SpellMgr::LoadSpellAreas() if (spellArea.raceMask && (spellArea.raceMask & RACEMASK_ALL_PLAYABLE) == 0) { - sLog.outErrorDb("Spell %u listed in `spell_area` have wrong race mask (%u) requirement", spell,spellArea.raceMask); + sLog->outErrorDb("Spell %u listed in `spell_area` have wrong race mask (%u) requirement", spell,spellArea.raceMask); continue; } if (spellArea.gender != GENDER_NONE && spellArea.gender != GENDER_FEMALE && spellArea.gender != GENDER_MALE) { - sLog.outErrorDb("Spell %u listed in `spell_area` have wrong gender (%u) requirement", spell, spellArea.gender); + sLog->outErrorDb("Spell %u listed in `spell_area` have wrong gender (%u) requirement", spell, spellArea.gender); continue; } @@ -2631,8 +2631,8 @@ void SpellMgr::LoadSpellAreas() ++count; } while (result->NextRow()); - sLog.outString(">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } SpellCastResult SpellMgr::GetSpellAllowedInLocationError(SpellEntry const *spellInfo, uint32 map_id, uint32 zone_id, uint32 area_id, Player const* player) @@ -2786,8 +2786,8 @@ void SpellMgr::LoadSkillLineAbilityMap() ++count; } - sLog.outString(">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto, bool triggered) @@ -3215,8 +3215,8 @@ void SpellMgr::LoadSpellEnchantProcData() { - sLog.outString(">> Loaded %u spell enchant proc event conditions", count); - sLog.outString(); + sLog->outString(">> Loaded %u spell enchant proc event conditions", count); + sLog->outString(); return; } @@ -3230,7 +3230,7 @@ void SpellMgr::LoadSpellEnchantProcData() SpellItemEnchantmentEntry const *ench = sSpellItemEnchantmentStore.LookupEntry(enchantId); if (!ench) { - sLog.outErrorDb("Enchancment %u listed in `spell_enchant_proc_data` does not exist", enchantId); + sLog->outErrorDb("Enchancment %u listed in `spell_enchant_proc_data` does not exist", enchantId); continue; } @@ -3245,8 +3245,8 @@ void SpellMgr::LoadSpellEnchantProcData() ++count; } while (result->NextRow()); - sLog.outString(">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } void SpellMgr::LoadSpellRequired() @@ -3261,9 +3261,9 @@ void SpellMgr::LoadSpellRequired() if (!result) { - sLog.outString(">> Loaded 0 spell required records"); - sLog.outString(); - sLog.outErrorDb("`spell_required` table is empty!"); + sLog->outString(">> Loaded 0 spell required records"); + sLog->outString(); + sLog->outErrorDb("`spell_required` table is empty!"); return; } uint32 rows = 0; @@ -3278,23 +3278,23 @@ void SpellMgr::LoadSpellRequired() SpellEntry const * spell = sSpellStore.LookupEntry(spell_id); if (!spell) { - sLog.outErrorDb("spell_id %u in `spell_required` table is not found in dbcs, skipped", spell_id); + sLog->outErrorDb("spell_id %u in `spell_required` table is not found in dbcs, skipped", spell_id); continue; } SpellEntry const * req_spell = sSpellStore.LookupEntry(spell_req); if (!req_spell) { - sLog.outErrorDb("req_spell %u in `spell_required` table is not found in dbcs, skipped", spell_req); + sLog->outErrorDb("req_spell %u in `spell_required` table is not found in dbcs, skipped", spell_req); continue; } if (GetFirstSpellInChain(spell_id) == GetFirstSpellInChain(spell_req)) { - sLog.outErrorDb("req_spell %u and spell_id %u in `spell_required` table are ranks of the same spell, entry not needed, skipped", spell_req, spell_id); + sLog->outErrorDb("req_spell %u and spell_id %u in `spell_required` table are ranks of the same spell, entry not needed, skipped", spell_req, spell_id); continue; } if (IsSpellRequiringSpell(spell_id, spell_req)) { - sLog.outErrorDb("duplicated entry of req_spell %u and spell_id %u in `spell_required`, skipped", spell_req, spell_id); + sLog->outErrorDb("duplicated entry of req_spell %u and spell_id %u in `spell_required`, skipped", spell_req, spell_id); continue; } @@ -3303,8 +3303,8 @@ void SpellMgr::LoadSpellRequired() ++rows; } while (result->NextRow()); - sLog.outString(">> Loaded %u spell required records in %u ms", rows, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u spell required records in %u ms", rows, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } void SpellMgr::LoadSpellRanks() @@ -3318,9 +3318,9 @@ void SpellMgr::LoadSpellRanks() if (!result) { - sLog.outString(">> Loaded 0 spell rank records"); - sLog.outString(); - sLog.outErrorDb("`spell_ranks` table is empty!"); + sLog->outString(">> Loaded 0 spell rank records"); + sLog->outString(); + sLog->outErrorDb("`spell_ranks` table is empty!"); return; } @@ -3360,13 +3360,13 @@ void SpellMgr::LoadSpellRanks() SpellEntry const * first = sSpellStore.LookupEntry(lastSpell); if (!first) { - sLog.outErrorDb("Spell rank identifier(first_spell_id) %u listed in `spell_ranks` does not exist!", lastSpell); + sLog->outErrorDb("Spell rank identifier(first_spell_id) %u listed in `spell_ranks` does not exist!", lastSpell); continue; } // check if chain is long enough if (rankChain.size() < 2) { - sLog.outErrorDb("There is only 1 spell rank for identifier(first_spell_id) %u in `spell_ranks`, entry is not needed!", lastSpell); + sLog->outErrorDb("There is only 1 spell rank for identifier(first_spell_id) %u in `spell_ranks`, entry is not needed!", lastSpell); continue; } int32 curRank = 0; @@ -3377,14 +3377,14 @@ void SpellMgr::LoadSpellRanks() SpellEntry const * spell = sSpellStore.LookupEntry(itr->first); if (!spell) { - sLog.outErrorDb("Spell %u (rank %u) listed in `spell_ranks` for chain %u does not exist!", itr->first, itr->second, lastSpell); + sLog->outErrorDb("Spell %u (rank %u) listed in `spell_ranks` for chain %u does not exist!", itr->first, itr->second, lastSpell); valid = false; break; } ++curRank; if (itr->second != curRank) { - sLog.outErrorDb("Spell %u (rank %u) listed in `spell_ranks` for chain %u does not have proper rank value(should be %u)!", itr->first, itr->second, lastSpell, curRank); + sLog->outErrorDb("Spell %u (rank %u) listed in `spell_ranks` for chain %u does not have proper rank value(should be %u)!", itr->first, itr->second, lastSpell, curRank); valid = false; break; } @@ -3415,8 +3415,8 @@ void SpellMgr::LoadSpellRanks() while (true); } while (!finished); - sLog.outString(">> Loaded %u spell rank records in %u ms", rows, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u spell rank records in %u ms", rows, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } // set data in core for now @@ -4007,8 +4007,8 @@ void SpellMgr::LoadSpellCustomAttr() CreatureAI::FillAISpellInfo(); - sLog.outString(">> Loaded %u custom spell attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u custom spell attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } // Fill custom data about enchancments @@ -4051,8 +4051,8 @@ void SpellMgr::LoadEnchantCustomAttr() } } - sLog.outString(">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } void SpellMgr::LoadSpellLinked() @@ -4065,8 +4065,8 @@ void SpellMgr::LoadSpellLinked() QueryResult result = WorldDatabase.Query("SELECT spell_trigger, spell_effect, type FROM spell_linked_spell"); if (!result) { - sLog.outString(">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty."); - sLog.outString(); + sLog->outString(">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty."); + sLog->outString(); return; } @@ -4084,13 +4084,13 @@ void SpellMgr::LoadSpellLinked() SpellEntry const* spellInfo = sSpellStore.LookupEntry(abs(trigger)); if (!spellInfo) { - sLog.outErrorDb("Spell %u listed in `spell_linked_spell` does not exist", abs(trigger)); + sLog->outErrorDb("Spell %u listed in `spell_linked_spell` does not exist", abs(trigger)); continue; } spellInfo = sSpellStore.LookupEntry(abs(effect)); if (!spellInfo) { - sLog.outErrorDb("Spell %u listed in `spell_linked_spell` does not exist", abs(effect)); + sLog->outErrorDb("Spell %u listed in `spell_linked_spell` does not exist", abs(effect)); continue; } @@ -4120,6 +4120,6 @@ void SpellMgr::LoadSpellLinked() ++count; } while (result->NextRow()); - sLog.outString(">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); - sLog.outString(); + sLog->outString(">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime)); + sLog->outString(); } diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h index 27741b82080..fa618657202 100755 --- a/src/server/game/Spells/SpellMgr.h +++ b/src/server/game/Spells/SpellMgr.h @@ -1070,7 +1070,7 @@ class SpellMgr uint32 mode = uint32(Caster->GetMap()->GetSpawnMode()); if (mode >= MAX_DIFFICULTY) { - sLog.outError("GetSpellForDifficultyFromSpell: Incorrect Difficulty for spell %u.", spell->Id); + sLog->outError("GetSpellForDifficultyFromSpell: Incorrect Difficulty for spell %u.", spell->Id); return spell;//return source spell } uint32 SpellDiffId = GetSpellDifficultyId(spell->Id); @@ -1080,27 +1080,27 @@ class SpellMgr SpellDifficultyEntry const *SpellDiff = sSpellDifficultyStore.LookupEntry(SpellDiffId); if (!SpellDiff) { - sLog.outDebug("GetSpellForDifficultyFromSpell: SpellDifficultyEntry not found for spell %u. This Should never happen.", spell->Id); + sLog->outDebug("GetSpellForDifficultyFromSpell: SpellDifficultyEntry not found for spell %u. This Should never happen.", spell->Id); return spell;//return source spell } if (SpellDiff->SpellID[mode] <= 0 && mode > DUNGEON_DIFFICULTY_HEROIC) { uint8 baseMode = mode; mode -= 2; - sLog.outDebug("GetSpellForDifficultyFromSpell: spell %u mode %u spell is NULL, using mode %u", spell->Id, baseMode, mode); + sLog->outDebug("GetSpellForDifficultyFromSpell: spell %u mode %u spell is NULL, using mode %u", spell->Id, baseMode, mode); } if (SpellDiff->SpellID[mode] <= 0) { - sLog.outErrorDb("GetSpellForDifficultyFromSpell: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spell->Id, mode); + sLog->outErrorDb("GetSpellForDifficultyFromSpell: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spell->Id, mode); return spell; } SpellEntry const* newSpell = sSpellStore.LookupEntry(SpellDiff->SpellID[mode]); if (!newSpell) { - sLog.outDebug("GetSpellForDifficultyFromSpell: spell %u not found in SpellStore. Check spelldifficulty_dbc!", SpellDiff->SpellID[mode]); + sLog->outDebug("GetSpellForDifficultyFromSpell: spell %u not found in SpellStore. Check spelldifficulty_dbc!", SpellDiff->SpellID[mode]); return spell; } - sLog.outDebug("GetSpellForDifficultyFromSpell: spellid for spell %u in mode %u is %u ", spell->Id, mode, newSpell->Id); + sLog->outDebug("GetSpellForDifficultyFromSpell: spellid for spell %u in mode %u is %u ", spell->Id, mode, newSpell->Id); return newSpell; } diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index baaeaa3c1fc..ade0c63b2b8 100755 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -24,7 +24,7 @@ bool _SpellScript::_Validate(SpellEntry const * entry) { if (!Validate(entry)) { - sLog.outError("TSCR: Spell `%u` did not pass Validate() function of script `%s` - script will be not added to the spell", entry->Id, m_scriptName->c_str()); + sLog->outError("TSCR: Spell `%u` did not pass Validate() function of script `%s` - script will be not added to the spell", entry->Id, m_scriptName->c_str()); return false; } return true; @@ -183,7 +183,7 @@ bool SpellScript::_Validate(SpellEntry const * entry) { if (!(*itr).GetAffectedEffectsMask(entry)) { - sLog.outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); } } return _SpellScript::_Validate(entry); @@ -255,7 +255,7 @@ Unit * SpellScript::GetHitUnit() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->unitTarget; @@ -265,7 +265,7 @@ Creature * SpellScript::GetHitCreature() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } if (m_spell->unitTarget) @@ -278,7 +278,7 @@ Player * SpellScript::GetHitPlayer() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } if (m_spell->unitTarget) @@ -291,7 +291,7 @@ Item * SpellScript::GetHitItem() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->itemTarget; @@ -301,7 +301,7 @@ GameObject * SpellScript::GetHitGObj() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->gameObjTarget; @@ -311,7 +311,7 @@ int32 SpellScript::GetHitDamage() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->m_damage; @@ -321,7 +321,7 @@ void SpellScript::SetHitDamage(int32 damage) { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return; } m_spell->m_damage = damage; @@ -331,7 +331,7 @@ int32 SpellScript::GetHitHeal() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } return m_spell->m_healing; @@ -341,7 +341,7 @@ void SpellScript::SetHitHeal(int32 heal) { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return; } m_spell->m_healing = heal; @@ -351,7 +351,7 @@ Aura* SpellScript::GetHitAura() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return NULL; } if (!m_spell->m_spellAura) @@ -365,7 +365,7 @@ void SpellScript::PreventHitAura() { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return; } if (m_spell->m_spellAura) @@ -376,7 +376,7 @@ void SpellScript::PreventHitEffect(SpellEffIndex effIndex) { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return; } m_hitPreventEffectMask |= 1 << effIndex; @@ -387,7 +387,7 @@ void SpellScript::PreventHitDefaultEffect(SpellEffIndex effIndex) { if (!IsInHitPhase()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return; } m_hitPreventDefaultEffectMask |= 1 << effIndex; @@ -397,7 +397,7 @@ int32 SpellScript::GetEffectValue() { if (!IsInEffectHook()) { - sLog.outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called while spell not in hit phase!", m_scriptName->c_str(), m_scriptSpellId); return 0; } return m_spell->damage; @@ -417,31 +417,31 @@ bool AuraScript::_Validate(SpellEntry const * entry) { for (std::list::iterator itr = OnEffectApply.begin(); itr != OnEffectApply.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog.outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectRemove.begin(); itr != OnEffectRemove.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog.outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectPeriodic.begin(); itr != OnEffectPeriodic.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog.outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectUpdatePeriodic.begin(); itr != OnEffectUpdatePeriodic.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog.outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectCalcAmount.begin(); itr != OnEffectCalcAmount.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog.outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectCalcPeriodic.begin(); itr != OnEffectCalcPeriodic.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog.outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); for (std::list::iterator itr = OnEffectCalcSpellMod.begin(); itr != OnEffectCalcSpellMod.end(); ++itr) if (!(*itr).GetAffectedEffectsMask(entry)) - sLog.outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); + sLog->outError("TSCR: Spell `%u` Effect `%s` of script`%s` did not match dbc effect data - bound handler won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str()); return _SpellScript::_Validate(entry); } @@ -583,7 +583,7 @@ void AuraScript::PreventDefaultAction() m_defaultActionPrevented = true; break; default: - sLog.outError("TSCR: Script: `%s` Spell: `%u` AuraScript::PreventDefaultAction called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId); + sLog->outError("TSCR: Script: `%s` Spell: `%u` AuraScript::PreventDefaultAction called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId); break; } } -- cgit v1.2.3