mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-05 03:53:48 +00:00
feat(Core/Logging): rework logging (#4692)
* feat(Core/Logging): rework logging * correct level for sql.sql * del unused config options * Correct build * correct after merge * whitespace 20:29:37 1. 'Player.cpp'. Replace (1) 20:29:37 2. 'ObjectMgr.cpp'. Replace (3) * 1 * correct logging * correct affter merge * 1 * 2 * LOG_LEVEL_WARN * #include "AppenderDB.h" * 3 * 4 * 5 * 1. 'WorldSocket.cpp'. Replace (1) * 6 * 1
This commit is contained in:
@@ -944,7 +944,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());
|
||||
LOG_ERROR("server", "Aura %d structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1880,7 +1880,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
case FORM_SPIRITOFREDEMPTION: // 0x20
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Auras: Unknown Shapeshift Type: %u", GetMiscValue());
|
||||
LOG_ERROR("server", "Auras: Unknown Shapeshift Type: %u", GetMiscValue());
|
||||
}
|
||||
|
||||
modelid = target->GetModelForForm(form);
|
||||
@@ -2264,7 +2264,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());
|
||||
LOG_ERROR("server", "Auras: unknown creature id = %d (only need its modelid) From Spell Aura Transform in Spell ID = %d", GetMiscValue(), GetId());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2822,7 +2822,7 @@ void AuraEffect::HandleAuraMounted(AuraApplication const* aurApp, uint8 mode, bo
|
||||
CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(creatureEntry);
|
||||
if (!ci)
|
||||
{
|
||||
sLog->outErrorDb("AuraMounted: `creature_template`='%u' not found in database (only need its modelid)", GetMiscValue());
|
||||
LOG_ERROR("sql.sql", "AuraMounted: `creature_template`='%u' not found in database (only need its modelid)", GetMiscValue());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3960,7 +3960,7 @@ void AuraEffect::HandleAuraModStat(AuraApplication const* aurApp, uint8 mode, bo
|
||||
|
||||
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());
|
||||
LOG_ERROR("server", "WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3986,7 +3986,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");
|
||||
LOG_ERROR("server", "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4084,7 +4084,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");
|
||||
LOG_ERROR("server", "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4147,7 +4147,7 @@ void AuraEffect::HandleAuraModResistenceOfStatPercent(AuraApplication const* aur
|
||||
{
|
||||
// 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!");
|
||||
LOG_ERROR("server", "Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6097,7 +6097,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
||||
|
||||
triggerCaster->CastSpell(targets, triggeredSpellInfo, nullptr, triggerFlags, nullptr, this);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -6123,7 +6123,7 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
|
||||
|
||||
triggerCaster->CastSpell(targets, triggeredSpellInfo, &values, TRIGGERED_FULL_MASK, nullptr, this);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -6135,7 +6135,7 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
|
||||
sEluna->OnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()), target->ToCreature());
|
||||
#endif
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u has non-existent spell %u in EffectTriggered[%d] and is therefor not triggered.", GetId(), triggerSpellId, GetEffIndex());
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u has non-existent spell %u in EffectTriggered[%d] and is therefor not triggered.", GetId(), triggerSpellId, GetEffIndex());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -6255,7 +6255,7 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
|
||||
Unit::CalcAbsorbResist(caster, target, GetSpellInfo()->GetSchoolMask(), DOT, damage, &absorb, &resist, GetSpellInfo());
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDetail("PeriodicTick: %u (TypeId: %u) attacked %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
|
||||
LOG_DEBUG("server", "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);
|
||||
#endif
|
||||
Unit::DealDamageMods(target, damage, &absorb);
|
||||
@@ -6351,7 +6351,7 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c
|
||||
damage = target->GetHealth();
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDetail("PeriodicTick: %u (TypeId: %u) health leech of %u (TypeId: %u) for %u dmg inflicted by %u abs is %u",
|
||||
LOG_DEBUG("server", "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);
|
||||
#endif
|
||||
if (caster)
|
||||
@@ -6395,7 +6395,7 @@ void AuraEffect::HandlePeriodicHealthFunnelAuraTick(Unit* target, Unit* caster)
|
||||
|
||||
caster->ModifyHealth(-(int32)damage);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "PeriodicTick: donator %u target %u damage %u.", caster->GetEntry(), target->GetEntry(), damage);
|
||||
LOG_DEBUG("spells.aura", "PeriodicTick: donator %u target %u damage %u.", caster->GetEntry(), target->GetEntry(), damage);
|
||||
#endif
|
||||
|
||||
float gainMultiplier = GetSpellInfo()->Effects[GetEffIndex()].CalcValueMultiplier(caster);
|
||||
@@ -6498,7 +6498,7 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
|
||||
damage = Unit::SpellCriticalHealingBonus(caster, GetSpellInfo(), damage, target);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDetail("PeriodicTick: %u (TypeId: %u) heal of %u (TypeId: %u) for %u health inflicted by %u",
|
||||
LOG_DEBUG("server", "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());
|
||||
#endif
|
||||
uint32 absorb = 0;
|
||||
@@ -6578,7 +6578,7 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDetail("PeriodicTick: %u (TypeId: %u) power leech of %u (TypeId: %u) for %u dmg inflicted by %u",
|
||||
LOG_DEBUG("server", "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(), drainAmount, GetId());
|
||||
#endif
|
||||
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
|
||||
@@ -6645,7 +6645,7 @@ void AuraEffect::HandleObsModPowerAuraTick(Unit* target, Unit* caster) const
|
||||
// ignore negative values (can be result apply spellmods to aura damage
|
||||
uint32 amount = std::max(m_amount, 0) * target->GetMaxPower(PowerType) / 100;
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
|
||||
LOG_DEBUG("server", "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());
|
||||
#endif
|
||||
SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f, false);
|
||||
@@ -6684,7 +6684,7 @@ void AuraEffect::HandlePeriodicEnergizeAuraTick(Unit* target, Unit* caster) cons
|
||||
target->SendPeriodicAuraLog(&pInfo);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDetail("PeriodicTick: %u (TypeId: %u) energize %u (TypeId: %u) for %u dmg inflicted by %u",
|
||||
LOG_DEBUG("server", "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());
|
||||
#endif
|
||||
int32 gain = target->ModifyPower(PowerType, amount);
|
||||
@@ -6747,14 +6747,14 @@ void AuraEffect::HandleProcTriggerSpellAuraProc(AuraApplication* aurApp, ProcEve
|
||||
if (SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(triggerSpellId))
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerSpellAuraProc: Triggering spell %u from aura %u proc", triggeredSpellInfo->Id, GetId());
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleProcTriggerSpellAuraProc: Triggering spell %u from aura %u proc", triggeredSpellInfo->Id, GetId());
|
||||
#endif
|
||||
triggerCaster->CastSpell(triggerTarget, triggeredSpellInfo, true, nullptr, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerSpellAuraProc: Could not trigger spell %u from aura %u proc, because the spell does not have an entry in Spell.dbc.", triggerSpellId, GetId());
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleProcTriggerSpellAuraProc: Could not trigger spell %u from aura %u proc, because the spell does not have an entry in Spell.dbc.", triggerSpellId, GetId());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -6772,14 +6772,14 @@ void AuraEffect::HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp
|
||||
|
||||
int32 basepoints0 = GetAmount();
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Triggering spell %u with value %d from aura %u proc", triggeredSpellInfo->Id, basepoints0, GetId());
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Triggering spell %u with value %d from aura %u proc", triggeredSpellInfo->Id, basepoints0, GetId());
|
||||
#endif
|
||||
triggerCaster->CastCustomSpell(triggerTarget, triggerSpellId, &basepoints0, nullptr, nullptr, true, nullptr, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Could not trigger spell %u from aura %u proc, because the spell does not have an entry in Spell.dbc.", triggerSpellId, GetId());
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleProcTriggerSpellWithValueAuraProc: Could not trigger spell %u from aura %u proc, because the spell does not have an entry in Spell.dbc.", triggerSpellId, GetId());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -6795,7 +6795,7 @@ void AuraEffect::HandleProcTriggerDamageAuraProc(AuraApplication* aurApp, ProcEv
|
||||
Unit::DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb);
|
||||
target->SendSpellNonMeleeDamageLog(&damageInfo);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleProcTriggerDamageAuraProc: Triggering %u spell damage from aura %u proc", damage, GetId());
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleProcTriggerDamageAuraProc: Triggering %u spell damage from aura %u proc", damage, GetId());
|
||||
#endif
|
||||
target->DealSpellDamage(&damageInfo, true);
|
||||
}
|
||||
@@ -6819,7 +6819,7 @@ void AuraEffect::HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcE
|
||||
break;
|
||||
default:
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleRaidProcFromChargeAuraProc: received not handled spell: %u", GetId());
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleRaidProcFromChargeAuraProc: received not handled spell: %u", GetId());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -6847,7 +6847,7 @@ void AuraEffect::HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcE
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleRaidProcFromChargeAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleRaidProcFromChargeAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
|
||||
#endif
|
||||
target->CastSpell(target, triggerSpellId, true, nullptr, this, GetCasterGUID());
|
||||
}
|
||||
@@ -6860,7 +6860,7 @@ void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurA
|
||||
if (!(GetSpellInfo()->SpellFamilyName == SPELLFAMILY_PRIEST && GetSpellInfo()->SpellFamilyFlags[1] & 0x20))
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: received not handled spell: %u", GetId());
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: received not handled spell: %u", GetId());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -6891,7 +6891,7 @@ void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurA
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
|
||||
#endif
|
||||
target->CastCustomSpell(target, triggerSpellId, &value, nullptr, nullptr, true, nullptr, this, GetCasterGUID());
|
||||
}
|
||||
|
||||
@@ -66,13 +66,13 @@ AuraApplication::AuraApplication(Unit* target, Unit* caster, Aura* aura, uint8 e
|
||||
GetTarget()->SetVisibleAura(slot, this);
|
||||
SetNeedClientUpdate();
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot);
|
||||
LOG_DEBUG("spells.aura", "Aura: %u Effect: %d put to unit visible auras slot: %u", GetBase()->GetId(), GetEffectMask(), slot);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outError("Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
|
||||
LOG_ERROR("server", "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,7 @@ void AuraApplication::_HandleEffect(uint8 effIndex, bool apply)
|
||||
ASSERT(HasEffect(effIndex) == (!apply));
|
||||
ASSERT((1 << effIndex) & _effectsToApply);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount());
|
||||
LOG_DEBUG("spells.aura", "AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount());
|
||||
#endif
|
||||
|
||||
if (apply)
|
||||
@@ -504,7 +504,7 @@ void Aura::_UnapplyForTarget(Unit* target, Unit* caster, AuraApplication* auraAp
|
||||
// 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!",
|
||||
LOG_ERROR("server", "Aura::_UnapplyForTarget, target:%u, caster:%u, spell:%u was not found in owners application map!",
|
||||
target->GetGUIDLow(), caster ? caster->GetGUIDLow() : 0, auraApp->GetBase()->GetSpellInfo()->Id);
|
||||
ABORT();
|
||||
}
|
||||
@@ -670,7 +670,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
|
||||
if (!GetOwner()->IsSelfOrInSameMap(itr->first))
|
||||
{
|
||||
//TODO: There is a crash caused by shadowfiend load addon
|
||||
sLog->outCrash("Aura %u: Owner %s (map %u) is not in the same map as target %s (map %u).", GetSpellInfo()->Id,
|
||||
LOG_FATAL("server", "Aura %u: Owner %s (map %u) is not in the same map as target %s (map %u).", GetSpellInfo()->Id,
|
||||
GetOwner()->GetName().c_str(), GetOwner()->IsInWorld() ? GetOwner()->GetMap()->GetId() : uint32(-1),
|
||||
itr->first->GetName().c_str(), itr->first->IsInWorld() ? itr->first->GetMap()->GetId() : uint32(-1));
|
||||
ABORT();
|
||||
@@ -1112,7 +1112,7 @@ void Aura::UnregisterSingleTarget()
|
||||
caster = ObjectAccessor::GetObjectInOrOutOfWorld(GetCasterGUID(), (Unit*)nullptr);
|
||||
if (!caster)
|
||||
{
|
||||
sLog->outMisc("Aura::UnregisterSingleTarget (A1) - %u, %u, %u, %s", GetId(), GetOwner()->GetTypeId(), GetOwner()->GetEntry(), GetOwner()->GetName().c_str());
|
||||
LOG_INFO("misc", "Aura::UnregisterSingleTarget (A1) - %u, %u, %u, %s", GetId(), GetOwner()->GetTypeId(), GetOwner()->GetEntry(), GetOwner()->GetName().c_str());
|
||||
//ASSERT(caster);
|
||||
}
|
||||
else
|
||||
@@ -1355,7 +1355,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
spellId = 57531;
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
|
||||
LOG_ERROR("server", "Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
|
||||
}
|
||||
if (spellId)
|
||||
caster->CastSpell(caster, spellId, true);
|
||||
@@ -1480,7 +1480,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
spellId = 50508;
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId());
|
||||
LOG_ERROR("server", "Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId());
|
||||
}
|
||||
caster->CastSpell(target, spellId, true, 0, GetEffect(0));
|
||||
}
|
||||
@@ -1596,7 +1596,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
spellId = 60946;
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
|
||||
LOG_ERROR("server", "Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
|
||||
}
|
||||
if (spellId)
|
||||
caster->CastSpell(target, spellId, true);
|
||||
@@ -2232,7 +2232,7 @@ void Aura::LoadScripts()
|
||||
continue;
|
||||
}
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Aura::LoadScripts: Script `%s` for aura `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
|
||||
LOG_DEBUG("spells.aura", "Aura::LoadScripts: Script `%s` for aura `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
|
||||
#endif
|
||||
(*itr)->Register();
|
||||
++itr;
|
||||
|
||||
@@ -511,23 +511,23 @@ void SpellCastTargets::Update(Unit* caster)
|
||||
void SpellCastTargets::OutDebug() const
|
||||
{
|
||||
if (!m_targetMask)
|
||||
sLog->outString("No targets");
|
||||
LOG_INFO("server", "No targets");
|
||||
|
||||
sLog->outString("target mask: %u", m_targetMask);
|
||||
LOG_INFO("server", "target mask: %u", m_targetMask);
|
||||
if (m_targetMask & (TARGET_FLAG_UNIT_MASK | TARGET_FLAG_CORPSE_MASK | TARGET_FLAG_GAMEOBJECT_MASK))
|
||||
sLog->outString("Object target: " UI64FMTD, m_objectTargetGUID);
|
||||
LOG_INFO("server", "Object target: " UI64FMTD, m_objectTargetGUID);
|
||||
if (m_targetMask & TARGET_FLAG_ITEM)
|
||||
sLog->outString("Item target: " UI64FMTD, m_itemTargetGUID);
|
||||
LOG_INFO("server", "Item target: " UI64FMTD, m_itemTargetGUID);
|
||||
if (m_targetMask & TARGET_FLAG_TRADE_ITEM)
|
||||
sLog->outString("Trade item target: " UI64FMTD, m_itemTargetGUID);
|
||||
LOG_INFO("server", "Trade item target: " UI64FMTD, m_itemTargetGUID);
|
||||
if (m_targetMask & TARGET_FLAG_SOURCE_LOCATION)
|
||||
sLog->outString("Source location: transport guid:" UI64FMTD " trans offset: %s position: %s", m_src._transportGUID, m_src._transportOffset.ToString().c_str(), m_src._position.ToString().c_str());
|
||||
LOG_INFO("server", "Source location: transport guid:" UI64FMTD " trans offset: %s position: %s", m_src._transportGUID, m_src._transportOffset.ToString().c_str(), m_src._position.ToString().c_str());
|
||||
if (m_targetMask & TARGET_FLAG_DEST_LOCATION)
|
||||
sLog->outString("Destination location: transport guid:" UI64FMTD " trans offset: %s position: %s", m_dst._transportGUID, m_dst._transportOffset.ToString().c_str(), m_dst._position.ToString().c_str());
|
||||
LOG_INFO("server", "Destination location: transport guid:" UI64FMTD " trans offset: %s position: %s", m_dst._transportGUID, m_dst._transportOffset.ToString().c_str(), m_dst._position.ToString().c_str());
|
||||
if (m_targetMask & TARGET_FLAG_STRING)
|
||||
sLog->outString("String: %s", m_strTarget.c_str());
|
||||
sLog->outString("speed: %f", m_speed);
|
||||
sLog->outString("elevation: %f", m_elevation);
|
||||
LOG_INFO("server", "String: %s", m_strTarget.c_str());
|
||||
LOG_INFO("server", "speed: %f", m_speed);
|
||||
LOG_INFO("server", "elevation: %f", m_elevation);
|
||||
}
|
||||
|
||||
SpellValue::SpellValue(SpellInfo const* proto)
|
||||
@@ -676,7 +676,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);
|
||||
LOG_ERROR("server", "SPELL: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id);
|
||||
*m_selfContainer = nullptr;
|
||||
}
|
||||
|
||||
@@ -981,7 +981,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
|
||||
break;
|
||||
case TARGET_SELECT_CATEGORY_NYI:
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SPELL: target type %u, found in spellID %u, effect %u is not implemented yet!", m_spellInfo->Id, effIndex, targetType.GetTarget());
|
||||
LOG_DEBUG("spells.aura", "SPELL: target type %u, found in spellID %u, effect %u is not implemented yet!", m_spellInfo->Id, effIndex, targetType.GetTarget());
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
@@ -1014,7 +1014,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SPELL: cannot find channel spell target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
|
||||
LOG_DEBUG("spells.aura", "SPELL: cannot find channel spell target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
@@ -1036,7 +1036,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
|
||||
else //if (!m_targets.HasDst())
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SPELL: cannot find channel spell destination for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
|
||||
LOG_DEBUG("spells.aura", "SPELL: cannot find channel spell destination for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
@@ -1085,7 +1085,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
|
||||
if (targetType.GetCheckType() == TARGET_CHECK_ENTRY && (!condList || condList->empty()))
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::SelectImplicitNearbyTargets: no conditions entry for target with TARGET_CHECK_ENTRY of spell ID %u, effect %u - selecting default targets", m_spellInfo->Id, effIndex);
|
||||
LOG_DEBUG("spells.aura", "Spell::SelectImplicitNearbyTargets: no conditions entry for target with TARGET_CHECK_ENTRY of spell ID %u, effect %u - selecting default targets", m_spellInfo->Id, effIndex);
|
||||
#endif
|
||||
switch (targetType.GetObjectType())
|
||||
{
|
||||
@@ -1114,7 +1114,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
|
||||
if (!target)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::SelectImplicitNearbyTargets: cannot find nearby target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
|
||||
LOG_DEBUG("spells.aura", "Spell::SelectImplicitNearbyTargets: cannot find nearby target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -1319,7 +1319,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id);
|
||||
LOG_DEBUG("spells.aura", "SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id);
|
||||
#endif
|
||||
if (WorldObject* target = m_targets.GetObjectTarget())
|
||||
dest = SpellDestination(*target);
|
||||
@@ -1630,7 +1630,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
|
||||
float a = (srcToDestDelta - dist2d * b) / (dist2d * dist2d);
|
||||
if (a > -0.0001f)
|
||||
a = 0;
|
||||
DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: a %f b %f", a, b);)
|
||||
DEBUG_TRAJ(LOG_ERROR("server", "Spell::SelectTrajTargets: a %f b %f", a, b);)
|
||||
|
||||
// Xinef: hack for distance, many trajectory spells have RangeEntry 1 (self)
|
||||
float bestDist = m_spellInfo->GetMaxRange(false) * 2;
|
||||
@@ -1649,11 +1649,11 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
|
||||
const float objDist2d = fabs(m_targets.GetSrcPos()->GetExactDist2d(*itr) * cos(m_targets.GetSrcPos()->GetRelativeAngle(*itr)));
|
||||
const float dz = fabs((*itr)->GetPositionZ() - m_targets.GetSrcPos()->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(LOG_ERROR("server", "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(LOG_ERROR("server", "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)
|
||||
if (dist < bestDist && height < dz + size && height > dz - size)
|
||||
{
|
||||
bestDist = dist > 0 ? dist : 0;
|
||||
@@ -1661,7 +1661,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
|
||||
}
|
||||
|
||||
#define CHECK_DIST {\
|
||||
DEBUG_TRAJ(sLog->outError("Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\
|
||||
DEBUG_TRAJ(LOG_ERROR("server", "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\
|
||||
if (dist > bestDist)\
|
||||
continue;\
|
||||
if (dist < objDist2d + size && dist > objDist2d - size)\
|
||||
@@ -1737,7 +1737,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
|
||||
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(LOG_ERROR("server", "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
|
||||
if (distSq > sizeSq)
|
||||
{
|
||||
float factor = 1 - sqrt(sizeSq / distSq);
|
||||
@@ -1746,7 +1746,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
|
||||
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(LOG_ERROR("server", "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2983,7 +2983,7 @@ void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask)
|
||||
{
|
||||
m_caster->CastSpell(unit, i->triggeredSpell, true);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->triggeredSpell->Id);
|
||||
LOG_DEBUG("spells.aura", "Spell %d triggered spell %d by SPELL_AURA_ADD_TARGET_TRIGGER aura", m_spellInfo->Id, i->triggeredSpell->Id);
|
||||
#endif
|
||||
|
||||
// SPELL_AURA_ADD_TARGET_TRIGGER auras shouldn't trigger auras without duration
|
||||
@@ -3334,7 +3334,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
||||
ReSetTimer();
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::prepare: spell id %u source %u caster %d customCastFlags %u mask %u", m_spellInfo->Id, m_caster->GetEntry(), m_originalCaster ? m_originalCaster->GetEntry() : -1, _triggeredCastFlags, m_targets.GetTargetMask());
|
||||
LOG_DEBUG("spells.aura", "Spell::prepare: spell id %u source %u caster %d customCastFlags %u mask %u", m_spellInfo->Id, m_caster->GetEntry(), m_originalCaster ? m_originalCaster->GetEntry() : -1, _triggeredCastFlags, m_targets.GetTargetMask());
|
||||
#endif
|
||||
|
||||
//Containers for channeled spells have to be set
|
||||
@@ -3938,7 +3938,7 @@ void Spell::update(uint32 difftime)
|
||||
if (m_targets.GetUnitTargetGUID() && !m_targets.GetUnitTarget())
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell %u is cancelled due to removal of target.", m_spellInfo->Id);
|
||||
LOG_DEBUG("spells.aura", "Spell %u is cancelled due to removal of target.", m_spellInfo->Id);
|
||||
#endif
|
||||
cancel();
|
||||
return;
|
||||
@@ -3998,7 +3998,7 @@ void Spell::update(uint32 difftime)
|
||||
else if ((m_timer < 0 || m_timer > 300) && !UpdateChanneledTargetList())
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Channeled spell %d is removed due to lack of targets", m_spellInfo->Id);
|
||||
LOG_DEBUG("spells.aura", "Channeled spell %d is removed due to lack of targets", m_spellInfo->Id);
|
||||
#endif
|
||||
SendChannelUpdate(0);
|
||||
finish();
|
||||
@@ -4064,7 +4064,7 @@ void Spell::finish(bool ok)
|
||||
if (spellInfo && spellInfo->SpellIconID == 2056)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Statue %d is unsummoned in spell %d finish", m_caster->GetGUIDLow(), m_spellInfo->Id);
|
||||
LOG_DEBUG("spells.aura", "Statue %d is unsummoned in spell %d finish", m_caster->GetGUIDLow(), m_spellInfo->Id);
|
||||
#endif
|
||||
m_caster->setDeathState(JUST_DIED);
|
||||
return;
|
||||
@@ -4275,7 +4275,7 @@ void Spell::SendSpellStart()
|
||||
if (!IsNeedSendToClient(false))
|
||||
return;
|
||||
|
||||
//sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Sending SMSG_SPELL_START id=%u", m_spellInfo->Id);
|
||||
//LOG_DEBUG("spells.aura", "Sending SMSG_SPELL_START id=%u", m_spellInfo->Id);
|
||||
|
||||
uint32 castFlags = CAST_FLAG_UNKNOWN_2;
|
||||
|
||||
@@ -4330,7 +4330,7 @@ void Spell::SendSpellGo()
|
||||
if (!IsNeedSendToClient(true))
|
||||
return;
|
||||
|
||||
//sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id);
|
||||
//LOG_DEBUG("spells.aura", "Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id);
|
||||
|
||||
uint32 castFlags = CAST_FLAG_UNKNOWN_9;
|
||||
|
||||
@@ -4756,7 +4756,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());
|
||||
LOG_ERROR("server", "Cast item has no item prototype highId=%d, lowId=%d", m_CastItem->GetGUIDHigh(), m_CastItem->GetGUIDLow());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4852,7 +4852,7 @@ void Spell::TakePower()
|
||||
|
||||
if (PowerType >= MAX_POWERS)
|
||||
{
|
||||
sLog->outError("Spell::TakePower: Unknown power type '%d'", PowerType);
|
||||
LOG_ERROR("server", "Spell::TakePower: Unknown power type '%d'", PowerType);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5112,7 +5112,7 @@ void Spell::HandleThreatSpells()
|
||||
target->AddThreat(m_caster, threatToAdd, m_spellInfo->GetSchoolMask(), m_spellInfo);
|
||||
}
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell %u, added an additional %f threat for %s %u target(s)", m_spellInfo->Id, threat, m_spellInfo->_IsPositiveSpell() ? "assisting" : "harming", uint32(m_UniqueTargetInfo.size()));
|
||||
LOG_DEBUG("spells.aura", "Spell %u, added an additional %f threat for %s %u target(s)", m_spellInfo->Id, threat, m_spellInfo->_IsPositiveSpell() ? "assisting" : "harming", uint32(m_UniqueTargetInfo.size()));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -5127,7 +5127,7 @@ void Spell::HandleEffects(Unit* pUnitTarget, Item* pItemTarget, GameObject* pGOT
|
||||
uint8 eff = m_spellInfo->Effects[i].Effect;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell: %u Effect : %u", m_spellInfo->Id, eff);
|
||||
LOG_DEBUG("spells.aura", "Spell: %u Effect : %u", m_spellInfo->Id, eff);
|
||||
#endif
|
||||
|
||||
// we do not need DamageMultiplier here.
|
||||
@@ -6516,7 +6516,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);
|
||||
LOG_ERROR("server", "Spell::CheckPower: Unknown power type '%d'", m_spellInfo->PowerType);
|
||||
return SPELL_FAILED_UNKNOWN;
|
||||
}
|
||||
|
||||
@@ -7154,7 +7154,7 @@ void Spell::Delayed() // only called in DealDamage()
|
||||
m_timer += delaytime;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDetail("Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime);
|
||||
LOG_DEBUG("server", "Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime);
|
||||
#endif
|
||||
|
||||
WorldPacket data(SMSG_SPELL_DELAYED, 8 + 4);
|
||||
@@ -7194,7 +7194,7 @@ void Spell::DelayedChannel()
|
||||
m_timer -= delaytime;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer);
|
||||
LOG_DEBUG("spells.aura", "Spell %u partially interrupted for %i ms, new duration: %u ms", m_spellInfo->Id, delaytime, m_timer);
|
||||
#endif
|
||||
|
||||
for (std::list<TargetInfo>::const_iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
@@ -7452,7 +7452,7 @@ SpellEvent::~SpellEvent()
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outError("~SpellEvent: %s %u tried to delete non-deletable spell %u. Was not deleted, causes memory leak.",
|
||||
LOG_ERROR("server", "~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);
|
||||
ABORT();
|
||||
}
|
||||
@@ -7852,7 +7852,7 @@ void Spell::LoadScripts()
|
||||
continue;
|
||||
}
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::LoadScripts: Script `%s` for spell `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
|
||||
LOG_DEBUG("spells.aura", "Spell::LoadScripts: Script `%s` for spell `%u` is loaded now", (*itr)->_GetScriptName()->c_str(), m_spellInfo->Id);
|
||||
#endif
|
||||
(*itr)->Register();
|
||||
++itr;
|
||||
|
||||
@@ -234,7 +234,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS] =
|
||||
void Spell::EffectNULL(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "WORLD: Spell Effect DUMMY");
|
||||
LOG_DEBUG("spells.aura", "WORLD: Spell Effect DUMMY");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -778,7 +778,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
|
||||
// normal DB scripted effect
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex);
|
||||
LOG_DEBUG("spells.aura", "Spell ScriptStart spellid %u in EffectDummy(%u)", m_spellInfo->Id, effIndex);
|
||||
#endif
|
||||
m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget);
|
||||
#ifdef ELUNA
|
||||
@@ -922,7 +922,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
if (!spellInfo)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTriggerSpell spell %u tried to trigger unknown spell %u", m_spellInfo->Id, triggered_spell_id);
|
||||
LOG_DEBUG("spells.aura", "Spell::EffectTriggerSpell spell %u tried to trigger unknown spell %u", m_spellInfo->Id, triggered_spell_id);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -980,7 +980,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex)
|
||||
if (!spellInfo)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTriggerMissileSpell spell %u tried to trigger unknown spell %u", m_spellInfo->Id, triggered_spell_id);
|
||||
LOG_DEBUG("spells.aura", "Spell::EffectTriggerMissileSpell spell %u tried to trigger unknown spell %u", m_spellInfo->Id, triggered_spell_id);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -1037,7 +1037,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex)
|
||||
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outError("Spell::EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
|
||||
LOG_ERROR("server", "Spell::EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1086,7 +1086,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);
|
||||
LOG_ERROR("server", "EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1190,7 +1190,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);
|
||||
LOG_ERROR("server", "Spell::EffectTeleportUnits - does not have destination for spell ID %u\n", m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1203,7 +1203,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
|
||||
if (!orientation && m_targets.GetUnitTarget())
|
||||
orientation = m_targets.GetUnitTarget()->GetOrientation();
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation);
|
||||
LOG_DEBUG("spells.aura", "Spell::EffectTeleportUnits - teleport unit to %u %f %f %f %f\n", mapid, x, y, z, orientation);
|
||||
#endif
|
||||
|
||||
if (mapid == unitTarget->GetMapId())
|
||||
@@ -1222,7 +1222,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
|
||||
unitTarget->ToPlayer()->TeleportTo(mapid, x, y, z, orientation, unitTarget == m_caster ? TELE_TO_SPELL : 0);
|
||||
else
|
||||
{
|
||||
sLog->outError("Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id);
|
||||
LOG_ERROR("server", "Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1358,7 +1358,7 @@ void Spell::EffectUnlearnSpecialization(SpellEffIndex effIndex)
|
||||
|
||||
player->removeSpell(spellToUnlearn, SPEC_MASK_ALL, false);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell: Player %u has unlearned spell %u from NpcGUID: %u", player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow());
|
||||
LOG_DEBUG("spells.aura", "Spell: Player %u has unlearned spell %u from NpcGUID: %u", player->GetGUIDLow(), spellToUnlearn, m_caster->GetGUIDLow());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1432,7 +1432,7 @@ void Spell::EffectSendEvent(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->Effects[effIndex].MiscValue, m_spellInfo->Id);
|
||||
LOG_DEBUG("spells.aura", "Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->Effects[effIndex].MiscValue, m_spellInfo->Id);
|
||||
#endif
|
||||
|
||||
if (ZoneScript* zoneScript = m_caster->GetZoneScript())
|
||||
@@ -1548,7 +1548,7 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/)
|
||||
|
||||
if (!targetAura)
|
||||
{
|
||||
sLog->outError("Target(GUID:" UI64FMTD ") has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID());
|
||||
LOG_ERROR("server", "Target(GUID:" UI64FMTD ") has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1639,7 +1639,7 @@ void Spell::EffectHealthLeech(SpellEffIndex /*effIndex*/)
|
||||
damage = unitTarget->SpellDamageBonusTaken(m_caster, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "HealthLeech :%i", damage);
|
||||
LOG_DEBUG("spells.aura", "HealthLeech :%i", damage);
|
||||
#endif
|
||||
|
||||
// xinef: handled in spell.cpp
|
||||
@@ -2024,7 +2024,7 @@ void Spell::SendLoot(uint64 guid, LootType loottype)
|
||||
if (!gameObjTarget->isSpawned() && !player->IsGameMaster())
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outError("Possible hacking attempt: Player %s [guid: %u] tried to loot a gameobject [entry: %u id: %u] which is on respawn time without being in GM mode!", player->GetName().c_str(), player->GetGUIDLow(), gameObjTarget->GetEntry(), gameObjTarget->GetGUIDLow());
|
||||
LOG_ERROR("server", "Possible hacking attempt: Player %s [guid: %u] tried to loot a gameobject [entry: %u id: %u] which is on respawn time without being in GM mode!", player->GetName().c_str(), player->GetGUIDLow(), gameObjTarget->GetEntry(), gameObjTarget->GetGUIDLow());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -2087,7 +2087,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "WORLD: Open Lock - No Player Caster!");
|
||||
LOG_DEBUG("spells.aura", "WORLD: Open Lock - No Player Caster!");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -2147,7 +2147,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "WORLD: Open Lock - No GameObject/Item Target!");
|
||||
LOG_DEBUG("spells.aura", "WORLD: Open Lock - No GameObject/Item Target!");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -2335,7 +2335,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
|
||||
SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(m_spellInfo->Effects[effIndex].MiscValueB);
|
||||
if (!properties)
|
||||
{
|
||||
sLog->outError("EffectSummonType: Unhandled summon type %u", m_spellInfo->Effects[effIndex].MiscValueB);
|
||||
LOG_ERROR("server", "EffectSummonType: Unhandled summon type %u", m_spellInfo->Effects[effIndex].MiscValueB);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2551,7 +2551,7 @@ void Spell::EffectLearnSpell(SpellEffIndex effIndex)
|
||||
player->learnSpell(spellToLearn);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow());
|
||||
LOG_DEBUG("spells.aura", "Spell: Player %u has learned spell %u from NpcGUID=%u", player->GetGUIDLow(), spellToLearn, m_caster->GetGUIDLow());
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -2796,7 +2796,7 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
unitTarget->ToPlayer()->RewardHonor(nullptr, 1, damage / 10, false);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %u", m_spellInfo->Id, damage / 10, m_CastItem->GetEntry(), unitTarget->ToPlayer()->GetGUIDLow());
|
||||
LOG_DEBUG("spells.aura", "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());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
@@ -2807,7 +2807,7 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
|
||||
uint32 honor_reward = acore::Honor::hk_honor_at_level(unitTarget->getLevel(), float(damage));
|
||||
unitTarget->ToPlayer()->RewardHonor(nullptr, 1, honor_reward, false);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUIDLow());
|
||||
LOG_DEBUG("spells.aura", "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %u", m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUIDLow());
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@@ -2815,7 +2815,7 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
|
||||
//maybe we have correct honor_gain in damage already
|
||||
unitTarget->ToPlayer()->RewardHonor(nullptr, 1, damage, false);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (non scale) for player: %u", m_spellInfo->Id, damage, unitTarget->ToPlayer()->GetGUIDLow());
|
||||
LOG_DEBUG("spells.aura", "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (non scale) for player: %u", m_spellInfo->Id, damage, unitTarget->ToPlayer()->GetGUIDLow());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -2919,7 +2919,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.",
|
||||
LOG_ERROR("server", "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;
|
||||
}
|
||||
@@ -2993,14 +2993,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
|
||||
spell_id = 36760;
|
||||
break; // 20%
|
||||
default:
|
||||
sLog->outError("Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage);
|
||||
LOG_ERROR("server", "Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage);
|
||||
return;
|
||||
}
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outError("Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id);
|
||||
LOG_ERROR("server", "Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3026,14 +3026,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);
|
||||
LOG_ERROR("server", "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);
|
||||
LOG_ERROR("server", "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ", m_spellInfo->Id, effIndex, enchant_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4131,7 +4131,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
spell_heal = 48085;
|
||||
break;
|
||||
default:
|
||||
sLog->outError("Unknown Lightwell spell caster %u", m_caster->GetEntry());
|
||||
LOG_ERROR("server", "Unknown Lightwell spell caster %u", m_caster->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4231,7 +4231,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
|
||||
// normal DB scripted effect
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell ScriptStart spellid %u in EffectScriptEffect(%u)", m_spellInfo->Id, effIndex);
|
||||
LOG_DEBUG("spells.aura", "Spell ScriptStart spellid %u in EffectScriptEffect(%u)", m_spellInfo->Id, effIndex);
|
||||
#endif
|
||||
m_caster->GetMap()->ScriptsStart(sSpellScripts, uint32(m_spellInfo->Id | (effIndex << 24)), m_caster, unitTarget);
|
||||
}
|
||||
@@ -5439,7 +5439,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);
|
||||
LOG_ERROR("sql.sql", "Gameobject (Entry: %u) not exist and not created at spell (ID: %u) cast", name_id, m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5542,7 +5542,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
ExecuteLogEffectSummonObject(effIndex, pGameObj);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outStaticDebug("AddObject at SpellEfects.cpp EffectTransmitted");
|
||||
LOG_DEBUG("server", "AddObject at SpellEfects.cpp EffectTransmitted");
|
||||
#endif
|
||||
//m_caster->AddGameObject(pGameObj);
|
||||
//m_ObjToDel.push_back(pGameObj);
|
||||
@@ -5628,7 +5628,7 @@ void Spell::EffectSkill(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "WORLD: SkillEFFECT");
|
||||
LOG_DEBUG("spells.aura", "WORLD: SkillEFFECT");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -5661,7 +5661,7 @@ void Spell::EffectSkinPlayerCorpse(SpellEffIndex /*effIndex*/)
|
||||
return;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Effect: SkinPlayerCorpse");
|
||||
LOG_DEBUG("spells.aura", "Effect: SkinPlayerCorpse");
|
||||
#endif
|
||||
if ((m_caster->GetTypeId() != TYPEID_PLAYER) || (unitTarget->GetTypeId() != TYPEID_PLAYER) || (unitTarget->IsAlive()))
|
||||
return;
|
||||
@@ -5675,7 +5675,7 @@ void Spell::EffectStealBeneficialBuff(SpellEffIndex effIndex)
|
||||
return;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Effect: StealBeneficialBuff");
|
||||
LOG_DEBUG("spells.aura", "Effect: StealBeneficialBuff");
|
||||
#endif
|
||||
|
||||
if (!unitTarget || unitTarget == m_caster) // can't steal from self
|
||||
@@ -6153,7 +6153,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);
|
||||
LOG_ERROR("server", "EffectPlayMusic: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6206,7 +6206,7 @@ void Spell::EffectPlaySound(SpellEffIndex effIndex)
|
||||
|
||||
if (!sSoundEntriesStore.LookupEntry(soundId))
|
||||
{
|
||||
sLog->outError("EffectPlayerSound: Sound (Id: %u) not exist in spell %u.", soundId, m_spellInfo->Id);
|
||||
LOG_ERROR("server", "EffectPlayerSound: Sound (Id: %u) not exist in spell %u.", soundId, m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6335,7 +6335,7 @@ void Spell::EffectBind(SpellEffIndex effIndex)
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "EffectBind: New homebind X: %f, Y: %f, Z: %f, MapId: %u, AreaId: %u",
|
||||
LOG_DEBUG("spells.aura", "EffectBind: New homebind X: %f, Y: %f, Z: %f, MapId: %u, AreaId: %u",
|
||||
homeLoc.GetPositionX(), homeLoc.GetPositionY(), homeLoc.GetPositionZ(), homeLoc.GetMapId(), areaId);
|
||||
#endif
|
||||
// zone update
|
||||
|
||||
@@ -1419,7 +1419,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
|
||||
shapeInfo = sSpellShapeshiftStore.LookupEntry(form);
|
||||
if (!shapeInfo)
|
||||
{
|
||||
sLog->outError("GetErrorAtShapeshiftedCast: unknown shapeshift %u", form);
|
||||
LOG_ERROR("server", "GetErrorAtShapeshiftedCast: unknown shapeshift %u", form);
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
actAsShifted = !(shapeInfo->flags1 & 1); // shapeshift acts as normal form for spells
|
||||
@@ -2349,7 +2349,7 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, S
|
||||
// Else drain all power
|
||||
if (PowerType < MAX_POWERS)
|
||||
return caster->GetPower(Powers(PowerType));
|
||||
sLog->outError("SpellInfo::CalcPowerCost: Unknown power type '%d' in spell %d", PowerType, Id);
|
||||
LOG_ERROR("server", "SpellInfo::CalcPowerCost: Unknown power type '%d' in spell %d", PowerType, Id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2376,11 +2376,11 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, S
|
||||
case POWER_RUNE:
|
||||
case POWER_RUNIC_POWER:
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "CalculateManaCost: Not implemented yet!");
|
||||
LOG_DEBUG("spells.aura", "CalculateManaCost: Not implemented yet!");
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
sLog->outError("CalculateManaCost: Unknown power type '%d' in spell %d", PowerType, Id);
|
||||
LOG_ERROR("server", "CalculateManaCost: Unknown power type '%d' in spell %d", PowerType, Id);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -384,7 +384,7 @@ bool SpellMgr::ComputeIsSpellValid(SpellInfo const* spellInfo, bool msg)
|
||||
if (!spellInfo->IsLootCrafting())
|
||||
{
|
||||
if (msg)
|
||||
sLog->outErrorDb("Craft spell %u not have create item entry.", spellInfo->Id);
|
||||
LOG_ERROR("sql.sql", "Craft spell %u not have create item entry.", spellInfo->Id);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -392,7 +392,7 @@ bool SpellMgr::ComputeIsSpellValid(SpellInfo const* spellInfo, bool msg)
|
||||
else if (!sObjectMgr->GetItemTemplate(spellInfo->Effects[i].ItemType))
|
||||
{
|
||||
if (msg)
|
||||
sLog->outErrorDb("Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
|
||||
LOG_ERROR("sql.sql", "Craft spell %u create not-exist in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Effects[i].ItemType);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ bool SpellMgr::ComputeIsSpellValid(SpellInfo const* spellInfo, bool msg)
|
||||
if (!ComputeIsSpellValid(spellInfo2, msg))
|
||||
{
|
||||
if (msg)
|
||||
sLog->outErrorDb("Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
|
||||
LOG_ERROR("sql.sql", "Spell %u learn to invalid spell %u, and then...", spellInfo->Id, spellInfo->Effects[i].TriggerSpell);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@@ -420,7 +420,7 @@ bool SpellMgr::ComputeIsSpellValid(SpellInfo const* spellInfo, bool msg)
|
||||
if (spellInfo->Reagent[j] > 0 && !sObjectMgr->GetItemTemplate(spellInfo->Reagent[j]))
|
||||
{
|
||||
if (msg)
|
||||
sLog->outErrorDb("Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
|
||||
LOG_ERROR("sql.sql", "Craft spell %u have not-exist reagent in DB item (Entry: %u) and then...", spellInfo->Id, spellInfo->Reagent[j]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -452,14 +452,14 @@ bool SpellMgr::CheckSpellValid(SpellInfo const* spellInfo, uint32 spellId, bool
|
||||
if (!spellInfo)
|
||||
{
|
||||
DeleteSpellFromAllPlayers(spellId);
|
||||
sLog->outError("Player::%s: Non-existed in SpellStore spell #%u request.", (isTalent ? "AddTalent" : "addSpell"), spellId);
|
||||
LOG_ERROR("server", "Player::%s: Non-existed in SpellStore spell #%u request.", (isTalent ? "AddTalent" : "addSpell"), spellId);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!IsSpellValid(spellInfo))
|
||||
{
|
||||
DeleteSpellFromAllPlayers(spellId);
|
||||
sLog->outError("Player::%s: Broken spell #%u learning not allowed.", (isTalent ? "AddTalent" : "addSpell"), spellId);
|
||||
LOG_ERROR("server", "Player::%s: Broken spell #%u learning not allowed.", (isTalent ? "AddTalent" : "addSpell"), spellId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -488,7 +488,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
|
||||
uint32 mode = uint32(caster->GetMap()->GetSpawnMode());
|
||||
if (mode >= MAX_DIFFICULTY)
|
||||
{
|
||||
sLog->outError("SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId);
|
||||
LOG_ERROR("server", "SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId);
|
||||
return spellId; //return source spell
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
|
||||
if (!difficultyEntry)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: SpellDifficultyEntry not found for spell %u. This should never happen.", spellId);
|
||||
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellIdForDifficulty: SpellDifficultyEntry not found for spell %u. This should never happen.", spellId);
|
||||
#endif
|
||||
return spellId; //return source spell
|
||||
}
|
||||
@@ -508,19 +508,19 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
|
||||
if (difficultyEntry->SpellID[mode] <= 0 && mode > DUNGEON_DIFFICULTY_HEROIC)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is nullptr, using mode %u", spellId, mode, mode - 2);
|
||||
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is nullptr, using mode %u", spellId, mode, mode - 2);
|
||||
#endif
|
||||
mode -= 2;
|
||||
}
|
||||
|
||||
if (difficultyEntry->SpellID[mode] <= 0)
|
||||
{
|
||||
sLog->outErrorDb("SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spellId, mode);
|
||||
LOG_ERROR("sql.sql", "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is 0. Check spelldifficulty_dbc!", spellId, mode);
|
||||
return spellId;
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellIdForDifficulty: spellid for spell %u in mode %u is %d", spellId, mode, difficultyEntry->SpellID[mode]);
|
||||
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellIdForDifficulty: spellid for spell %u in mode %u is %d", spellId, mode, difficultyEntry->SpellID[mode]);
|
||||
#endif
|
||||
return uint32(difficultyEntry->SpellID[mode]);
|
||||
}
|
||||
@@ -532,13 +532,13 @@ SpellInfo const* SpellMgr::GetSpellForDifficultyFromSpell(SpellInfo const* spell
|
||||
if (!newSpell)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellForDifficultyFromSpell: spell %u not found. Check spelldifficulty_dbc!", newSpellId);
|
||||
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellForDifficultyFromSpell: spell %u not found. Check spelldifficulty_dbc!", newSpellId);
|
||||
#endif
|
||||
return spell;
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "SpellMgr::GetSpellForDifficultyFromSpell: Spell id for instance mode is %u (original %u)", newSpell->Id, spell->Id);
|
||||
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellForDifficultyFromSpell: Spell id for instance mode is %u (original %u)", newSpell->Id, spell->Id);
|
||||
#endif
|
||||
return newSpell;
|
||||
}
|
||||
@@ -1220,7 +1220,7 @@ void SpellMgr::LoadSpellTalentRanks()
|
||||
SpellInfo const* firstSpell = GetSpellInfo(talentInfo->RankID[0]);
|
||||
if (!firstSpell)
|
||||
{
|
||||
sLog->outErrorDb("SpellMgr::LoadSpellTalentRanks: First Rank Spell %u for TalentEntry %u does not exist.", talentInfo->RankID[0], i);
|
||||
LOG_ERROR("sql.sql", "SpellMgr::LoadSpellTalentRanks: First Rank Spell %u for TalentEntry %u does not exist.", talentInfo->RankID[0], i);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1234,7 +1234,7 @@ void SpellMgr::LoadSpellTalentRanks()
|
||||
SpellInfo const* currentSpell = GetSpellInfo(spellId);
|
||||
if (!currentSpell)
|
||||
{
|
||||
sLog->outErrorDb("SpellMgr::LoadSpellTalentRanks: Spell %u (Rank: %u) for TalentEntry %u does not exist.", spellId, rank + 1, i);
|
||||
LOG_ERROR("sql.sql", "SpellMgr::LoadSpellTalentRanks: Spell %u (Rank: %u) for TalentEntry %u does not exist.", spellId, rank + 1, i);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1266,8 +1266,8 @@ void SpellMgr::LoadSpellRanks()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 spell rank records. DB table `spell_ranks` is empty.");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1306,13 +1306,13 @@ void SpellMgr::LoadSpellRanks()
|
||||
SpellInfo const* first = GetSpellInfo(lastSpell);
|
||||
if (!first)
|
||||
{
|
||||
sLog->outErrorDb("Spell rank identifier(first_spell_id) %u listed in `spell_ranks` does not exist!", lastSpell);
|
||||
LOG_ERROR("sql.sql", "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);
|
||||
LOG_ERROR("sql.sql", "There is only 1 spell rank for identifier(first_spell_id) %u in `spell_ranks`, entry is not needed!", lastSpell);
|
||||
continue;
|
||||
}
|
||||
int32 curRank = 0;
|
||||
@@ -1323,14 +1323,14 @@ void SpellMgr::LoadSpellRanks()
|
||||
SpellInfo const* spell = GetSpellInfo(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);
|
||||
LOG_ERROR("sql.sql", "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);
|
||||
LOG_ERROR("sql.sql", "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;
|
||||
}
|
||||
@@ -1361,8 +1361,8 @@ void SpellMgr::LoadSpellRanks()
|
||||
} while (true);
|
||||
} while (!finished);
|
||||
|
||||
sLog->outString(">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellRequired()
|
||||
@@ -1377,8 +1377,8 @@ void SpellMgr::LoadSpellRequired()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 spell required records. DB table `spell_required` is empty.");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 spell required records. DB table `spell_required` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1394,26 +1394,26 @@ void SpellMgr::LoadSpellRequired()
|
||||
SpellInfo const* spellInfo = GetSpellInfo(spellId);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("spell_id %u in `spell_required` table is not found in dbcs, skipped", spellId);
|
||||
LOG_ERROR("sql.sql", "spell_id %u in `spell_required` table is not found in dbcs, skipped", spellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
SpellInfo const* reqSpellInfo = GetSpellInfo(spellReq);
|
||||
if (!reqSpellInfo)
|
||||
{
|
||||
sLog->outErrorDb("req_spell %u in `spell_required` table is not found in dbcs, skipped", spellReq);
|
||||
LOG_ERROR("sql.sql", "req_spell %u in `spell_required` table is not found in dbcs, skipped", spellReq);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (GetFirstSpellInChain(spellId) == GetFirstSpellInChain(spellReq))
|
||||
{
|
||||
sLog->outErrorDb("req_spell %u and spell_id %u in `spell_required` table are ranks of the same spell, entry not needed, skipped", spellReq, spellId);
|
||||
LOG_ERROR("sql.sql", "req_spell %u and spell_id %u in `spell_required` table are ranks of the same spell, entry not needed, skipped", spellReq, spellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (IsSpellRequiringSpell(spellId, spellReq))
|
||||
{
|
||||
sLog->outErrorDb("duplicated entry of req_spell %u and spell_id %u in `spell_required`, skipped", spellReq, spellId);
|
||||
LOG_ERROR("sql.sql", "duplicated entry of req_spell %u and spell_id %u in `spell_required`, skipped", spellReq, spellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1426,8 +1426,8 @@ void SpellMgr::LoadSpellRequired()
|
||||
mTalentSpellAdditionalSet.insert(spellId);
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellLearnSkills()
|
||||
@@ -1464,8 +1464,8 @@ void SpellMgr::LoadSpellLearnSkills()
|
||||
}
|
||||
}
|
||||
|
||||
sLog->outString(">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellTargetPositions()
|
||||
@@ -1479,8 +1479,8 @@ void SpellMgr::LoadSpellTargetPositions()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty.");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1504,20 +1504,20 @@ void SpellMgr::LoadSpellTargetPositions()
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(st.target_mapId);
|
||||
if (!mapEntry)
|
||||
{
|
||||
sLog->outErrorDb("Spell (Id: %u, effIndex: %u) target map (ID: %u) does not exist in `Map.dbc`.", Spell_ID, effIndex, st.target_mapId);
|
||||
LOG_ERROR("sql.sql", "Spell (Id: %u, effIndex: %u) target map (ID: %u) does not exist in `Map.dbc`.", Spell_ID, effIndex, st.target_mapId);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (st.target_X == 0 && st.target_Y == 0 && st.target_Z == 0)
|
||||
{
|
||||
sLog->outErrorDb("Spell (Id: %u, effIndex: %u) target coordinates not provided.", Spell_ID, effIndex);
|
||||
LOG_ERROR("sql.sql", "Spell (Id: %u, effIndex: %u) target coordinates not provided.", Spell_ID, effIndex);
|
||||
continue;
|
||||
}
|
||||
|
||||
SpellInfo const* spellInfo = GetSpellInfo(Spell_ID);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("Spell (ID:%u) listed in `spell_target_position` does not exist.", Spell_ID);
|
||||
LOG_ERROR("sql.sql", "Spell (ID:%u) listed in `spell_target_position` does not exist.", Spell_ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1529,7 +1529,7 @@ void SpellMgr::LoadSpellTargetPositions()
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outErrorDb("Spell (Id: %u, effIndex: %u) listed in `spell_target_position` does not have target TARGET_DEST_DB (17).", Spell_ID, effIndex);
|
||||
LOG_ERROR("sql.sql", "Spell (Id: %u, effIndex: %u) listed in `spell_target_position` does not have target TARGET_DEST_DB (17).", Spell_ID, effIndex);
|
||||
continue;
|
||||
}
|
||||
} while (result->NextRow());
|
||||
@@ -1566,13 +1566,13 @@ void SpellMgr::LoadSpellTargetPositions()
|
||||
{
|
||||
if (!sSpellMgr->GetSpellTargetPosition(i))
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_SPELLS_AURAS, "Spell (ID: %u) does not have record in `spell_target_position`", i);
|
||||
LOG_DEBUG("spells.aura", "Spell (ID: %u) does not have record in `spell_target_position`", i);
|
||||
#endif
|
||||
}
|
||||
}*/
|
||||
|
||||
sLog->outString(">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellGroups()
|
||||
@@ -1585,8 +1585,8 @@ void SpellMgr::LoadSpellGroups()
|
||||
QueryResult result = WorldDatabase.Query("SELECT id, spell_id, special_flag FROM spell_group");
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 spell group definitions. DB table `spell_group` is empty.");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 spell group definitions. DB table `spell_group` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1602,24 +1602,24 @@ void SpellMgr::LoadSpellGroups()
|
||||
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_group` does not exist", spell_id);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_group` does not exist", spell_id);
|
||||
continue;
|
||||
}
|
||||
else if (spellInfo->GetRank() > 1)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_group` is not first rank of spell", spell_id);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_group` is not first rank of spell", spell_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (mSpellGroupMap.find(spell_id) != mSpellGroupMap.end())
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_group` has more than one group", spell_id);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_group` has more than one group", spell_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (specialFlag >= SPELL_GROUP_SPECIAL_FLAG_MAX)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_group` has invalid special flag!", spell_id);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_group` has invalid special flag!", spell_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1631,8 +1631,8 @@ void SpellMgr::LoadSpellGroups()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellGroupStackRules()
|
||||
@@ -1645,8 +1645,8 @@ void SpellMgr::LoadSpellGroupStackRules()
|
||||
QueryResult result = WorldDatabase.Query("SELECT group_id, stack_rule FROM spell_group_stack_rules");
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty.");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1659,7 +1659,7 @@ void SpellMgr::LoadSpellGroupStackRules()
|
||||
uint8 stack_rule = fields[1].GetInt8();
|
||||
if (stack_rule >= SPELL_GROUP_STACK_FLAG_MAX)
|
||||
{
|
||||
sLog->outErrorDb("SpellGroupStackRule %u listed in `spell_group_stack_rules` does not exist", stack_rule);
|
||||
LOG_ERROR("sql.sql", "SpellGroupStackRule %u listed in `spell_group_stack_rules` does not exist", stack_rule);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1673,7 +1673,7 @@ void SpellMgr::LoadSpellGroupStackRules()
|
||||
|
||||
if (!present)
|
||||
{
|
||||
sLog->outErrorDb("SpellGroup id %u listed in `spell_group_stack_rules` does not exist", group_id);
|
||||
LOG_ERROR("sql.sql", "SpellGroup id %u listed in `spell_group_stack_rules` does not exist", group_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1682,8 +1682,8 @@ void SpellMgr::LoadSpellGroupStackRules()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellProcEvents()
|
||||
@@ -1696,7 +1696,7 @@ 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 0 spell proc event conditions. DB table `spell_proc_event` is empty.");
|
||||
LOG_INFO("server", ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1718,18 +1718,18 @@ void SpellMgr::LoadSpellProcEvents()
|
||||
SpellInfo const* spellInfo = GetSpellInfo(spellId);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_proc_event` does not exist", spellId);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc_event` does not exist", spellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (allRanks)
|
||||
{
|
||||
if (!spellInfo->IsRanked())
|
||||
sLog->outErrorDb("Spell %u listed in `spell_proc_event` with all ranks, but spell has no ranks.", spellId);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc_event` with all ranks, but spell has no ranks.", spellId);
|
||||
|
||||
if (spellInfo->GetFirstRankSpell()->Id != uint32(spellId))
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_proc_event` is not first rank of spell.", spellId);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc_event` is not first rank of spell.", spellId);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -1751,12 +1751,12 @@ void SpellMgr::LoadSpellProcEvents()
|
||||
{
|
||||
if (mSpellProcEventMap.find(spellInfo->Id) != mSpellProcEventMap.end())
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_proc_event` already has its first rank in table.", spellInfo->Id);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc_event` already has its first rank in table.", spellInfo->Id);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!spellInfo->ProcFlags && !spellProcEvent.procFlags)
|
||||
sLog->outErrorDb("Spell %u listed in `spell_proc_event` probally not triggered spell", spellInfo->Id);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc_event` probally not triggered spell", spellInfo->Id);
|
||||
|
||||
mSpellProcEventMap[spellInfo->Id] = spellProcEvent;
|
||||
|
||||
@@ -1769,8 +1769,8 @@ void SpellMgr::LoadSpellProcEvents()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellProcs()
|
||||
@@ -1783,8 +1783,8 @@ void SpellMgr::LoadSpellProcs()
|
||||
QueryResult result = WorldDatabase.Query("SELECT spellId, schoolMask, spellFamilyName, spellFamilyMask0, spellFamilyMask1, spellFamilyMask2, typeMask, spellTypeMask, spellPhaseMask, hitMask, attributesMask, ratePerMinute, chance, cooldown, charges FROM spell_proc");
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty.");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1805,7 +1805,7 @@ void SpellMgr::LoadSpellProcs()
|
||||
SpellInfo const* spellInfo = GetSpellInfo(spellId);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_proc` does not exist", spellId);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc` does not exist", spellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1813,7 +1813,7 @@ void SpellMgr::LoadSpellProcs()
|
||||
{
|
||||
if (spellInfo->GetFirstRankSpell()->Id != uint32(spellId))
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_proc` is not first rank of spell.", fields[0].GetInt32());
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc` is not first rank of spell.", fields[0].GetInt32());
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -1840,7 +1840,7 @@ void SpellMgr::LoadSpellProcs()
|
||||
{
|
||||
if (mSpellProcMap.find(spellInfo->Id) != mSpellProcMap.end())
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_proc` has duplicate entry in the table", spellId);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_proc` has duplicate entry in the table", spellId);
|
||||
break;
|
||||
}
|
||||
SpellProcEntry procEntry = SpellProcEntry(baseProcEntry);
|
||||
@@ -1855,47 +1855,47 @@ void SpellMgr::LoadSpellProcs()
|
||||
|
||||
// validate data
|
||||
if (procEntry.schoolMask & ~SPELL_SCHOOL_MASK_ALL)
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellId, procEntry.schoolMask);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `schoolMask` set: %u", spellId, procEntry.schoolMask);
|
||||
if (procEntry.spellFamilyName && (procEntry.spellFamilyName < 3 || procEntry.spellFamilyName > 17 || procEntry.spellFamilyName == 14 || procEntry.spellFamilyName == 16))
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellId, procEntry.spellFamilyName);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `spellFamilyName` set: %u", spellId, procEntry.spellFamilyName);
|
||||
if (procEntry.chance < 0)
|
||||
{
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u has negative value in `chance` field", spellId);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has negative value in `chance` field", spellId);
|
||||
procEntry.chance = 0;
|
||||
}
|
||||
if (procEntry.ratePerMinute < 0)
|
||||
{
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u has negative value in `ratePerMinute` field", spellId);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has negative value in `ratePerMinute` field", spellId);
|
||||
procEntry.ratePerMinute = 0;
|
||||
}
|
||||
if (cooldown < 0)
|
||||
{
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u has negative value in `cooldown` field", spellId);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has negative value in `cooldown` field", spellId);
|
||||
procEntry.cooldown = 0;
|
||||
}
|
||||
if (procEntry.chance == 0 && procEntry.ratePerMinute == 0)
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u doesn't have `chance` and `ratePerMinute` values defined, proc will not be triggered", spellId);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u doesn't have `chance` and `ratePerMinute` values defined, proc will not be triggered", spellId);
|
||||
if (procEntry.charges > 99)
|
||||
{
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u has too big value in `charges` field", spellId);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has too big value in `charges` field", spellId);
|
||||
procEntry.charges = 99;
|
||||
}
|
||||
if (!procEntry.typeMask)
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u doesn't have `typeMask` value defined, proc will not be triggered", spellId);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u doesn't have `typeMask` value defined, proc will not be triggered", spellId);
|
||||
if (procEntry.spellTypeMask & ~PROC_SPELL_TYPE_MASK_ALL)
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellId, procEntry.spellTypeMask);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `spellTypeMask` set: %u", spellId, procEntry.spellTypeMask);
|
||||
if (procEntry.spellTypeMask && !(procEntry.typeMask & (SPELL_PROC_FLAG_MASK | PERIODIC_PROC_FLAG_MASK)))
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it won't be used for defined `typeMask` value", spellId);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has `spellTypeMask` value defined, but it won't be used for defined `typeMask` value", spellId);
|
||||
if (!procEntry.spellPhaseMask && procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK)
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u doesn't have `spellPhaseMask` value defined, but it's required for defined `typeMask` value, proc will not be triggered", spellId);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u doesn't have `spellPhaseMask` value defined, but it's required for defined `typeMask` value, proc will not be triggered", spellId);
|
||||
if (procEntry.spellPhaseMask & ~PROC_SPELL_PHASE_MASK_ALL)
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellId, procEntry.spellPhaseMask);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `spellPhaseMask` set: %u", spellId, procEntry.spellPhaseMask);
|
||||
if (procEntry.spellPhaseMask && !(procEntry.typeMask & REQ_SPELL_PHASE_PROC_FLAG_MASK))
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u has `spellPhaseMask` value defined, but it won't be used for defined `typeMask` value", spellId);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has `spellPhaseMask` value defined, but it won't be used for defined `typeMask` value", spellId);
|
||||
if (procEntry.hitMask & ~PROC_HIT_MASK_ALL)
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellId, procEntry.hitMask);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has wrong `hitMask` set: %u", spellId, procEntry.hitMask);
|
||||
if (procEntry.hitMask && !(procEntry.typeMask & TAKEN_HIT_PROC_FLAG_MASK || (procEntry.typeMask & DONE_HIT_PROC_FLAG_MASK && (!procEntry.spellPhaseMask || procEntry.spellPhaseMask & (PROC_SPELL_PHASE_HIT | PROC_SPELL_PHASE_FINISH)))))
|
||||
sLog->outErrorDb("`spell_proc` table entry for spellId %u has `hitMask` value defined, but it won't be used for defined `typeMask` and `spellPhaseMask` values", spellId);
|
||||
LOG_ERROR("sql.sql", "`spell_proc` table entry for spellId %u has `hitMask` value defined, but it won't be used for defined `typeMask` and `spellPhaseMask` values", spellId);
|
||||
|
||||
mSpellProcMap[spellInfo->Id] = procEntry;
|
||||
|
||||
@@ -1907,8 +1907,8 @@ void SpellMgr::LoadSpellProcs()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellBonusess()
|
||||
@@ -1921,8 +1921,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 0 spell bonus data. DB table `spell_bonus_data` is empty.");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1935,7 +1935,7 @@ void SpellMgr::LoadSpellBonusess()
|
||||
SpellInfo const* spell = GetSpellInfo(entry);
|
||||
if (!spell)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_bonus_data` does not exist", entry);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_bonus_data` does not exist", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1948,8 +1948,8 @@ void SpellMgr::LoadSpellBonusess()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellThreats()
|
||||
@@ -1962,8 +1962,8 @@ void SpellMgr::LoadSpellThreats()
|
||||
QueryResult result = WorldDatabase.Query("SELECT entry, flatMod, pctMod, apPctMod FROM spell_threat");
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty.");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1976,7 +1976,7 @@ void SpellMgr::LoadSpellThreats()
|
||||
|
||||
if (!GetSpellInfo(entry))
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_threat` does not exist", entry);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_threat` does not exist", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1989,8 +1989,8 @@ void SpellMgr::LoadSpellThreats()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellMixology()
|
||||
@@ -2003,8 +2003,8 @@ void SpellMgr::LoadSpellMixology()
|
||||
QueryResult result = WorldDatabase.Query("SELECT entry, pctMod FROM spell_mixology");
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 mixology bonuses. DB table `spell_mixology` is empty.");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 mixology bonuses. DB table `spell_mixology` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2017,7 +2017,7 @@ void SpellMgr::LoadSpellMixology()
|
||||
|
||||
if (!GetSpellInfo(entry))
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_mixology` does not exist", entry);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_mixology` does not exist", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2025,8 +2025,8 @@ void SpellMgr::LoadSpellMixology()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u Mixology bonuses in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u Mixology bonuses in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSkillLineAbilityMap()
|
||||
@@ -2047,8 +2047,8 @@ void SpellMgr::LoadSkillLineAbilityMap()
|
||||
++count;
|
||||
}
|
||||
|
||||
sLog->outString(">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellPetAuras()
|
||||
@@ -2061,8 +2061,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();
|
||||
LOG_INFO("server", ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2084,21 +2084,21 @@ void SpellMgr::LoadSpellPetAuras()
|
||||
SpellInfo const* spellInfo = GetSpellInfo(spell);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_pet_auras` does not exist", spell);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_pet_auras` does not exist", spell);
|
||||
continue;
|
||||
}
|
||||
if (spellInfo->Effects[eff].Effect != SPELL_EFFECT_DUMMY &&
|
||||
(spellInfo->Effects[eff].Effect != SPELL_EFFECT_APPLY_AURA ||
|
||||
spellInfo->Effects[eff].ApplyAuraName != SPELL_AURA_DUMMY))
|
||||
{
|
||||
sLog->outError("Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell);
|
||||
LOG_ERROR("server", "Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell);
|
||||
continue;
|
||||
}
|
||||
|
||||
SpellInfo const* spellInfo2 = GetSpellInfo(aura);
|
||||
if (!spellInfo2)
|
||||
{
|
||||
sLog->outErrorDb("Aura %u listed in `spell_pet_auras` does not exist", aura);
|
||||
LOG_ERROR("sql.sql", "Aura %u listed in `spell_pet_auras` does not exist", aura);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2109,8 +2109,8 @@ void SpellMgr::LoadSpellPetAuras()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
// Fill custom data about enchancments
|
||||
@@ -2151,8 +2151,8 @@ void SpellMgr::LoadEnchantCustomAttr()
|
||||
}
|
||||
}
|
||||
|
||||
sLog->outString(">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellEnchantProcData()
|
||||
@@ -2165,8 +2165,8 @@ void SpellMgr::LoadSpellEnchantProcData()
|
||||
QueryResult result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx FROM spell_enchant_proc_data");
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty.");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2180,7 +2180,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);
|
||||
LOG_ERROR("sql.sql", "Enchancment %u listed in `spell_enchant_proc_data` does not exist", enchantId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2195,8 +2195,8 @@ void SpellMgr::LoadSpellEnchantProcData()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellLinked()
|
||||
@@ -2209,8 +2209,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();
|
||||
LOG_INFO("server", ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2226,13 +2226,13 @@ void SpellMgr::LoadSpellLinked()
|
||||
SpellInfo const* spellInfo = GetSpellInfo(abs(trigger));
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_linked_spell` does not exist", abs(trigger));
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_linked_spell` does not exist", abs(trigger));
|
||||
continue;
|
||||
}
|
||||
spellInfo = GetSpellInfo(abs(effect));
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_linked_spell` does not exist", abs(effect));
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_linked_spell` does not exist", abs(effect));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2248,8 +2248,8 @@ void SpellMgr::LoadSpellLinked()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadPetLevelupSpellMap()
|
||||
@@ -2305,8 +2305,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();
|
||||
LOG_INFO("server", ">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
bool LoadPetDefaultSpells_helper(CreatureTemplate const* cInfo, PetDefaultSpellsEntry& petDefSpells)
|
||||
@@ -2389,10 +2389,10 @@ void SpellMgr::LoadPetDefaultSpells()
|
||||
}
|
||||
}
|
||||
|
||||
sLog->outString(">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
|
||||
sLog->outString("Loading summonable creature templates...");
|
||||
LOG_INFO("server", "Loading summonable creature templates...");
|
||||
oldMSTime = getMSTime();
|
||||
|
||||
// different summon spells
|
||||
@@ -2433,8 +2433,8 @@ void SpellMgr::LoadPetDefaultSpells()
|
||||
}
|
||||
}
|
||||
|
||||
sLog->outString(">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellAreas()
|
||||
@@ -2451,8 +2451,8 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
sLog->outString(">> Loaded 0 spell area requirements. DB table `spell_area` is empty.");
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded 0 spell area requirements. DB table `spell_area` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2481,7 +2481,7 @@ void SpellMgr::LoadSpellAreas()
|
||||
}
|
||||
else
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` does not exist", spell);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` does not exist", spell);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2510,20 +2510,20 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
if (!ok)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` already listed with similar requirements.", spell);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` already listed with similar requirements.", spell);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (spellArea.areaId && !sAreaTableStore.LookupEntry(spellArea.areaId))
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have wrong area (%u) requirement", spell, spellArea.areaId);
|
||||
LOG_ERROR("sql.sql", "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);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have wrong start quest (%u) requirement", spell, spellArea.questStart);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2531,7 +2531,7 @@ 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);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have wrong end quest (%u) requirement", spell, spellArea.questEnd);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -2541,13 +2541,13 @@ void SpellMgr::LoadSpellAreas()
|
||||
SpellInfo const* spellInfo = GetSpellInfo(abs(spellArea.auraSpell));
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("Spell %u listed in `spell_area` have wrong aura spell (%u) requirement", spell, abs(spellArea.auraSpell));
|
||||
LOG_ERROR("sql.sql", "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));
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have aura spell (%u) requirement for itself", spell, abs(spellArea.auraSpell));
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2567,7 +2567,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);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2583,7 +2583,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);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have aura spell (%u) requirement that itself autocast from aura", spell, spellArea.auraSpell);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -2591,13 +2591,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);
|
||||
LOG_ERROR("sql.sql", "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);
|
||||
LOG_ERROR("sql.sql", "Spell %u listed in `spell_area` have wrong gender (%u) requirement", spell, spellArea.gender);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2624,28 +2624,28 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
if (sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE) > 0)
|
||||
{
|
||||
sLog->outString(">> Using ICC buff Horde: %u", sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE));
|
||||
LOG_INFO("server", ">> Using ICC buff Horde: %u", sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE));
|
||||
SpellArea spellAreaICCBuffHorde = { sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE), ICC_AREA, 0, 0, 0, ICC_RACEMASK_HORDE, Gender(2), 64, 11, 1 };
|
||||
SpellArea const* saICCBuffHorde = &mSpellAreaMap.insert(SpellAreaMap::value_type(sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE), spellAreaICCBuffHorde))->second;
|
||||
mSpellAreaForAreaMap.insert(SpellAreaForAreaMap::value_type(ICC_AREA, saICCBuffHorde));
|
||||
++count;
|
||||
}
|
||||
else
|
||||
sLog->outString(">> ICC buff Horde: disabled");
|
||||
LOG_INFO("server", ">> ICC buff Horde: disabled");
|
||||
|
||||
if (sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE) > 0)
|
||||
{
|
||||
sLog->outString(">> Using ICC buff Alliance: %u", sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE));
|
||||
LOG_INFO("server", ">> Using ICC buff Alliance: %u", sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE));
|
||||
SpellArea spellAreaICCBuffAlliance = { sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE), ICC_AREA, 0, 0, 0, ICC_RACEMASK_ALLIANCE, Gender(2), 64, 11, 1 };
|
||||
SpellArea const* saICCBuffAlliance = &mSpellAreaMap.insert(SpellAreaMap::value_type(sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE), spellAreaICCBuffAlliance))->second;
|
||||
mSpellAreaForAreaMap.insert(SpellAreaForAreaMap::value_type(ICC_AREA, saICCBuffAlliance));
|
||||
++count;
|
||||
}
|
||||
else
|
||||
sLog->outString(">> ICC buff Alliance: disabled");
|
||||
LOG_INFO("server", ">> ICC buff Alliance: disabled");
|
||||
|
||||
sLog->outString(">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellInfoStore()
|
||||
@@ -2661,8 +2661,8 @@ void SpellMgr::LoadSpellInfoStore()
|
||||
mSpellInfoMap[i] = new SpellInfo(spellEntry);
|
||||
}
|
||||
|
||||
sLog->outString(">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::UnloadSpellInfoStore()
|
||||
@@ -2698,8 +2698,8 @@ void SpellMgr::LoadSpellSpecificAndAuraState()
|
||||
spellInfo->_auraState = spellInfo->LoadAuraState();
|
||||
}
|
||||
|
||||
sLog->outString(">> Loaded spell specific and aura state in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded spell specific and aura state in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellCustomAttr()
|
||||
@@ -2711,7 +2711,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
QueryResult result = WorldDatabase.Query("SELECT spell_id, attributes FROM spell_custom_attr");
|
||||
|
||||
if (!result)
|
||||
sLog->outString(">> Loaded 0 spell custom attributes from DB. DB table `spell_custom_attr` is empty.");
|
||||
LOG_INFO("server", ">> Loaded 0 spell custom attributes from DB. DB table `spell_custom_attr` is empty.");
|
||||
else
|
||||
{
|
||||
for (count = 0; result->NextRow(); ++count)
|
||||
@@ -2724,7 +2724,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
SpellInfo* spellInfo = _GetSpellInfo(spellId);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outString("Table `spell_custom_attr` has wrong spell (spell_id: %u), ignored.", spellId);
|
||||
LOG_INFO("server", "Table `spell_custom_attr` has wrong spell (spell_id: %u), ignored.", spellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2737,7 +2737,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
|
||||
if ((attributes & (SPELL_ATTR0_CU_NEGATIVE_EFF0 << i)) != 0)
|
||||
{
|
||||
sLog->outErrorDb("Table `spell_custom_attr` has attribute SPELL_ATTR0_CU_NEGATIVE_EFF%u for spell %u with no EFFECT_%u", uint32(i), spellId, uint32(i));
|
||||
LOG_ERROR("sql.sql", "Table `spell_custom_attr` has attribute SPELL_ATTR0_CU_NEGATIVE_EFF%u for spell %u with no EFFECT_%u", uint32(i), spellId, uint32(i));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -2752,7 +2752,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
|
||||
if ((attributes & (SPELL_ATTR0_CU_POSITIVE_EFF0 << i)) != 0)
|
||||
{
|
||||
sLog->outErrorDb("Table `spell_custom_attr` has attribute SPELL_ATTR0_CU_POSITIVE_EFF%u for spell %u with no EFFECT_%u", uint32(i), spellId, uint32(i));
|
||||
LOG_ERROR("sql.sql", "Table `spell_custom_attr` has attribute SPELL_ATTR0_CU_POSITIVE_EFF%u for spell %u with no EFFECT_%u", uint32(i), spellId, uint32(i));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -2760,7 +2760,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
|
||||
spellInfo->AttributesCu |= attributes;
|
||||
}
|
||||
sLog->outString(">> Loaded %u spell custom attributes from DB in %u ms", count, GetMSTimeDiffToNow(customAttrTime));
|
||||
LOG_INFO("server", ">> Loaded %u spell custom attributes from DB in %u ms", count, GetMSTimeDiffToNow(customAttrTime));
|
||||
}
|
||||
|
||||
// xinef: create talent spells set
|
||||
@@ -3295,8 +3295,8 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
|
||||
CreatureAI::FillAISpellInfo();
|
||||
|
||||
sLog->outString(">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
inline void ApplySpellFix(std::initializer_list<uint32> spellIds, void(*fix)(SpellEntry*))
|
||||
@@ -3306,7 +3306,7 @@ inline void ApplySpellFix(std::initializer_list<uint32> spellIds, void(*fix)(Spe
|
||||
SpellEntry const* spellInfo = (SpellEntry*)sSpellStore.LookupEntry(spellId);
|
||||
if (!spellInfo)
|
||||
{
|
||||
sLog->outErrorDb("Spell info correction specified for non-existing spell %u", spellId);
|
||||
LOG_ERROR("sql.sql", "Spell info correction specified for non-existing spell %u", spellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -7453,6 +7453,6 @@ void SpellMgr::LoadDbcDataCorrections()
|
||||
LockEntry* key = const_cast<LockEntry*>(sLockStore.LookupEntry(36)); // 3366 Opening, allows to open without proper key
|
||||
key->Type[2] = LOCK_KEY_NONE;
|
||||
|
||||
sLog->outString(">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
sLog->outString();
|
||||
LOG_INFO("server", ">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ bool _SpellScript::_Validate(SpellInfo const* entry)
|
||||
{
|
||||
if (!Validate(entry))
|
||||
{
|
||||
sLog->outError("_SpellScript::_Validate: Spell `%u` did not pass Validate() function of script `%s` - script will not be added to the spell", entry->Id, m_scriptName->c_str());
|
||||
LOG_ERROR("server", "_SpellScript::_Validate: Spell `%u` did not pass Validate() function of script `%s` - script will not be added to the spell", entry->Id, m_scriptName->c_str());
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -27,7 +27,7 @@ bool _SpellScript::_ValidateSpellInfo(uint32 const* begin, uint32 const* end)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(*begin))
|
||||
{
|
||||
sLog->outError("_SpellScript::_ValidateSpellInfo: Spell %u does not exist.", *begin);
|
||||
LOG_ERROR("server", "_SpellScript::_ValidateSpellInfo: Spell %u does not exist.", *begin);
|
||||
allValid = false;
|
||||
}
|
||||
|
||||
@@ -301,31 +301,31 @@ bool SpellScript::_Validate(SpellInfo const* entry)
|
||||
{
|
||||
for (std::list<EffectHandler>::iterator itr = OnEffectLaunch.begin(); itr != OnEffectLaunch.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunch` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunch` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectHandler>::iterator itr = OnEffectLaunchTarget.begin(); itr != OnEffectLaunchTarget.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunchTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectLaunchTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectHandler>::iterator itr = OnEffectHit.begin(); itr != OnEffectHit.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHit` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHit` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectHandler>::iterator itr = OnEffectHitTarget.begin(); itr != OnEffectHitTarget.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHitTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectHitTarget` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<ObjectAreaTargetSelectHandler>::iterator itr = OnObjectAreaTargetSelect.begin(); itr != OnObjectAreaTargetSelect.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectAreaTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectAreaTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<ObjectTargetSelectHandler>::iterator itr = OnObjectTargetSelect.begin(); itr != OnObjectTargetSelect.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnObjectTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<DestinationTargetSelectHandler>::iterator itr = OnDestinationTargetSelect.begin(); itr != OnDestinationTargetSelect.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnDestinationTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnDestinationTargetSelect` of SpellScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
return _SpellScript::_Validate(entry);
|
||||
}
|
||||
@@ -433,7 +433,7 @@ Unit* SpellScript::GetHitUnit()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitUnit was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return nullptr;
|
||||
}
|
||||
return m_spell->unitTarget;
|
||||
@@ -443,7 +443,7 @@ Creature* SpellScript::GetHitCreature()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitCreature was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return nullptr;
|
||||
}
|
||||
if (m_spell->unitTarget)
|
||||
@@ -456,7 +456,7 @@ Player* SpellScript::GetHitPlayer()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitPlayer was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return nullptr;
|
||||
}
|
||||
if (m_spell->unitTarget)
|
||||
@@ -469,7 +469,7 @@ Item* SpellScript::GetHitItem()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitItem was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return nullptr;
|
||||
}
|
||||
return m_spell->itemTarget;
|
||||
@@ -479,7 +479,7 @@ GameObject* SpellScript::GetHitGObj()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return nullptr;
|
||||
}
|
||||
return m_spell->gameObjTarget;
|
||||
@@ -489,7 +489,7 @@ WorldLocation* SpellScript::GetHitDest()
|
||||
{
|
||||
if (!IsInEffectHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDest was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDest was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return nullptr;
|
||||
}
|
||||
return m_spell->destTarget;
|
||||
@@ -499,7 +499,7 @@ int32 SpellScript::GetHitDamage()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return 0;
|
||||
}
|
||||
return m_spell->m_damage;
|
||||
@@ -509,7 +509,7 @@ void SpellScript::SetHitDamage(int32 damage)
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitDamage was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return;
|
||||
}
|
||||
m_spell->m_damage = damage;
|
||||
@@ -519,7 +519,7 @@ int32 SpellScript::GetHitHeal()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return 0;
|
||||
}
|
||||
return m_spell->m_healing;
|
||||
@@ -529,7 +529,7 @@ void SpellScript::SetHitHeal(int32 heal)
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetHitHeal was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return;
|
||||
}
|
||||
m_spell->m_healing = heal;
|
||||
@@ -539,7 +539,7 @@ Aura* SpellScript::GetHitAura()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return nullptr;
|
||||
}
|
||||
if (!m_spell->m_spellAura)
|
||||
@@ -553,7 +553,7 @@ void SpellScript::PreventHitAura()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitAura was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return;
|
||||
}
|
||||
if (m_spell->m_spellAura)
|
||||
@@ -564,7 +564,7 @@ void SpellScript::PreventHitEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
if (!IsInHitPhase() && !IsInEffectHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return;
|
||||
}
|
||||
m_hitPreventEffectMask |= 1 << effIndex;
|
||||
@@ -575,7 +575,7 @@ void SpellScript::PreventHitDefaultEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
if (!IsInHitPhase() && !IsInEffectHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::PreventHitDefaultEffect was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return;
|
||||
}
|
||||
m_hitPreventDefaultEffectMask |= 1 << effIndex;
|
||||
@@ -585,7 +585,7 @@ int32 SpellScript::GetEffectValue() const
|
||||
{
|
||||
if (!IsInEffectHook())
|
||||
{
|
||||
sLog->outError("Script: `%s` Spell: `%u`: function SpellScript::GetEffectValue was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "Script: `%s` Spell: `%u`: function SpellScript::GetEffectValue was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return 0;
|
||||
}
|
||||
return m_spell->damage;
|
||||
@@ -595,7 +595,7 @@ void SpellScript::SetEffectValue(int32 value)
|
||||
{
|
||||
if (!IsInEffectHook())
|
||||
{
|
||||
sLog->outError("Script: `%s` Spell: `%u`: function SpellScript::SetEffectValue was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "Script: `%s` Spell: `%u`: function SpellScript::SetEffectValue was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return;
|
||||
}
|
||||
m_spell->damage = value;
|
||||
@@ -631,7 +631,7 @@ void SpellScript::SetCustomCastResultMessage(SpellCustomErrors result)
|
||||
{
|
||||
if (!IsInCheckCastHook())
|
||||
{
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -647,95 +647,95 @@ bool AuraScript::_Validate(SpellInfo const* entry)
|
||||
{
|
||||
for (std::list<CheckAreaTargetHandler>::iterator itr = DoCheckAreaTarget.begin(); itr != DoCheckAreaTarget.end(); ++itr)
|
||||
if (!entry->HasAreaAuraEffect() && !entry->HasEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA))
|
||||
sLog->outError("TSCR: Spell `%u` of script `%s` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` of script `%s` does not have area aura effect - handler bound to hook `DoCheckAreaTarget` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
|
||||
for (std::list<AuraDispelHandler>::iterator itr = OnDispel.begin(); itr != OnDispel.end(); ++itr)
|
||||
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
|
||||
sLog->outError("TSCR: Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
|
||||
for (std::list<AuraDispelHandler>::iterator itr = AfterDispel.begin(); itr != AfterDispel.end(); ++itr)
|
||||
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
|
||||
sLog->outError("TSCR: Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterDispel` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectApplyHandler>::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 - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectApplyHandler>::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 - handler bound to hook `OnEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectApplyHandler>::iterator itr = AfterEffectApply.begin(); itr != AfterEffectApply.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectApply` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectApplyHandler>::iterator itr = AfterEffectRemove.begin(); itr != AfterEffectRemove.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectRemove` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectPeriodicHandler>::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 - handler bound to hook `OnEffectPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectUpdatePeriodicHandler>::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 - handler bound to hook `OnEffectUpdatePeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectUpdatePeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectCalcAmountHandler>::iterator itr = DoEffectCalcAmount.begin(); itr != DoEffectCalcAmount.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcAmount` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcAmount` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectCalcPeriodicHandler>::iterator itr = DoEffectCalcPeriodic.begin(); itr != DoEffectCalcPeriodic.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcPeriodic` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectCalcSpellModHandler>::iterator itr = DoEffectCalcSpellMod.begin(); itr != DoEffectCalcSpellMod.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcSpellMod` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `DoEffectCalcSpellMod` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectAbsorbHandler>::iterator itr = OnEffectAbsorb.begin(); itr != OnEffectAbsorb.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectAbsorbHandler>::iterator itr = AfterEffectAbsorb.begin(); itr != AfterEffectAbsorb.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectAbsorb` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectManaShieldHandler>::iterator itr = OnEffectManaShield.begin(); itr != OnEffectManaShield.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectManaShieldHandler>::iterator itr = AfterEffectManaShield.begin(); itr != AfterEffectManaShield.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "TSCR: Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectManaShield` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectSplitHandler>::iterator itr = OnEffectSplit.begin(); itr != OnEffectSplit.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectSplit` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectSplit` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<CheckProcHandler>::iterator itr = DoCheckProc.begin(); itr != DoCheckProc.end(); ++itr)
|
||||
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
|
||||
sLog->outError("Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `DoCheckProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
LOG_ERROR("server", "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `DoCheckProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
|
||||
for (std::list<AuraProcHandler>::iterator itr = DoPrepareProc.begin(); itr != DoPrepareProc.end(); ++itr)
|
||||
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
|
||||
sLog->outError("Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `DoPrepareProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
LOG_ERROR("server", "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `DoPrepareProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
|
||||
for (std::list<AuraProcHandler>::iterator itr = OnProc.begin(); itr != OnProc.end(); ++itr)
|
||||
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
|
||||
sLog->outError("Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
LOG_ERROR("server", "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `OnProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
|
||||
for (std::list<AuraProcHandler>::iterator itr = AfterProc.begin(); itr != AfterProc.end(); ++itr)
|
||||
if (!entry->HasEffect(SPELL_EFFECT_APPLY_AURA) && !entry->HasAreaAuraEffect())
|
||||
sLog->outError("Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
LOG_ERROR("server", "Spell `%u` of script `%s` does not have apply aura effect - handler bound to hook `AfterProc` of AuraScript won't be executed", entry->Id, m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectProcHandler>::iterator itr = OnEffectProc.begin(); itr != OnEffectProc.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `OnEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
for (std::list<EffectProcHandler>::iterator itr = AfterEffectProc.begin(); itr != AfterEffectProc.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
sLog->outError("Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
LOG_ERROR("server", "Spell `%u` Effect `%s` of script `%s` did not match dbc effect data - handler bound to hook `AfterEffectProc` of AuraScript won't be executed", entry->Id, (*itr).ToString().c_str(), m_scriptName->c_str());
|
||||
|
||||
return _SpellScript::_Validate(entry);
|
||||
}
|
||||
@@ -967,7 +967,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);
|
||||
LOG_ERROR("server", "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;
|
||||
}
|
||||
}
|
||||
@@ -1154,7 +1154,7 @@ Unit* AuraScript::GetTarget() const
|
||||
case AURA_SCRIPT_HOOK_EFFECT_AFTER_PROC:
|
||||
return m_auraApplication->GetTarget();
|
||||
default:
|
||||
sLog->outError("TSCR: Script: `%s` Spell: `%u` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
LOG_ERROR("server", "TSCR: Script: `%s` Spell: `%u` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user