mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts/ShadowfangKeep: Fixed a crash in spellscript
(cherry picked from commit be48fbc32a)
This commit is contained in:
@@ -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());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user