mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
chore(Core/Logging): replace most server loggers (#5726)
* chore(Core/Logging): replace most server loggers Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
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;
|
||||
LOG_ERROR("server", "Aura %d structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId());
|
||||
LOG_ERROR("spells.aura.effect", "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:
|
||||
LOG_ERROR("server", "Auras: Unknown Shapeshift Type: %u", GetMiscValue());
|
||||
LOG_ERROR("spells.aura.effect", "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 ^_^
|
||||
LOG_ERROR("server", "Auras: unknown creature id = %d (only need its modelid) From Spell Aura Transform in Spell ID = %d", GetMiscValue(), GetId());
|
||||
LOG_ERROR("spells.aura.effect", "Auras: unknown creature id = %d (only need its modelid) From Spell Aura Transform in Spell ID = %d", GetMiscValue(), GetId());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4004,7 +4004,7 @@ void AuraEffect::HandleAuraModStat(AuraApplication const* aurApp, uint8 mode, bo
|
||||
|
||||
if (GetMiscValue() < -2 || GetMiscValue() > 4)
|
||||
{
|
||||
LOG_ERROR("server", "WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue());
|
||||
LOG_ERROR("spells.aura.effect", "WARNING: Spell %u effect %u has an unsupported misc value (%i) for SPELL_AURA_MOD_STAT ", GetId(), GetEffIndex(), GetMiscValue());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4030,7 +4030,7 @@ void AuraEffect::HandleModPercentStat(AuraApplication const* aurApp, uint8 mode,
|
||||
|
||||
if (GetMiscValue() < -1 || GetMiscValue() > 4)
|
||||
{
|
||||
LOG_ERROR("server", "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
|
||||
LOG_ERROR("spells.aura.effect", "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4128,7 +4128,7 @@ void AuraEffect::HandleModTotalPercentStat(AuraApplication const* aurApp, uint8
|
||||
|
||||
if (GetMiscValue() < -1 || GetMiscValue() > 4)
|
||||
{
|
||||
LOG_ERROR("server", "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
|
||||
LOG_ERROR("spells.aura.effect", "WARNING: Misc Value for SPELL_AURA_MOD_PERCENT_STAT not valid");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4191,7 +4191,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.
|
||||
LOG_ERROR("server", "Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!");
|
||||
LOG_ERROR("spells.aura.effect", "Aura SPELL_AURA_MOD_RESISTANCE_OF_STAT_PERCENT(182) does not work for non-armor type resistances!");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6142,9 +6142,7 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
|
||||
triggerFlags = TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST);
|
||||
|
||||
triggerCaster->CastSpell(targets, triggeredSpellInfo, nullptr, triggerFlags, nullptr, this);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandlePeriodicTriggerSpellAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6168,9 +6166,7 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
|
||||
values.AddSpellMod(SPELLVALUE_BASE_POINT0, GetAmount());
|
||||
|
||||
triggerCaster->CastSpell(targets, triggeredSpellInfo, &values, TRIGGERED_FULL_MASK, nullptr, this);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick: Spell %u Trigger %u", GetId(), triggeredSpellInfo->Id);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -6180,9 +6176,7 @@ void AuraEffect::HandlePeriodicTriggerSpellWithValueAuraTick(Unit* target, Unit*
|
||||
if (c && caster)
|
||||
sEluna->OnDummyEffect(caster, GetId(), SpellEffIndex(GetEffIndex()), target->ToCreature());
|
||||
#endif
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6300,10 +6294,8 @@ 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)
|
||||
LOG_DEBUG("server", "PeriodicTick: %s attacked %s for %u dmg inflicted by %u abs is %u",
|
||||
LOG_DEBUG("spells.aura.effect", "PeriodicTick: %s attacked %s for %u dmg inflicted by %u abs is %u",
|
||||
GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), damage, GetId(), absorb);
|
||||
#endif
|
||||
Unit::DealDamageMods(target, damage, &absorb);
|
||||
|
||||
// Auras reducing damage from AOE spells
|
||||
@@ -6396,10 +6388,8 @@ void AuraEffect::HandlePeriodicHealthLeechAuraTick(Unit* target, Unit* caster) c
|
||||
if (target->GetHealth() < damage)
|
||||
damage = target->GetHealth();
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("server", "PeriodicTick: %s health leech of %s for %u dmg inflicted by %u abs is %u",
|
||||
LOG_DEBUG("spells.aura.effect", "PeriodicTick: %s health leech of %s for %u dmg inflicted by %u abs is %u",
|
||||
GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), damage, GetId(), absorb);
|
||||
#endif
|
||||
if (caster)
|
||||
caster->SendSpellNonMeleeDamageLog(target, GetId(), damage + absorb + resist, GetSpellInfo()->GetSchoolMask(), absorb, resist, false, 0, crit);
|
||||
|
||||
@@ -6440,9 +6430,7 @@ void AuraEffect::HandlePeriodicHealthFunnelAuraTick(Unit* target, Unit* caster)
|
||||
return;
|
||||
|
||||
caster->ModifyHealth(-(int32)damage);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "PeriodicTick: donator %u target %u damage %u.", caster->GetEntry(), target->GetEntry(), damage);
|
||||
#endif
|
||||
|
||||
float gainMultiplier = GetSpellInfo()->Effects[GetEffIndex()].CalcValueMultiplier(caster);
|
||||
|
||||
@@ -6543,10 +6531,8 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
|
||||
if ((crit = roll_chance_f(GetCritChance())))
|
||||
damage = Unit::SpellCriticalHealingBonus(caster, GetSpellInfo(), damage, target);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("server", "PeriodicTick: %s heal of %s for %u health inflicted by %u",
|
||||
LOG_DEBUG("spells.aura.effect", "PeriodicTick: %s heal of %s for %u health inflicted by %u",
|
||||
GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), damage, GetId());
|
||||
#endif
|
||||
uint32 absorb = 0;
|
||||
uint32 heal = uint32(damage);
|
||||
|
||||
@@ -6625,10 +6611,8 @@ void AuraEffect::HandlePeriodicManaLeechAuraTick(Unit* target, Unit* caster) con
|
||||
drainAmount = maxmana;
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("server", "PeriodicTick: %s power leech of %s for %u dmg inflicted by %u",
|
||||
LOG_DEBUG("spells.aura.effect", "PeriodicTick: %s power leech of %s for %u dmg inflicted by %u",
|
||||
GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), drainAmount, GetId());
|
||||
#endif
|
||||
// resilience reduce mana draining effect at spell crit damage reduction (added in 2.4)
|
||||
if (PowerType == POWER_MANA)
|
||||
drainAmount -= target->GetSpellCritDamageReduction(drainAmount);
|
||||
@@ -6692,10 +6676,8 @@ 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)
|
||||
LOG_DEBUG("server", "PeriodicTick: %s energize %s for %u dmg inflicted by %u",
|
||||
LOG_DEBUG("spells.aura.effect", "PeriodicTick: %s energize %s for %u dmg inflicted by %u",
|
||||
GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), amount, GetId());
|
||||
#endif
|
||||
SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f, false);
|
||||
target->SendPeriodicAuraLog(&pInfo);
|
||||
|
||||
@@ -6731,10 +6713,8 @@ void AuraEffect::HandlePeriodicEnergizeAuraTick(Unit* target, Unit* caster) cons
|
||||
SpellPeriodicAuraLogInfo pInfo(this, amount, 0, 0, 0, 0.0f, false);
|
||||
target->SendPeriodicAuraLog(&pInfo);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("server", "PeriodicTick: %s energize %s for %u dmg inflicted by %u",
|
||||
LOG_DEBUG("spells.aura.effect", "PeriodicTick: %s energize %s for %u dmg inflicted by %u",
|
||||
GetCasterGUID().ToString().c_str(), target->GetGUID().ToString().c_str(), amount, GetId());
|
||||
#endif
|
||||
int32 gain = target->ModifyPower(PowerType, amount);
|
||||
|
||||
if (caster)
|
||||
@@ -6794,16 +6774,12 @@ void AuraEffect::HandleProcTriggerSpellAuraProc(AuraApplication* aurApp, ProcEve
|
||||
uint32 triggerSpellId = GetSpellInfo()->Effects[GetEffIndex()].TriggerSpell;
|
||||
if (SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(triggerSpellId))
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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)
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6819,16 +6795,12 @@ void AuraEffect::HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp
|
||||
(void)triggeredSpellInfo;
|
||||
|
||||
int32 basepoints0 = GetAmount();
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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)
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6842,9 +6814,7 @@ void AuraEffect::HandleProcTriggerDamageAuraProc(AuraApplication* aurApp, ProcEv
|
||||
target->CalculateSpellDamageTaken(&damageInfo, damage, GetSpellInfo());
|
||||
Unit::DealDamageMods(damageInfo.target, damageInfo.damage, &damageInfo.absorb);
|
||||
target->SendSpellNonMeleeDamageLog(&damageInfo);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleProcTriggerDamageAuraProc: Triggering %u spell damage from aura %u proc", damage, GetId());
|
||||
#endif
|
||||
target->DealSpellDamage(&damageInfo, true);
|
||||
}
|
||||
|
||||
@@ -6866,9 +6836,7 @@ void AuraEffect::HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcE
|
||||
triggerSpellId = 43594;
|
||||
break;
|
||||
default:
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleRaidProcFromChargeAuraProc: received not handled spell: %u", GetId());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6894,9 +6862,7 @@ void AuraEffect::HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcE
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleRaidProcFromChargeAuraProc: Triggering spell %u from aura %u proc", triggerSpellId, GetId());
|
||||
#endif
|
||||
target->CastSpell(target, triggerSpellId, true, nullptr, this, GetCasterGUID());
|
||||
}
|
||||
|
||||
@@ -6907,9 +6873,7 @@ void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurA
|
||||
// Currently only Prayer of Mending
|
||||
if (!(GetSpellInfo()->SpellFamilyName == SPELLFAMILY_PRIEST && GetSpellInfo()->SpellFamilyFlags[1] & 0x20))
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "AuraEffect::HandleRaidProcFromChargeWithValueAuraProc: received not handled spell: %u", GetId());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
uint32 triggerSpellId = 33110;
|
||||
@@ -6938,8 +6902,6 @@ void AuraEffect::HandleRaidProcFromChargeWithValueAuraProc(AuraApplication* aurA
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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());
|
||||
}
|
||||
|
||||
@@ -65,15 +65,11 @@ AuraApplication::AuraApplication(Unit* target, Unit* caster, Aura* aura, uint8 e
|
||||
_slot = slot;
|
||||
GetTarget()->SetVisibleAura(slot, this);
|
||||
SetNeedClientUpdate();
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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)
|
||||
LOG_ERROR("server", "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
|
||||
#endif
|
||||
LOG_ERROR("spells.aura", "Aura: %u Effect: %d could not find empty unit visible slot", GetBase()->GetId(), GetEffectMask());
|
||||
}
|
||||
}
|
||||
_InitFlags(caster, effMask);
|
||||
@@ -152,9 +148,7 @@ void AuraApplication::_HandleEffect(uint8 effIndex, bool apply)
|
||||
ASSERT(aurEff);
|
||||
ASSERT(HasEffect(effIndex) == (!apply));
|
||||
ASSERT((1 << effIndex) & _effectsToApply);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "AuraApplication::_HandleEffect: %u, apply: %u: amount: %u", aurEff->GetAuraType(), apply, aurEff->GetAmount());
|
||||
#endif
|
||||
|
||||
if (apply)
|
||||
{
|
||||
@@ -504,7 +498,7 @@ void Aura::_UnapplyForTarget(Unit* target, Unit* caster, AuraApplication* auraAp
|
||||
// TODO: Figure out why this happens
|
||||
if (itr == m_applications.end())
|
||||
{
|
||||
LOG_ERROR("server", "Aura::_UnapplyForTarget, target:%s, caster:%s, spell:%u was not found in owners application map!",
|
||||
LOG_ERROR("spells.aura", "Aura::_UnapplyForTarget, target:%s, caster:%s, spell:%u was not found in owners application map!",
|
||||
target->GetGUID().ToString().c_str(), caster ? caster->GetGUID().ToString().c_str() : "", auraApp->GetBase()->GetSpellInfo()->Id);
|
||||
ABORT();
|
||||
}
|
||||
@@ -670,7 +664,7 @@ void Aura::UpdateTargetMap(Unit* caster, bool apply)
|
||||
if (!GetOwner()->IsSelfOrInSameMap(itr->first))
|
||||
{
|
||||
//TODO: There is a crash caused by shadowfiend load addon
|
||||
LOG_FATAL("server", "Aura %u: Owner %s (map %u) is not in the same map as target %s (map %u).", GetSpellInfo()->Id,
|
||||
LOG_FATAL("spells.aura", "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();
|
||||
@@ -1352,7 +1346,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
spellId = 57531;
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("server", "Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
|
||||
LOG_ERROR("spells.aura", "Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
|
||||
}
|
||||
if (spellId)
|
||||
caster->CastSpell(caster, spellId, true);
|
||||
@@ -1477,7 +1471,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
spellId = 50508;
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("server", "Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId());
|
||||
LOG_ERROR("spells.aura", "Aura::HandleAuraSpecificMods: Unknown rank of Crypt Fever/Ebon Plague (%d) found", aurEff->GetId());
|
||||
}
|
||||
caster->CastSpell(target, spellId, true, 0, GetEffect(0));
|
||||
}
|
||||
@@ -1593,7 +1587,7 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
|
||||
spellId = 60946;
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("server", "Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
|
||||
LOG_ERROR("spells.aura", "Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
|
||||
}
|
||||
if (spellId)
|
||||
caster->CastSpell(target, spellId, true);
|
||||
@@ -2228,9 +2222,7 @@ void Aura::LoadScripts()
|
||||
m_loadedScripts.erase(bitr);
|
||||
continue;
|
||||
}
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -509,25 +509,25 @@ void SpellCastTargets::Update(Unit* caster)
|
||||
void SpellCastTargets::OutDebug() const
|
||||
{
|
||||
if (!m_targetMask)
|
||||
LOG_INFO("server", "No targets");
|
||||
LOG_INFO("spells", "No targets");
|
||||
|
||||
LOG_INFO("server", "target mask: %u", m_targetMask);
|
||||
LOG_INFO("spells", "target mask: %u", m_targetMask);
|
||||
if (m_targetMask & (TARGET_FLAG_UNIT_MASK | TARGET_FLAG_CORPSE_MASK | TARGET_FLAG_GAMEOBJECT_MASK))
|
||||
LOG_INFO("server", "Object target: %s", m_objectTargetGUID.ToString().c_str());
|
||||
LOG_INFO("spells", "Object target: %s", m_objectTargetGUID.ToString().c_str());
|
||||
if (m_targetMask & TARGET_FLAG_ITEM)
|
||||
LOG_INFO("server", "Item target: %s", m_itemTargetGUID.ToString().c_str());
|
||||
LOG_INFO("spells", "Item target: %s", m_itemTargetGUID.ToString().c_str());
|
||||
if (m_targetMask & TARGET_FLAG_TRADE_ITEM)
|
||||
LOG_INFO("server", "Trade item target: %s", m_itemTargetGUID.ToString().c_str());
|
||||
LOG_INFO("spells", "Trade item target: %s", m_itemTargetGUID.ToString().c_str());
|
||||
if (m_targetMask & TARGET_FLAG_SOURCE_LOCATION)
|
||||
LOG_INFO("server", "Source location: transport guid: %s trans offset: %s position: %s",
|
||||
LOG_INFO("spells", "Source location: transport guid: %s trans offset: %s position: %s",
|
||||
m_src._transportGUID.ToString().c_str(), m_src._transportOffset.ToString().c_str(), m_src._position.ToString().c_str());
|
||||
if (m_targetMask & TARGET_FLAG_DEST_LOCATION)
|
||||
LOG_INFO("server", "Destination location: transport guid: %s trans offset: %s position: %s",
|
||||
LOG_INFO("spells", "Destination location: transport guid: %s trans offset: %s position: %s",
|
||||
m_dst._transportGUID.ToString().c_str(), m_dst._transportOffset.ToString().c_str(), m_dst._position.ToString().c_str());
|
||||
if (m_targetMask & TARGET_FLAG_STRING)
|
||||
LOG_INFO("server", "String: %s", m_strTarget.c_str());
|
||||
LOG_INFO("server", "speed: %f", m_speed);
|
||||
LOG_INFO("server", "elevation: %f", m_elevation);
|
||||
LOG_INFO("spells", "String: %s", m_strTarget.c_str());
|
||||
LOG_INFO("spells", "speed: %f", m_speed);
|
||||
LOG_INFO("spells", "elevation: %f", m_elevation);
|
||||
}
|
||||
|
||||
SpellValue::SpellValue(SpellInfo const* proto)
|
||||
@@ -675,7 +675,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.
|
||||
LOG_ERROR("server", "SPELL: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id);
|
||||
LOG_ERROR("spells", "SPELL: deleting spell for spell ID %u. However, spell still referenced.", m_spellInfo->Id);
|
||||
*m_selfContainer = nullptr;
|
||||
}
|
||||
|
||||
@@ -979,9 +979,7 @@ void Spell::SelectEffectImplicitTargets(SpellEffIndex effIndex, SpellImplicitTar
|
||||
}
|
||||
break;
|
||||
case TARGET_SELECT_CATEGORY_NYI:
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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:
|
||||
ASSERT(false && "Spell::SelectEffectImplicitTargets: received not implemented select target category");
|
||||
@@ -1012,9 +1010,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "SPELL: cannot find channel spell target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1034,9 +1030,7 @@ void Spell::SelectImplicitChannelTargets(SpellEffIndex effIndex, SpellImplicitTa
|
||||
}
|
||||
else //if (!m_targets.HasDst())
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "SPELL: cannot find channel spell destination for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case TARGET_DEST_CHANNEL_CASTER:
|
||||
@@ -1083,9 +1077,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
|
||||
// handle emergency case - try to use other provided targets if no conditions provided
|
||||
if (targetType.GetCheckType() == TARGET_CHECK_ENTRY && (!condList || condList->empty()))
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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())
|
||||
{
|
||||
case TARGET_OBJECT_TYPE_GOBJ:
|
||||
@@ -1112,9 +1104,7 @@ void Spell::SelectImplicitNearbyTargets(SpellEffIndex effIndex, SpellImplicitTar
|
||||
WorldObject* target = SearchNearbyTarget(range, targetType.GetObjectType(), targetType.GetCheckType(), condList);
|
||||
if (!target)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "Spell::SelectImplicitNearbyTargets: cannot find nearby target for spell ID %u, effect %u", m_spellInfo->Id, effIndex);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1317,9 +1307,7 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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);
|
||||
}
|
||||
@@ -1637,7 +1625,8 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
|
||||
float a = (srcToDestDelta - dist2d * b) / (dist2d * dist2d);
|
||||
if (a > -0.0001f)
|
||||
a = 0;
|
||||
DEBUG_TRAJ(LOG_ERROR("server", "Spell::SelectTrajTargets: a %f b %f", a, b);)
|
||||
|
||||
LOG_ERROR("spells", "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;
|
||||
@@ -1656,11 +1645,14 @@ 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(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);)
|
||||
LOG_ERROR("spells", "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(LOG_ERROR("server", "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)
|
||||
|
||||
LOG_ERROR("spells", "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);
|
||||
|
||||
if (dist < bestDist && height < dz + size && height > dz - size)
|
||||
{
|
||||
bestDist = dist > 0 ? dist : 0;
|
||||
@@ -1668,7 +1660,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
|
||||
}
|
||||
|
||||
#define CHECK_DIST {\
|
||||
DEBUG_TRAJ(LOG_ERROR("server", "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);)\
|
||||
LOG_ERROR("spells", "Spell::SelectTrajTargets: dist %f, height %f.", dist, height);\
|
||||
if (dist > bestDist)\
|
||||
continue;\
|
||||
if (dist < objDist2d + size && dist > objDist2d - size)\
|
||||
@@ -1744,7 +1736,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
|
||||
float distSq = (*itr)->GetExactDistSq(x, y, z);
|
||||
float sizeSq = (*itr)->GetObjectSize();
|
||||
sizeSq *= sizeSq;
|
||||
DEBUG_TRAJ(LOG_ERROR("server", "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
|
||||
LOG_ERROR("spells", "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);
|
||||
if (distSq > sizeSq)
|
||||
{
|
||||
float factor = 1 - sqrt(sizeSq / distSq);
|
||||
@@ -1753,7 +1745,7 @@ void Spell::SelectImplicitTrajTargets(SpellEffIndex effIndex, SpellImplicitTarge
|
||||
z += factor * ((*itr)->GetPositionZ() - z);
|
||||
|
||||
distSq = (*itr)->GetExactDistSq(x, y, z);
|
||||
DEBUG_TRAJ(LOG_ERROR("server", "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);)
|
||||
LOG_ERROR("spells", "Initial %f %f %f %f %f", x, y, z, distSq, sizeSq);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2987,9 +2979,7 @@ void Spell::DoTriggersOnSpellHit(Unit* unit, uint8 effMask)
|
||||
if (CanExecuteTriggersOnHit(effMask, i->triggeredByAura) && roll_chance_i(i->chance))
|
||||
{
|
||||
m_caster->CastSpell(unit, i->triggeredSpell, true);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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
|
||||
// set duration of current aura to the triggered spell
|
||||
@@ -3338,9 +3328,7 @@ SpellCastResult Spell::prepare(SpellCastTargets const* targets, AuraEffect const
|
||||
// set timer base at cast time
|
||||
ReSetTimer();
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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
|
||||
//TODO:Apply this to all casted spells if needed
|
||||
@@ -3942,9 +3930,7 @@ void Spell::update(uint32 difftime)
|
||||
|
||||
if (m_targets.GetUnitTargetGUID() && !m_targets.GetUnitTarget())
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "Spell %u is cancelled due to removal of target.", m_spellInfo->Id);
|
||||
#endif
|
||||
cancel();
|
||||
return;
|
||||
}
|
||||
@@ -4002,9 +3988,7 @@ void Spell::update(uint32 difftime)
|
||||
// Xinef: so the aura can be removed in different updates for all units
|
||||
else if ((m_timer < 0 || m_timer > 300) && !UpdateChanneledTargetList())
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "Channeled spell %d is removed due to lack of targets", m_spellInfo->Id);
|
||||
#endif
|
||||
SendChannelUpdate(0);
|
||||
finish();
|
||||
}
|
||||
@@ -4068,9 +4052,7 @@ void Spell::finish(bool ok)
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell);
|
||||
if (spellInfo && spellInfo->SpellIconID == 2056)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "Statue %s is unsummoned in spell %d finish", m_caster->GetGUID().ToString().c_str(), m_spellInfo->Id);
|
||||
#endif
|
||||
m_caster->setDeathState(JUST_DIED);
|
||||
return;
|
||||
}
|
||||
@@ -4761,7 +4743,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
|
||||
LOG_ERROR("server", "Cast item has no item prototype %s", m_CastItem->GetGUID().ToString().c_str());
|
||||
LOG_ERROR("spells", "Cast item has no item prototype %s", m_CastItem->GetGUID().ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4857,7 +4839,7 @@ void Spell::TakePower()
|
||||
|
||||
if (PowerType >= MAX_POWERS)
|
||||
{
|
||||
LOG_ERROR("server", "Spell::TakePower: Unknown power type '%d'", PowerType);
|
||||
LOG_ERROR("spells", "Spell::TakePower: Unknown power type '%d'", PowerType);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5116,9 +5098,7 @@ void Spell::HandleThreatSpells()
|
||||
else if (!m_spellInfo->_IsPositiveSpell() && !IsFriendly && target->CanHaveThreatList())
|
||||
target->AddThreat(m_caster, threatToAdd, m_spellInfo->GetSchoolMask(), m_spellInfo);
|
||||
}
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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
|
||||
}
|
||||
|
||||
void Spell::HandleEffects(Unit* pUnitTarget, Item* pItemTarget, GameObject* pGOTarget, uint32 i, SpellEffectHandleMode mode)
|
||||
@@ -5131,9 +5111,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)
|
||||
LOG_DEBUG("spells.aura", "Spell: %u Effect : %u", m_spellInfo->Id, eff);
|
||||
#endif
|
||||
|
||||
// we do not need DamageMultiplier here.
|
||||
damage = CalculateSpellDamage(i, nullptr);
|
||||
@@ -6508,7 +6486,7 @@ SpellCastResult Spell::CheckPower()
|
||||
// Check valid power type
|
||||
if (m_spellInfo->PowerType >= MAX_POWERS)
|
||||
{
|
||||
LOG_ERROR("server", "Spell::CheckPower: Unknown power type '%d'", m_spellInfo->PowerType);
|
||||
LOG_ERROR("spells", "Spell::CheckPower: Unknown power type '%d'", m_spellInfo->PowerType);
|
||||
return SPELL_FAILED_UNKNOWN;
|
||||
}
|
||||
|
||||
@@ -7145,9 +7123,7 @@ void Spell::Delayed() // only called in DealDamage()
|
||||
else
|
||||
m_timer += delaytime;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("server", "Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime);
|
||||
#endif
|
||||
LOG_DEBUG("spells", "Spell %u partially interrupted for (%d) ms at damage", m_spellInfo->Id, delaytime);
|
||||
|
||||
WorldPacket data(SMSG_SPELL_DELAYED, 8 + 4);
|
||||
data << m_caster->GetPackGUID();
|
||||
@@ -7185,9 +7161,7 @@ void Spell::DelayedChannel()
|
||||
else
|
||||
m_timer -= delaytime;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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)
|
||||
if ((*ihit).missCondition == SPELL_MISS_NONE)
|
||||
@@ -7443,7 +7417,7 @@ SpellEvent::~SpellEvent()
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR("server", "~SpellEvent: %s %s tried to delete non-deletable spell %u. Was not deleted, causes memory leak.",
|
||||
LOG_ERROR("spells", "~SpellEvent: %s %s tried to delete non-deletable spell %u. Was not deleted, causes memory leak.",
|
||||
(m_Spell->GetCaster()->GetTypeId() == TYPEID_PLAYER ? "Player" : "Creature"), m_Spell->GetCaster()->GetGUID().ToString().c_str(), m_Spell->m_spellInfo->Id);
|
||||
ABORT();
|
||||
}
|
||||
@@ -7841,9 +7815,7 @@ void Spell::LoadScripts()
|
||||
m_loadedScripts.erase(bitr);
|
||||
continue;
|
||||
}
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -225,9 +225,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS] =
|
||||
|
||||
void Spell::EffectNULL(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "WORLD: Spell Effect DUMMY");
|
||||
#endif
|
||||
}
|
||||
|
||||
void Spell::EffectUnused(SpellEffIndex /*effIndex*/)
|
||||
@@ -769,9 +767,7 @@ void Spell::EffectDummy(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
// normal DB scripted effect
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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
|
||||
if (gameObjTarget)
|
||||
@@ -917,9 +913,7 @@ void Spell::EffectTriggerSpell(SpellEffIndex effIndex)
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id);
|
||||
if (!spellInfo)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "Spell::EffectTriggerSpell spell %u tried to trigger unknown spell %u", m_spellInfo->Id, triggered_spell_id);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -975,9 +969,7 @@ void Spell::EffectTriggerMissileSpell(SpellEffIndex effIndex)
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(triggered_spell_id);
|
||||
if (!spellInfo)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "Spell::EffectTriggerMissileSpell spell %u tried to trigger unknown spell %u", m_spellInfo->Id, triggered_spell_id);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1033,7 +1025,7 @@ void Spell::EffectForceCast(SpellEffIndex effIndex)
|
||||
|
||||
if (!spellInfo)
|
||||
{
|
||||
LOG_ERROR("server", "Spell::EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
|
||||
LOG_ERROR("spells.effect", "Spell::EffectForceCast of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1082,7 +1074,7 @@ void Spell::EffectTriggerRitualOfSummoning(SpellEffIndex effIndex)
|
||||
|
||||
if (!spellInfo)
|
||||
{
|
||||
LOG_ERROR("server", "EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
|
||||
LOG_ERROR("spells.effect", "EffectTriggerRitualOfSummoning of spell %u: triggering unknown spell id %i", m_spellInfo->Id, triggered_spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1207,7 +1199,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
|
||||
// If not exist data for dest location - return
|
||||
if (!m_targets.HasDst())
|
||||
{
|
||||
LOG_ERROR("server", "Spell::EffectTeleportUnits - does not have destination for spell ID %u\n", m_spellInfo->Id);
|
||||
LOG_ERROR("spells.effect", "Spell::EffectTeleportUnits - does not have destination for spell ID %u\n", m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1219,9 +1211,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
|
||||
destTarget->GetPosition(x, y, z, orientation);
|
||||
if (!orientation && m_targets.GetUnitTarget())
|
||||
orientation = m_targets.GetUnitTarget()->GetOrientation();
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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())
|
||||
{
|
||||
@@ -1239,7 +1229,7 @@ void Spell::EffectTeleportUnits(SpellEffIndex /*effIndex*/)
|
||||
unitTarget->ToPlayer()->TeleportTo(mapid, x, y, z, orientation, unitTarget == m_caster ? TELE_TO_SPELL : 0);
|
||||
else
|
||||
{
|
||||
LOG_ERROR("server", "Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id);
|
||||
LOG_ERROR("spells.effect", "Spell::EffectTeleportUnits - spellId %u attempted to teleport creature to a different map.", m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1374,10 +1364,8 @@ void Spell::EffectUnlearnSpecialization(SpellEffIndex effIndex)
|
||||
uint32 spellToUnlearn = m_spellInfo->Effects[effIndex].TriggerSpell;
|
||||
|
||||
player->removeSpell(spellToUnlearn, SPEC_MASK_ALL, false);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "Spell: Player %s has unlearned spell %u from Npc: %s",
|
||||
player->GetGUID().ToString().c_str(), spellToUnlearn, m_caster->GetGUID().ToString().c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
void Spell::EffectPowerDrain(SpellEffIndex effIndex)
|
||||
@@ -1449,9 +1437,7 @@ void Spell::EffectSendEvent(SpellEffIndex effIndex)
|
||||
// TODO: there should be a possibility to pass dest target to event script
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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())
|
||||
zoneScript->ProcessEvent(target, m_spellInfo->Effects[effIndex].MiscValue);
|
||||
@@ -1566,7 +1552,7 @@ void Spell::EffectHeal(SpellEffIndex /*effIndex*/)
|
||||
|
||||
if (!targetAura)
|
||||
{
|
||||
LOG_ERROR("server", "Target(%s) has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID().ToString().c_str());
|
||||
LOG_ERROR("spells.effect", "Target(%s) has aurastate AURA_STATE_SWIFTMEND but no matching aura.", unitTarget->GetGUID().ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1656,9 +1642,7 @@ void Spell::EffectHealthLeech(SpellEffIndex /*effIndex*/)
|
||||
damage = m_caster->SpellDamageBonusDone(unitTarget, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE);
|
||||
damage = unitTarget->SpellDamageBonusTaken(m_caster, m_spellInfo, uint32(damage), SPELL_DIRECT_DAMAGE);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "HealthLeech :%i", damage);
|
||||
#endif
|
||||
|
||||
// xinef: handled in spell.cpp
|
||||
//float healMultiplier = m_spellInfo->Effects[effIndex].CalcValueMultiplier(m_originalCaster, this);
|
||||
@@ -2041,10 +2025,8 @@ void Spell::SendLoot(ObjectGuid guid, LootType loottype)
|
||||
// Players shouldn't be able to loot gameobjects that are currently despawned
|
||||
if (!gameObjTarget->isSpawned() && !player->IsGameMaster())
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_ERROR("server", "Possible hacking attempt: Player %s [%s] tried to loot a gameobject [%s] which is on respawn time without being in GM mode!",
|
||||
LOG_ERROR("spells.effect", "Possible hacking attempt: Player %s [%s] tried to loot a gameobject [%s] which is on respawn time without being in GM mode!",
|
||||
player->GetName().c_str(), player->GetGUID().ToString().c_str(), gameObjTarget->GetGUID().ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
// special case, already has GossipHello inside so return and avoid calling twice
|
||||
@@ -2105,9 +2087,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
|
||||
|
||||
if (m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "WORLD: Open Lock - No Player Caster!");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2165,9 +2145,7 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "WORLD: Open Lock - No GameObject/Item Target!");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2353,7 +2331,7 @@ void Spell::EffectSummonType(SpellEffIndex effIndex)
|
||||
SummonPropertiesEntry const* properties = sSummonPropertiesStore.LookupEntry(m_spellInfo->Effects[effIndex].MiscValueB);
|
||||
if (!properties)
|
||||
{
|
||||
LOG_ERROR("server", "EffectSummonType: Unhandled summon type %u", m_spellInfo->Effects[effIndex].MiscValueB);
|
||||
LOG_ERROR("spells.effect", "EffectSummonType: Unhandled summon type %u", m_spellInfo->Effects[effIndex].MiscValueB);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2568,10 +2546,8 @@ void Spell::EffectLearnSpell(SpellEffIndex effIndex)
|
||||
uint32 spellToLearn = (m_spellInfo->Id == 483 || m_spellInfo->Id == 55884) ? damage : m_spellInfo->Effects[effIndex].TriggerSpell;
|
||||
player->learnSpell(spellToLearn);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "Spell: Player %s has learned spell %u from Npc %s",
|
||||
player->GetGUID().ToString().c_str(), spellToLearn, m_caster->GetGUID().ToString().c_str());
|
||||
#endif
|
||||
}
|
||||
|
||||
typedef std::list<std::pair<uint32, ObjectGuid>> DispelList;
|
||||
@@ -2814,10 +2790,8 @@ void Spell::EffectAddHonor(SpellEffIndex /*effIndex*/)
|
||||
if (m_CastItem)
|
||||
{
|
||||
unitTarget->ToPlayer()->RewardHonor(nullptr, 1, damage / 10, false);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "SpellEffect::AddHonor (spell_id %u) rewards %d honor points (item %u) for player: %s",
|
||||
m_spellInfo->Id, damage / 10, m_CastItem->GetEntry(), unitTarget->ToPlayer()->GetGUID().ToString().c_str());
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2826,19 +2800,15 @@ 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)
|
||||
LOG_DEBUG("spells.aura", "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (scale) to player: %s",
|
||||
m_spellInfo->Id, honor_reward, unitTarget->ToPlayer()->GetGUID().ToString().c_str());
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
//maybe we have correct honor_gain in damage already
|
||||
unitTarget->ToPlayer()->RewardHonor(nullptr, 1, damage, false);
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "SpellEffect::AddHonor (spell_id %u) rewards %u honor points (non scale) for player: %s",
|
||||
m_spellInfo->Id, damage, unitTarget->ToPlayer()->GetGUID().ToString().c_str());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2941,7 +2911,7 @@ void Spell::EffectEnchantItemPrismatic(SpellEffIndex effIndex)
|
||||
}
|
||||
if (!add_socket)
|
||||
{
|
||||
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.",
|
||||
LOG_ERROR("spells.effect", "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;
|
||||
}
|
||||
@@ -3015,14 +2985,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
|
||||
spell_id = 36760;
|
||||
break; // 20%
|
||||
default:
|
||||
LOG_ERROR("server", "Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage);
|
||||
LOG_ERROR("spells.effect", "Spell::EffectEnchantItemTmp: Damage %u not handled in S'RW", damage);
|
||||
return;
|
||||
}
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spell_id);
|
||||
if (!spellInfo)
|
||||
{
|
||||
LOG_ERROR("server", "Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id);
|
||||
LOG_ERROR("spells.effect", "Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3048,14 +3018,14 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
|
||||
|
||||
if (!enchant_id)
|
||||
{
|
||||
LOG_ERROR("server", "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have 0 as enchanting id", m_spellInfo->Id, effIndex);
|
||||
LOG_ERROR("spells.effect", "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)
|
||||
{
|
||||
LOG_ERROR("server", "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ", m_spellInfo->Id, effIndex, enchant_id);
|
||||
LOG_ERROR("spells.effect", "Spell %u Effect %u (SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) have not existed enchanting id %u ", m_spellInfo->Id, effIndex, enchant_id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4153,7 +4123,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
spell_heal = 48085;
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("server", "Unknown Lightwell spell caster %u", m_caster->GetEntry());
|
||||
LOG_ERROR("spells.effect", "Unknown Lightwell spell caster %u", m_caster->GetEntry());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4252,9 +4222,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
}
|
||||
|
||||
// normal DB scripted effect
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -5615,9 +5583,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
|
||||
ExecuteLogEffectSummonObject(effIndex, pGameObj);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("server", "AddObject at SpellEfects.cpp EffectTransmitted");
|
||||
#endif
|
||||
LOG_DEBUG("spells.effect", "AddObject at SpellEfects.cpp EffectTransmitted");
|
||||
//m_caster->AddGameObject(pGameObj);
|
||||
//m_ObjToDel.push_back(pGameObj);
|
||||
|
||||
@@ -5701,9 +5667,7 @@ void Spell::EffectSkill(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT)
|
||||
return;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "WORLD: SkillEFFECT");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* There is currently no need for this effect. We handle it in Battleground.cpp
|
||||
@@ -5734,9 +5698,7 @@ void Spell::EffectSkinPlayerCorpse(SpellEffIndex /*effIndex*/)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "Effect: SkinPlayerCorpse");
|
||||
#endif
|
||||
if ((m_caster->GetTypeId() != TYPEID_PLAYER) || (unitTarget->GetTypeId() != TYPEID_PLAYER) || (unitTarget->IsAlive()))
|
||||
return;
|
||||
|
||||
@@ -5748,9 +5710,7 @@ void Spell::EffectStealBeneficialBuff(SpellEffIndex effIndex)
|
||||
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
return;
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "Effect: StealBeneficialBuff");
|
||||
#endif
|
||||
|
||||
if (!unitTarget || unitTarget == m_caster) // can't steal from self
|
||||
return;
|
||||
@@ -6227,7 +6187,7 @@ void Spell::EffectPlayMusic(SpellEffIndex effIndex)
|
||||
|
||||
if (!sSoundEntriesStore.LookupEntry(soundid))
|
||||
{
|
||||
LOG_ERROR("server", "EffectPlayMusic: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id);
|
||||
LOG_ERROR("spells.effect", "EffectPlayMusic: Sound (Id: %u) not exist in spell %u.", soundid, m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6280,7 +6240,7 @@ void Spell::EffectPlaySound(SpellEffIndex effIndex)
|
||||
|
||||
if (!sSoundEntriesStore.LookupEntry(soundId))
|
||||
{
|
||||
LOG_ERROR("server", "EffectPlayerSound: Sound (Id: %u) not exist in spell %u.", soundId, m_spellInfo->Id);
|
||||
LOG_ERROR("spells.effect", "EffectPlayerSound: Sound (Id: %u) not exist in spell %u.", soundId, m_spellInfo->Id);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6408,10 +6368,8 @@ void Spell::EffectBind(SpellEffIndex effIndex)
|
||||
data << uint32(areaId);
|
||||
player->SendDirectMessage(&data);
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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
|
||||
data.Initialize(SMSG_PLAYERBOUND, 8 + 4);
|
||||
data << m_caster->GetGUID();
|
||||
|
||||
@@ -1419,7 +1419,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
|
||||
shapeInfo = sSpellShapeshiftStore.LookupEntry(form);
|
||||
if (!shapeInfo)
|
||||
{
|
||||
LOG_ERROR("server", "GetErrorAtShapeshiftedCast: unknown shapeshift %u", form);
|
||||
LOG_ERROR("spells", "GetErrorAtShapeshiftedCast: unknown shapeshift %u", form);
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
actAsShifted = !(shapeInfo->flags1 & 1); // shapeshift acts as normal form for spells
|
||||
@@ -2347,7 +2347,7 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, S
|
||||
// Else drain all power
|
||||
if (PowerType < MAX_POWERS)
|
||||
return caster->GetPower(Powers(PowerType));
|
||||
LOG_ERROR("server", "SpellInfo::CalcPowerCost: Unknown power type '%d' in spell %d", PowerType, Id);
|
||||
LOG_ERROR("spells", "SpellInfo::CalcPowerCost: Unknown power type '%d' in spell %d", PowerType, Id);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2373,12 +2373,10 @@ int32 SpellInfo::CalcPowerCost(Unit const* caster, SpellSchoolMask schoolMask, S
|
||||
break;
|
||||
case POWER_RUNE:
|
||||
case POWER_RUNIC_POWER:
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "CalculateManaCost: Not implemented yet!");
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("server", "CalculateManaCost: Unknown power type '%d' in spell %d", PowerType, Id);
|
||||
LOG_ERROR("spells", "CalculateManaCost: Unknown power type '%d' in spell %d", PowerType, Id);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -452,14 +452,14 @@ bool SpellMgr::CheckSpellValid(SpellInfo const* spellInfo, uint32 spellId, bool
|
||||
if (!spellInfo)
|
||||
{
|
||||
DeleteSpellFromAllPlayers(spellId);
|
||||
LOG_ERROR("server", "Player::%s: Non-existed in SpellStore spell #%u request.", (isTalent ? "AddTalent" : "addSpell"), spellId);
|
||||
LOG_ERROR("spells", "Player::%s: Non-existed in SpellStore spell #%u request.", (isTalent ? "AddTalent" : "addSpell"), spellId);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!IsSpellValid(spellInfo))
|
||||
{
|
||||
DeleteSpellFromAllPlayers(spellId);
|
||||
LOG_ERROR("server", "Player::%s: Broken spell #%u learning not allowed.", (isTalent ? "AddTalent" : "addSpell"), spellId);
|
||||
LOG_ERROR("spells", "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)
|
||||
{
|
||||
LOG_ERROR("server", "SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId);
|
||||
LOG_ERROR("spells", "SpellMgr::GetSpellIdForDifficulty: Incorrect Difficulty for spell %u.", spellId);
|
||||
return spellId; //return source spell
|
||||
}
|
||||
|
||||
@@ -499,17 +499,13 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
|
||||
SpellDifficultyEntry const* difficultyEntry = sSpellDifficultyStore.LookupEntry(difficultyId);
|
||||
if (!difficultyEntry)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellIdForDifficulty: SpellDifficultyEntry not found for spell %u. This should never happen.", spellId);
|
||||
#endif
|
||||
return spellId; //return source spell
|
||||
}
|
||||
|
||||
if (difficultyEntry->SpellID[mode] <= 0 && mode > DUNGEON_DIFFICULTY_HEROIC)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellIdForDifficulty: spell %u mode %u spell is nullptr, using mode %u", spellId, mode, mode - 2);
|
||||
#endif
|
||||
mode -= 2;
|
||||
}
|
||||
|
||||
@@ -519,9 +515,7 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
|
||||
return spellId;
|
||||
}
|
||||
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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]);
|
||||
}
|
||||
|
||||
@@ -531,15 +525,11 @@ SpellInfo const* SpellMgr::GetSpellForDifficultyFromSpell(SpellInfo const* spell
|
||||
SpellInfo const* newSpell = GetSpellInfo(newSpellId);
|
||||
if (!newSpell)
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
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)
|
||||
LOG_DEBUG("spells.aura", "SpellMgr::GetSpellForDifficultyFromSpell: Spell id for instance mode is %u (original %u)", newSpell->Id, spell->Id);
|
||||
#endif
|
||||
return newSpell;
|
||||
}
|
||||
|
||||
@@ -1266,8 +1256,8 @@ void SpellMgr::LoadSpellRanks()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 spell rank records. DB table `spell_ranks` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1361,8 +1351,8 @@ void SpellMgr::LoadSpellRanks()
|
||||
} while (true);
|
||||
} while (!finished);
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u spell rank records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellRequired()
|
||||
@@ -1377,8 +1367,8 @@ void SpellMgr::LoadSpellRequired()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 spell required records. DB table `spell_required` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 spell required records. DB table `spell_required` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1426,8 +1416,8 @@ void SpellMgr::LoadSpellRequired()
|
||||
mTalentSpellAdditionalSet.insert(spellId);
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellLearnSkills()
|
||||
@@ -1464,8 +1454,8 @@ void SpellMgr::LoadSpellLearnSkills()
|
||||
}
|
||||
}
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u Spell Learn Skills from DBC in %u ms", dbc_count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellTargetPositions()
|
||||
@@ -1479,8 +1469,8 @@ void SpellMgr::LoadSpellTargetPositions()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 spell target coordinates. DB table `spell_target_position` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1565,14 +1555,12 @@ void SpellMgr::LoadSpellTargetPositions()
|
||||
if (found)
|
||||
{
|
||||
if (!sSpellMgr->GetSpellTargetPosition(i))
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
LOG_DEBUG("spells.aura", "Spell (ID: %u) does not have record in `spell_target_position`", i);
|
||||
#endif
|
||||
}
|
||||
}*/
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u spell teleport coordinates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellGroups()
|
||||
@@ -1585,8 +1573,8 @@ void SpellMgr::LoadSpellGroups()
|
||||
QueryResult result = WorldDatabase.Query("SELECT id, spell_id, special_flag FROM spell_group");
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 spell group definitions. DB table `spell_group` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 spell group definitions. DB table `spell_group` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1631,8 +1619,8 @@ void SpellMgr::LoadSpellGroups()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u spell group definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellGroupStackRules()
|
||||
@@ -1645,8 +1633,8 @@ void SpellMgr::LoadSpellGroupStackRules()
|
||||
QueryResult result = WorldDatabase.Query("SELECT group_id, stack_rule FROM spell_group_stack_rules");
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 spell group stack rules. DB table `spell_group_stack_rules` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1682,8 +1670,8 @@ void SpellMgr::LoadSpellGroupStackRules()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u spell group stack rules in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellProcEvents()
|
||||
@@ -1696,7 +1684,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)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty.");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 spell proc event conditions. DB table `spell_proc_event` is empty.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1769,8 +1757,8 @@ void SpellMgr::LoadSpellProcEvents()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u extra spell proc event conditions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellProcs()
|
||||
@@ -1783,8 +1771,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)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 spell proc conditions and data. DB table `spell_proc` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1907,8 +1895,8 @@ void SpellMgr::LoadSpellProcs()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u spell proc conditions and data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellBonusess()
|
||||
@@ -1921,8 +1909,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)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 spell bonus data. DB table `spell_bonus_data` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1948,8 +1936,8 @@ void SpellMgr::LoadSpellBonusess()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u extra spell bonus data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellThreats()
|
||||
@@ -1962,8 +1950,8 @@ void SpellMgr::LoadSpellThreats()
|
||||
QueryResult result = WorldDatabase.Query("SELECT entry, flatMod, pctMod, apPctMod FROM spell_threat");
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 aggro generating spells. DB table `spell_threat` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1989,8 +1977,8 @@ void SpellMgr::LoadSpellThreats()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u SpellThreatEntries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellMixology()
|
||||
@@ -2003,8 +1991,8 @@ void SpellMgr::LoadSpellMixology()
|
||||
QueryResult result = WorldDatabase.Query("SELECT entry, pctMod FROM spell_mixology");
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 mixology bonuses. DB table `spell_mixology` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 mixology bonuses. DB table `spell_mixology` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2025,8 +2013,8 @@ void SpellMgr::LoadSpellMixology()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u Mixology bonuses in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u Mixology bonuses in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSkillLineAbilityMap()
|
||||
@@ -2047,8 +2035,8 @@ void SpellMgr::LoadSkillLineAbilityMap()
|
||||
++count;
|
||||
}
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u SkillLineAbility MultiMap Data in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellPetAuras()
|
||||
@@ -2061,8 +2049,8 @@ void SpellMgr::LoadSpellPetAuras()
|
||||
QueryResult result = WorldDatabase.Query("SELECT spell, effectId, pet, aura FROM spell_pet_auras");
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 spell pet auras. DB table `spell_pet_auras` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2091,7 +2079,7 @@ void SpellMgr::LoadSpellPetAuras()
|
||||
(spellInfo->Effects[eff].Effect != SPELL_EFFECT_APPLY_AURA ||
|
||||
spellInfo->Effects[eff].ApplyAuraName != SPELL_AURA_DUMMY))
|
||||
{
|
||||
LOG_ERROR("server", "Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell);
|
||||
LOG_ERROR("spells", "Spell %u listed in `spell_pet_auras` does not have dummy aura or dummy effect", spell);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2109,8 +2097,8 @@ void SpellMgr::LoadSpellPetAuras()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u spell pet auras in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
// Fill custom data about enchancments
|
||||
@@ -2151,8 +2139,8 @@ void SpellMgr::LoadEnchantCustomAttr()
|
||||
}
|
||||
}
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u custom enchant attributes in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellEnchantProcData()
|
||||
@@ -2165,8 +2153,8 @@ void SpellMgr::LoadSpellEnchantProcData()
|
||||
QueryResult result = WorldDatabase.Query("SELECT entry, customChance, PPMChance, procEx FROM spell_enchant_proc_data");
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 spell enchant proc event conditions. DB table `spell_enchant_proc_data` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2195,8 +2183,8 @@ void SpellMgr::LoadSpellEnchantProcData()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u enchant proc data definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellLinked()
|
||||
@@ -2209,8 +2197,8 @@ void SpellMgr::LoadSpellLinked()
|
||||
QueryResult result = WorldDatabase.Query("SELECT spell_trigger, spell_effect, type FROM spell_linked_spell");
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 linked spells. DB table `spell_linked_spell` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2248,8 +2236,8 @@ void SpellMgr::LoadSpellLinked()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u linked spells in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadPetLevelupSpellMap()
|
||||
@@ -2305,8 +2293,8 @@ void SpellMgr::LoadPetLevelupSpellMap()
|
||||
}
|
||||
}
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u pet levelup and default spells for %u families in %u ms", count, family_count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
bool LoadPetDefaultSpells_helper(CreatureTemplate const* cInfo, PetDefaultSpellsEntry& petDefSpells)
|
||||
@@ -2389,10 +2377,10 @@ void SpellMgr::LoadPetDefaultSpells()
|
||||
}
|
||||
}
|
||||
|
||||
LOG_INFO("server", ">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded addition spells for %u pet spell data entries in %u ms", countData, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
|
||||
LOG_INFO("server", "Loading summonable creature templates...");
|
||||
LOG_INFO("server.loading", "Loading summonable creature templates...");
|
||||
oldMSTime = getMSTime();
|
||||
|
||||
// different summon spells
|
||||
@@ -2433,8 +2421,8 @@ void SpellMgr::LoadPetDefaultSpells()
|
||||
}
|
||||
}
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u summonable creature templates in %u ms", countCreature, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellAreas()
|
||||
@@ -2451,8 +2439,8 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
if (!result)
|
||||
{
|
||||
LOG_INFO("server", ">> Loaded 0 spell area requirements. DB table `spell_area` is empty.");
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 spell area requirements. DB table `spell_area` is empty.");
|
||||
LOG_INFO("server.loading", " ");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2624,28 +2612,28 @@ void SpellMgr::LoadSpellAreas()
|
||||
|
||||
if (sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE) > 0)
|
||||
{
|
||||
LOG_INFO("server", ">> Using ICC buff Horde: %u", sWorld->getIntConfig(CONFIG_ICC_BUFF_HORDE));
|
||||
LOG_INFO("server.loading", ">> 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
|
||||
LOG_INFO("server", ">> ICC buff Horde: disabled");
|
||||
LOG_INFO("server.loading", ">> ICC buff Horde: disabled");
|
||||
|
||||
if (sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE) > 0)
|
||||
{
|
||||
LOG_INFO("server", ">> Using ICC buff Alliance: %u", sWorld->getIntConfig(CONFIG_ICC_BUFF_ALLIANCE));
|
||||
LOG_INFO("server.loading", ">> 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
|
||||
LOG_INFO("server", ">> ICC buff Alliance: disabled");
|
||||
LOG_INFO("server.loading", ">> ICC buff Alliance: disabled");
|
||||
|
||||
LOG_INFO("server", ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded %u spell area requirements in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellInfoStore()
|
||||
@@ -2661,8 +2649,8 @@ void SpellMgr::LoadSpellInfoStore()
|
||||
mSpellInfoMap[i] = new SpellInfo(spellEntry);
|
||||
}
|
||||
|
||||
LOG_INFO("server", ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::UnloadSpellInfoStore()
|
||||
@@ -2698,8 +2686,8 @@ void SpellMgr::LoadSpellSpecificAndAuraState()
|
||||
spellInfo->_auraState = spellInfo->LoadAuraState();
|
||||
}
|
||||
|
||||
LOG_INFO("server", ">> Loaded spell specific and aura state in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded spell specific and aura state in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
void SpellMgr::LoadSpellCustomAttr()
|
||||
@@ -2711,7 +2699,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
QueryResult result = WorldDatabase.Query("SELECT spell_id, attributes FROM spell_custom_attr");
|
||||
|
||||
if (!result)
|
||||
LOG_INFO("server", ">> Loaded 0 spell custom attributes from DB. DB table `spell_custom_attr` is empty.");
|
||||
LOG_INFO("server.loading", ">> Loaded 0 spell custom attributes from DB. DB table `spell_custom_attr` is empty.");
|
||||
else
|
||||
{
|
||||
for (count = 0; result->NextRow(); ++count)
|
||||
@@ -2724,7 +2712,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
SpellInfo* spellInfo = _GetSpellInfo(spellId);
|
||||
if (!spellInfo)
|
||||
{
|
||||
LOG_INFO("server", "Table `spell_custom_attr` has wrong spell (spell_id: %u), ignored.", spellId);
|
||||
LOG_INFO("spells", "Table `spell_custom_attr` has wrong spell (spell_id: %u), ignored.", spellId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -2760,7 +2748,7 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
|
||||
spellInfo->AttributesCu |= attributes;
|
||||
}
|
||||
LOG_INFO("server", ">> Loaded %u spell custom attributes from DB in %u ms", count, GetMSTimeDiffToNow(customAttrTime));
|
||||
LOG_INFO("server.loading", ">> Loaded %u spell custom attributes from DB in %u ms", count, GetMSTimeDiffToNow(customAttrTime));
|
||||
}
|
||||
|
||||
// xinef: create talent spells set
|
||||
@@ -3295,8 +3283,8 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
|
||||
CreatureAI::FillAISpellInfo();
|
||||
|
||||
LOG_INFO("server", ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loaded spell custom attributes in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
inline void ApplySpellFix(std::initializer_list<uint32> spellIds, void(*fix)(SpellEntry*))
|
||||
@@ -7447,6 +7435,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;
|
||||
|
||||
LOG_INFO("server", ">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server", " ");
|
||||
LOG_INFO("server.loading", ">> Loading spell dbc data corrections in %u ms", GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
@@ -296,31 +296,31 @@ bool SpellScript::_Validate(SpellInfo const* entry)
|
||||
{
|
||||
for (std::list<EffectHandler>::iterator itr = OnEffectLaunch.begin(); itr != OnEffectLaunch.end(); ++itr)
|
||||
if (!(*itr).GetAffectedEffectsMask(entry))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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);
|
||||
}
|
||||
@@ -428,7 +428,7 @@ Unit* SpellScript::GetHitUnit()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
@@ -438,7 +438,7 @@ Creature* SpellScript::GetHitCreature()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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)
|
||||
@@ -451,7 +451,7 @@ Player* SpellScript::GetHitPlayer()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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)
|
||||
@@ -464,7 +464,7 @@ Item* SpellScript::GetHitItem()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
@@ -474,7 +474,7 @@ GameObject* SpellScript::GetHitGObj()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
@@ -484,7 +484,7 @@ WorldLocation* SpellScript::GetHitDest()
|
||||
{
|
||||
if (!IsInEffectHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
@@ -494,7 +494,7 @@ int32 SpellScript::GetHitDamage()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
@@ -504,7 +504,7 @@ void SpellScript::SetHitDamage(int32 damage)
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
@@ -514,7 +514,7 @@ int32 SpellScript::GetHitHeal()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
@@ -524,7 +524,7 @@ void SpellScript::SetHitHeal(int32 heal)
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
@@ -534,7 +534,7 @@ Aura* SpellScript::GetHitAura()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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)
|
||||
@@ -548,7 +548,7 @@ void SpellScript::PreventHitAura()
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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)
|
||||
@@ -559,7 +559,7 @@ void SpellScript::PreventHitEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
if (!IsInHitPhase() && !IsInEffectHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
@@ -570,7 +570,7 @@ void SpellScript::PreventHitDefaultEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
if (!IsInHitPhase() && !IsInEffectHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
@@ -580,7 +580,7 @@ int32 SpellScript::GetEffectValue() const
|
||||
{
|
||||
if (!IsInEffectHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
@@ -590,7 +590,7 @@ void SpellScript::SetEffectValue(int32 value)
|
||||
{
|
||||
if (!IsInEffectHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
@@ -626,7 +626,7 @@ void SpellScript::SetCustomCastResultMessage(SpellCustomErrors result)
|
||||
{
|
||||
if (!IsInCheckCastHook())
|
||||
{
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "TSCR: Script: `%s` Spell: `%u`: function SpellScript::SetCustomCastResultMessage was called while spell not in check cast phase!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -642,95 +642,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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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())
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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())
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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())
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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())
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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())
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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())
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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))
|
||||
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());
|
||||
LOG_ERROR("spells.scripts", "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);
|
||||
}
|
||||
@@ -962,7 +962,7 @@ void AuraScript::PreventDefaultAction()
|
||||
m_defaultActionPrevented = true;
|
||||
break;
|
||||
default:
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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;
|
||||
}
|
||||
}
|
||||
@@ -1149,7 +1149,7 @@ Unit* AuraScript::GetTarget() const
|
||||
case AURA_SCRIPT_HOOK_EFFECT_AFTER_PROC:
|
||||
return m_auraApplication->GetTarget();
|
||||
default:
|
||||
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);
|
||||
LOG_ERROR("spells.scripts", "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