fix(Scripts/The Underbog): Rewritten The Black Stalker's Levitate mec… (#14541)

* fix(Scripts/The Underbog): Rewritten The Black Stalker's Levitate mechanic.

Fixes #13988

* buildfix.

* Update src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp

Co-authored-by: offl <offl@gmail.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
UltraNix
2023-01-07 20:28:22 +01:00
committed by GitHub
parent 777a1be394
commit 8cb88cce52
3 changed files with 132 additions and 48 deletions

View File

@@ -5176,7 +5176,7 @@ void Spell::EffectPullTowards(SpellEffIndex effIndex)
pos.Relocate(m_caster->GetPositionX(), m_caster->GetPositionY(), m_caster->GetPositionZ() + 1.0f, m_caster->GetOrientation());
}
float speedXY = float(m_spellInfo->Effects[effIndex].MiscValue) * 0.1f;
float speedXY = float(m_spellInfo->Effects[effIndex].MiscValue) ? float(m_spellInfo->Effects[effIndex].MiscValue) * 0.1f : 30.f;
float speedZ = unitTarget->GetDistance(pos) / speedXY * 0.5f * Movement::gravity;
unitTarget->GetMotionMaster()->MoveJump(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), speedXY, speedZ);