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

This commit is contained in:
Treeston
2018-02-05 01:38:56 +01:00
committed by Ovahlord
parent b708144ca9
commit 8cde9455b7

View File

@@ -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())
{