Where is the GetTarget() Function defined?

Hello,

i’m searching for the “GetTarget()” function, does anybody know in which file i can find it?

GetTargetGUID is within Unit.h

GetTarget ? I don’t know, actually. Can’t find it either.

Thanks… I don’t actually care about “GetTargetGUID” i really need the GetTarget function… :confused: The Problem is, that a Spell is not working correctly, as it should do…

There is “getTarget()” within Reference.h (Shared). Try including it and try.

Still not, what i expected, but i’ll try… Thanks /emoticons/default_wink.png

Reference.h

All the way down the file.

Didn’t see the above post.

Do you mean GetTarget() as in the function that returns the target of a Spell or Aura?

Spell.h inside the Spell class.

SpellAura.h inside the Aura class.

Unit* GetTarget() const { return _target; }

Unit* AuraScript::GetTarget() const
{
    switch (m_currentScriptState)
    {
        case AURA_SCRIPT_HOOK_EFFECT_APPLY:
        case AURA_SCRIPT_HOOK_EFFECT_REMOVE:
        case AURA_SCRIPT_HOOK_EFFECT_AFTER_APPLY:
        case AURA_SCRIPT_HOOK_EFFECT_AFTER_REMOVE:
        case AURA_SCRIPT_HOOK_EFFECT_PERIODIC:
        case AURA_SCRIPT_HOOK_EFFECT_ABSORB:
        case AURA_SCRIPT_HOOK_EFFECT_AFTER_ABSORB:
        case AURA_SCRIPT_HOOK_EFFECT_MANASHIELD:
        case AURA_SCRIPT_HOOK_EFFECT_AFTER_MANASHIELD:
        case AURA_SCRIPT_HOOK_EFFECT_SPLIT:
        case AURA_SCRIPT_HOOK_CHECK_PROC:
        case AURA_SCRIPT_HOOK_PREPARE_PROC:
        case AURA_SCRIPT_HOOK_PROC:
        case AURA_SCRIPT_HOOK_AFTER_PROC:
        case AURA_SCRIPT_HOOK_EFFECT_PROC:
        case AURA_SCRIPT_HOOK_EFFECT_AFTER_PROC:
            return m_auraApplication->GetTarget();
        default:
            sLog->outError(LOG_FILTER_TSCR, "Script: `%s` Spell: `%u` AuraScript::GetTarget called in a hook in which the call won't have effect!", m_scriptName->c_str(), m_scriptSpellId);
    }

    return NULL;
}
Targets SpellImplicitTargetInfo::GetTarget() const
{
    return _target;
}
Unit* GetTarget() const { return i_target.getTarget(); }

is what I got for ya