Core/Spells: ported radius entry indexing from master branch and dropped several now deprecated spell 'fixes' from spellMgr
This commit is contained in:
1 parent
569d66d352
commit
2bcc645cd3
13 files changed
+97
-523
No files matched your search
@@ -3268,7 +3268,7 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
|
||||
case 45151:
|
||||
{
|
||||
//Workaround for Range ... should be global for every ScriptEffect
|
||||
float radius = m_spellInfo->Effects[effIndex].CalcRadius();
|
||||
float radius = m_spellInfo->Effects[effIndex].CalcRadius(nullptr, SpellTargetIndex::TargetB);
|
||||
if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER && unitTarget->GetDistance(m_caster) >= radius && !unitTarget->HasAura(46394) && unitTarget != m_caster)
|
||||
unitTarget->CastSpell(unitTarget, 46394, true);
|
||||
|
||||
@@ -4903,7 +4903,7 @@ void Spell::EffectTransmitted(SpellEffIndex effIndex)
|
||||
if (m_targets.HasDst())
|
||||
destTarget->GetPosition(fx, fy, fz, fo);
|
||||
//FIXME: this can be better check for most objects but still hack
|
||||
else if (m_spellInfo->Effects[effIndex].HasRadius() && m_spellInfo->Speed == 0)
|
||||
else if (m_spellInfo->Effects[effIndex].HasRadius(SpellTargetIndex::TargetA) && m_spellInfo->Speed == 0)
|
||||
{
|
||||
float dis = m_spellInfo->Effects[effIndex].CalcRadius(unitCaster);
|
||||
unitCaster->GetClosePoint(fx, fy, fz, DEFAULT_PLAYER_BOUNDING_RADIUS, dis);
|
||||
|
||||
Reference in new issue
Block a user