Scripts/ShadowfangKeep: Fixed a crash in spellscript

(cherry picked from commit be48fbc32a)
This commit is contained in:
Keader
2020-06-09 09:52:44 -03:00
committed by Shauren
parent 23fc9d6d63
commit d48909b5d6

View File

@@ -414,6 +414,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());