Scripts/Northrend: Malygos now uses modifiable threat list when teleporting after vortex. Fixes a crash. Closes #21315.

This commit is contained in:
Treeston authored and Ovahlord committed 2020-07-22 17:20:11 +02:00
1 parent b708144ca9
commit 8cde9455b7
1 file changed
+2 -1
@@ -1827,7 +1827,8 @@ class spell_malygos_vortex_visual : public SpellScriptLoader
{
if (Creature* caster = GetCaster()->ToCreature())
{
for (ThreatReference const* ref : caster->GetThreatManager().GetUnsortedThreatList())
// we need modifiable threat list here - SPELL_VORTEX_6 is a TELEPORT effect, which may stop combat
for (ThreatReference const* ref : caster->GetThreatManager().GetModifiableThreatList())
{
if (Player* targetPlayer = ref->GetVictim()->ToPlayer())
{