aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-02-09 10:26:42 +0100
committerShauren <shauren.trinity@gmail.com>2023-02-09 10:31:48 +0100
commitf79cd0f526af552d0df06b80dca951d6f1f8ae55 (patch)
tree6c917e5d83731a628f72ef30a8849d1b4b496cf9 /src
parent0e76b4ab9dae9547a1b8e56014affd8bda230dbd (diff)
Scripts/Events: Fixed infinite loop with auras 71507 and 71508 casting each other when unit is removed from map
(cherry picked from commit 70e985c7f715951035b0e168c0222405d62758b3)
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Events/love_is_in_the_air.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/scripts/Events/love_is_in_the_air.cpp b/src/server/scripts/Events/love_is_in_the_air.cpp
index 2accb9abca8..c79aea25f16 100644
--- a/src/server/scripts/Events/love_is_in_the_air.cpp
+++ b/src/server/scripts/Events/love_is_in_the_air.cpp
@@ -212,7 +212,8 @@ class spell_love_is_in_the_air_recently_analyzed : public AuraScript
void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
- GetTarget()->CastSpell(GetTarget(), SPELL_HEAVILY_PERFUMED);
+ if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE)
+ GetTarget()->CastSpell(GetTarget(), SPELL_HEAVILY_PERFUMED);
}
void Register() override