aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellScript.h
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-09-02 10:40:50 +0200
committerOvahlord <dreadkiller@gmx.de>2024-09-03 19:55:16 +0200
commit2592a08df667c6988a79dbc39be11346755b8d11 (patch)
treec95eada5829f905cb11838f65daee2e5069840d2 /src/server/game/Spells/SpellScript.h
parent91be11b2807f3ada369c169fc9f7775b2cd8632d (diff)
Core/Spells: Fixed spell target selection not being shared by multiple effects when there are targeting scripts that have the same script function
(cherry picked from commit b1d8061a0f848241fe70ab0d718e829836cb5601)
Diffstat (limited to 'src/server/game/Spells/SpellScript.h')
-rw-r--r--src/server/game/Spells/SpellScript.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h
index 9c28dd10d7d..72573fb568a 100644
--- a/src/server/game/Spells/SpellScript.h
+++ b/src/server/game/Spells/SpellScript.h
@@ -570,6 +570,11 @@ public:
{
return _safeWrapper(spellScript, targets, _callImpl);
}
+
+ bool HasSameTargetFunctionAs(ObjectAreaTargetSelectHandler const& other) const
+ {
+ return _callImpl.Member == other._callImpl.Member || _callImpl.Static == other._callImpl.Static;
+ }
private:
SpellObjectAreaTargetSelectFnType _callImpl;
SafeWrapperType _safeWrapper;
@@ -623,6 +628,11 @@ public:
{
return _safeWrapper(spellScript, target, _callImpl);
}
+
+ bool HasSameTargetFunctionAs(ObjectTargetSelectHandler const& other) const
+ {
+ return _callImpl.Member == other._callImpl.Member || _callImpl.Static == other._callImpl.Static;
+ }
private:
SpellObjectTargetSelectFnType _callImpl;
SafeWrapperType _safeWrapper;