Ability ApplyUpkeepEffects

From Dragon Age Toolset Wiki
Revision as of 23:15, 31 August 2011 by Sunjammer (Talk | contribs) (Flagging for my attention)

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 Partywide or not.
Returns:

Nothing.

Source:

Core 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. See _ApplyUpkeepEffect for more Informations.

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 spells mana cost and talents stamina cost
   effect eUpkeep = EffectUpkeep(UPKEEP_TYPE_MANASTAMINA , fCost, nAbility, oTarget, bPartywide);
   // the last step is to apply the effect on the target(caster)
   ApplyEffectOnObject(EFFECT_DURATION_TYPE_PERMANENT, eUpkeep, oCaster, 0.0f, oCaster, nAbility);

See also

Ability_ApplyUpkeepEffect