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 df193945d9)

* Core/Spells: implement TARGET_CORPSE_SRC_AREA_RAID and updated remaining resurrection effect handlers for updated corpse targeting

(cherry picked from commit 98b075cb4b)

* Fix no-pch

Co-authored-by: Ovahlord <dreadkiller@gmx.de>
(cherry picked from commit cc71da35b5)
This commit is contained in:
Giacomo Pozzoni
2020-06-29 21:03:03 +00:00
committed by Shauren
parent b9666481bb
commit 8f4db9aa69
5 changed files with 199 additions and 50 deletions

View File

@@ -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())