mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Expose corpseTarget to spell scripts with SpellScript::GetHitCorpse() (#24981)
Closes #24945
(cherry picked from commit 94a4404e7e)
This commit is contained in:
@@ -626,6 +626,16 @@ GameObject* SpellScript::GetHitGObj() const
|
||||
return m_spell->gameObjTarget;
|
||||
}
|
||||
|
||||
Corpse* SpellScript::GetHitCorpse() const
|
||||
{
|
||||
if (!IsInTargetHook())
|
||||
{
|
||||
TC_LOG_ERROR("scripts", "Script: `%s` Spell: `%u`: function SpellScript::GetHitCorpse was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId);
|
||||
return nullptr;
|
||||
}
|
||||
return m_spell->corpseTarget;
|
||||
}
|
||||
|
||||
WorldLocation* SpellScript::GetHitDest() const
|
||||
{
|
||||
if (!IsInEffectHook())
|
||||
|
||||
Reference in New Issue
Block a user