aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellScript.cpp
diff options
context:
space:
mode:
authorGiacomo Pozzoni <giacomopoz@gmail.com>2020-06-29 21:03:03 +0000
committerShauren <shauren.trinity@gmail.com>2022-01-20 00:13:02 +0100
commit8f4db9aa6919e2b3b22ec21ffea4eacb605e9bc2 (patch)
tree9863a03c733072d6c7f8ab4125e8e683f72c3d6b /src/server/game/Spells/SpellScript.cpp
parentb9666481bbf943000c6c925c3287c1e1c9a94e7f (diff)
Core/Spells: implement corpse target type support and properly fix resurrections (#24921)
* Core/Spells: implement corpse target type support and properly fix resurrections (cherry picked from commit df193945d9aff8596985a20e2c654105354b0af7) * Core/Spells: implement TARGET_CORPSE_SRC_AREA_RAID and updated remaining resurrection effect handlers for updated corpse targeting (cherry picked from commit 98b075cb4b0da126d409ab42daa63a1f531a70ea) * Fix no-pch Co-authored-by: Ovahlord <dreadkiller@gmx.de> (cherry picked from commit cc71da35b5dc74abf71f8691161525a23d870bb5)
Diffstat (limited to 'src/server/game/Spells/SpellScript.cpp')
-rw-r--r--src/server/game/Spells/SpellScript.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp
index 2941b1400e6..69e7da62a73 100644
--- a/src/server/game/Spells/SpellScript.cpp
+++ b/src/server/game/Spells/SpellScript.cpp
@@ -561,6 +561,17 @@ int64 SpellScript::GetItemTargetCountForEffect(SpellEffIndex effect) const
return m_spell->GetItemTargetCountForEffect(effect);
}
+int64 SpellScript::GetCorpseTargetCountForEffect(SpellEffIndex effect) const
+{
+ if (!IsAfterTargetSelectionPhase())
+ {
+ TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetCorpseTargetCountForEffect was called, but function has no effect in current hook! (spell has not selected targets yet)",
+ m_scriptName->c_str(), m_scriptSpellId);
+ return 0;
+ }
+ return m_spell->GetCorpseTargetCountForEffect(effect);
+}
+
Unit* SpellScript::GetHitUnit() const
{
if (!IsInTargetHook())