Ability ApplyUpkeepEffects

From Dragon Age Toolset Wiki
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

Description

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

Examples

The following snippet is taken 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.0, oCaster, nAbility);

See also

_ApplyUpkeepEffect, Ability_ApplyUpkeepEffect