Ability ApplyUpkeepEffects

From Dragon Age Toolset Wiki
Revision as of 12:42, 26 April 2012 by Sunjammer (Talk | contribs) (Cleaning up prior to review)

Jump to: navigation, search


[Undocumented]

void Ability_ApplyUpkeepEffects(
object oCaster,
int nAbility,
effect[] eEffects,
object oTarget = OBJECT_INVALID,
int bPartywide = FALSE
);
Parameters:
oCaster
The Caster of the Ability on which the upkeep will be applied.
nAbility
The Ability itself.
eEffects
The Effects on which the upkeep come from.
oTarget
The Target is the Caster. It is not needed to change the default value.
bPartywide
Is the Effect party wide or not.
Returns:

Nothing.

Source:

Core Game Resources.ability_h

Upkeep effects are permanent until the effect is removed. They also set the UI-icon toggle inside the effect based on the ability ID.

Ability_ApplyUpkeepEffects is more a Wrapper for _ApplyUpkeepEffect than a Function.

Here is some code from the function itself:

    // as explained above, the Target becomes the Caster. 
    if(!IsObjectValid(oTarget))
    {
        oTarget = oCaster;
    }
 
    // now loop through the Effects[i]
    for(i = 0; i < nCount; i++)
    {
        _ApplyUpkeepEffect( oCaster, eEffects[i], nAbility, oTarget, bPartywide);
    }
 
    // define the spell's mana cost or talent's stamina cost
    effect eUpkeep = EffectUpkeep(UPKEEP_TYPE_MANASTAMINA , fCost, nAbility, oTarget, bPartywide);
 
    // apply the effect on the target (caster)
    ApplyEffectOnObject(EFFECT_DURATION_TYPE_PERMANENT, eUpkeep, oCaster, 0.0f, oCaster, nAbility);

See also

Ability_ApplyUpkeepEffect