Scripts/ShadowfangKeep: Fixed a crash in spellscript

This commit is contained in:
Keader
2020-06-09 09:52:44 -03:00
committed by GitHub
parent aeb41e67a9
commit be48fbc32a

View File

@@ -422,6 +422,9 @@ class spell_apothecary_lingering_fumes : public SpellScriptLoader
std::list<Creature*> triggers;
caster->GetCreatureListWithEntryInGrid(triggers, NPC_VIAL_BUNNY, 100.0f);
if (triggers.empty())
return;
Creature* trigger = Trinity::Containers::SelectRandomContainerElement(triggers);
caster->GetMotionMaster()->MovePoint(0, trigger->GetPosition());