Added SetCorpseTarget for SpellCastTargets

This commit is contained in:
Yehonal
2017-12-11 01:12:23 +00:00
parent 11d815e9d7
commit cc69bd6304
2 changed files with 11 additions and 0 deletions

View File

@@ -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;

View File

@@ -107,6 +107,7 @@ class SpellCastTargets
uint64 GetCorpseTargetGUID() const;
Corpse* GetCorpseTarget() const;
void SetCorpseTarget(Corpse* target);
WorldObject* GetObjectTarget() const;
uint64 GetObjectTargetGUID() const;