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:26:42 +0100
commit70e985c7f715951035b0e168c0222405d62758b3 (patch)
tree1d005288e72cf93a4e0784db420e4a066f2d4a26 /src
parent0e92d48e7f732604c4c5c6d827b268fc48a986bb (diff)
Scripts/Events: Fixed infinite loop with auras 71507 and 71508 casting each other when unit is removed from map
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 52809092f92..9eb84ce21d3 100644
--- a/src/server/scripts/Events/love_is_in_the_air.cpp
+++ b/src/server/scripts/Events/love_is_in_the_air.cpp
@@ -211,7 +211,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