aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeader <keader.android@gmail.com>2020-06-09 09:52:44 -0300
committerShauren <shauren.trinity@gmail.com>2022-01-06 20:47:11 +0100
commitd48909b5d62986b685368254eed9e886cc0266ec (patch)
tree3b63fa539051434ad275f6631b7d3427c43143cc /src
parent23fc9d6d632a866991c652406799ec0344ecb054 (diff)
Scripts/ShadowfangKeep: Fixed a crash in spellscript
(cherry picked from commit be48fbc32ac49673ce2415b76cb447a61585ed01)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp
index 1d8ae218f3a..b218f8a116c 100644
--- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp
+++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/boss_apothecary_hummel.cpp
@@ -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());