Difference between revisions of "Ability ApplyUpkeepEffects"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(added description)
(added some explains)
Line 4: Line 4:
 
|param1type = object
 
|param1type = object
 
|param1name = oCaster
 
|param1name = oCaster
|param1desc = {{undocumented}}
+
|param1desc = The Caster of the Ability on which the upkeep will be applied.
 
|param1default =
 
|param1default =
 
|param2type = int
 
|param2type = int
 
|param2name = nAbility
 
|param2name = nAbility
|param2desc = {{undocumented}}
+
|param2desc = The Ability itself.
 
|param2default =
 
|param2default =
 
|param3type = effect
 
|param3type = effect
 
|param3arra=true
 
|param3arra=true
 
|param3name = eEffects
 
|param3name = eEffects
|param3desc = {{undocumented}}
+
|param3desc = The Effects on which the upkeep come from.
 
|param3default =
 
|param3default =
 
|param4type = object
 
|param4type = object
 
|param4name = oTarget
 
|param4name = oTarget
|param4desc = {{undocumented}}
+
|param4desc = The Target is the Caster. It is not needed to change the default value.
 
|param4default =OBJECT_INVALID
 
|param4default =OBJECT_INVALID
 
|param5type = int
 
|param5type = int
 
|param5name = bPartywide
 
|param5name = bPartywide
|param5desc = {{undocumented}}
+
|param5desc = Is the Effect Partywide or not.
 
|param5default =FALSE
 
|param5default =FALSE
 
|returntype = void
 
|returntype = void
Line 35: Line 35:
 
<!-- == Remarks == -->
 
<!-- == Remarks == -->
 
<!-- This section contains additional comments, observations and known issues. -->
 
<!-- This section contains additional comments, observations and known issues. -->
 +
Ability_ApplyUpkeepEffects is more a Wrapper for _ApplyUpkeepEffect than a Function.
 +
See [[_ApplyUpkeepEffect]] for more Informations.
  
 
<!-- == Examples == -->
 
<!-- == Examples == -->
 
<!-- This section contains examples transcluded from the snippet library. -->
 
<!-- This section contains examples transcluded from the snippet library. -->
 +
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 ==
 
== See also ==
 
<!-- This section contains links to articles, functions or constant groups. -->
 
<!-- This section contains links to articles, functions or constant groups. -->
 
[[Ability_ApplyUpkeepEffect]]
 
[[Ability_ApplyUpkeepEffect]]

Revision as of 02:04, 4 March 2011

[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