diff --git a/src/game/Spells/Spell.cpp b/src/game/Spells/Spell.cpp index 28fed7f77..8f57b8fc1 100644 --- a/src/game/Spells/Spell.cpp +++ b/src/game/Spells/Spell.cpp @@ -287,6 +287,16 @@ Corpse* SpellCastTargets::GetCorpseTarget() const return NULL; } +void SpellCastTargets::SetCorpseTarget(Corpse* target) +{ + if (!target) + return; + + m_objectTarget = target; + m_objectTargetGUID = target->GetGUID(); + m_targetMask |= TARGET_FLAG_CORPSE_MASK; +} + WorldObject* SpellCastTargets::GetObjectTarget() const { return m_objectTarget; diff --git a/src/game/Spells/Spell.h b/src/game/Spells/Spell.h index dd1241ea1..880bb1fdc 100644 --- a/src/game/Spells/Spell.h +++ b/src/game/Spells/Spell.h @@ -107,6 +107,7 @@ class SpellCastTargets uint64 GetCorpseTargetGUID() const; Corpse* GetCorpseTarget() const; + void SetCorpseTarget(Corpse* target); WorldObject* GetObjectTarget() const; uint64 GetObjectTargetGUID() const;