fix(Scripts/SunwellPlateau): Fix Darkness spawning midair (#21851)

This commit is contained in:
Andrew
2025-04-04 11:17:31 -03:00
committed by GitHub
parent ee724b0f38
commit 51f0495621
3 changed files with 31 additions and 0 deletions

View File

@@ -352,6 +352,29 @@ class spell_entropius_negative_energy_periodic : public AuraScript
}
};
class spell_muru_blackhole : public SpellScript
{
PrepareSpellScript(spell_muru_blackhole);
void ChangeSummonPos(SpellEffIndex /*effIndex*/)
{
if (!GetCaster())
return;
WorldLocation summonPos = *GetExplTargetDest();
float destZ = summonPos.GetPositionZ() - GetCaster()->GetMapWaterOrGroundLevel(GetCaster()->GetPosition());
Position offset = { 0.0f, 0.0f, -destZ, 0.0f};
summonPos.RelocateOffset(offset);
SetExplTargetDest(summonPos);
GetHitDest()->RelocateOffset(offset);
}
void Register() override
{
OnEffectHit += SpellEffectFn(spell_muru_blackhole::ChangeSummonPos, EFFECT_0, SPELL_EFFECT_SUMMON);
}
};
void AddSC_boss_muru()
{
RegisterSunwellPlateauCreatureAI(boss_muru);
@@ -363,4 +386,5 @@ void AddSC_boss_muru()
RegisterSpellScript(spell_entropius_void_zone_visual_aura);
RegisterSpellScript(spell_entropius_black_hole_effect);
RegisterSpellScript(spell_entropius_negative_energy_periodic);
RegisterSpellScript(spell_muru_blackhole);
}