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
@@ -609,7 +609,7 @@ class spell_helix_sticky_bomb_periodic_trigger : public AuraScript
|
||||
if (!spell)
|
||||
return;
|
||||
|
||||
if (Player* player = target->SelectNearestPlayer(spell->Effects[EFFECT_0].CalcRadius()))
|
||||
if (Player* player = target->SelectNearestPlayer(spell->Effects[EFFECT_0].CalcRadius(nullptr, SpellTargetIndex::TargetB)))
|
||||
{
|
||||
if (!player->GetVehicleBase() && player->GetExactDist(target) <= 1.0f)
|
||||
{
|
||||
|
||||
@@ -370,29 +370,6 @@ class spell_anraphet_omega_stance_summon : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 77127 Omega Stance Spider Effect
|
||||
class spell_anraphet_omega_stance_spider_effect : public SpellScript
|
||||
{
|
||||
void SetDestPosition(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
float angle = float(rand_norm()) * static_cast<float>(2 * M_PI);
|
||||
uint32 dist = caster->GetCombatReach() + GetSpellInfo()->Effects[EFFECT_0].CalcRadius(caster) * (float)rand_norm();
|
||||
|
||||
float x = caster->GetPositionX() + dist * std::cos(angle);
|
||||
float y = caster->GetPositionY() + dist * std::sin(angle);
|
||||
float z = caster->GetMap()->GetHeight(caster->GetPhaseShift(), x, y, caster->GetPositionZ());
|
||||
float o = GetHitDest()->GetOrientation();
|
||||
|
||||
GetHitDest()->Relocate({ x, y, z, o });
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectLaunch.Register(&spell_anraphet_omega_stance_spider_effect::SetDestPosition, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_anraphet()
|
||||
{
|
||||
RegisterHallsOfOriginationCreatureAI(boss_anraphet);
|
||||
@@ -402,5 +379,4 @@ void AddSC_boss_anraphet()
|
||||
RegisterSpellScript(spell_anraphet_alpha_beams);
|
||||
RegisterSpellScript(spell_anraphet_omega_stance);
|
||||
RegisterSpellScript(spell_anraphet_omega_stance_summon);
|
||||
RegisterSpellScript(spell_anraphet_omega_stance_spider_effect);
|
||||
}
|
||||
@@ -578,7 +578,7 @@ class spell_marrowgar_coldflame_damage : public SpellScriptLoader
|
||||
if (target->HasAura(SPELL_IMPALED))
|
||||
return false;
|
||||
|
||||
if (target->GetExactDist2d(GetOwner()) > GetSpellInfo()->Effects[EFFECT_0].CalcRadius())
|
||||
if (target->GetExactDist2d(GetOwner()) > GetSpellInfo()->Effects[EFFECT_0].CalcRadius(nullptr, SpellTargetIndex::TargetB))
|
||||
return false;
|
||||
|
||||
if (Aura* aur = target->GetAura(GetId()))
|
||||
|
||||
@@ -182,7 +182,7 @@ class spell_krystallus_shatter_effect : public SpellScriptLoader
|
||||
if (!GetHitUnit())
|
||||
return;
|
||||
|
||||
float radius = GetSpellInfo()->Effects[EFFECT_0].CalcRadius(GetCaster());
|
||||
float radius = GetSpellInfo()->Effects[EFFECT_0].CalcRadius(GetCaster(), SpellTargetIndex::TargetB);
|
||||
if (!radius)
|
||||
return;
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ class spell_gruul_shatter_effect : public SpellScriptLoader
|
||||
if (!GetHitUnit())
|
||||
return;
|
||||
|
||||
float radius = GetSpellInfo()->Effects[EFFECT_0].CalcRadius(GetCaster());
|
||||
float radius = GetSpellInfo()->Effects[EFFECT_0].CalcRadius(GetCaster(), SpellTargetIndex::TargetB);
|
||||
if (!radius)
|
||||
return;
|
||||
|
||||
|
||||
Reference in new issue
Block a user