Difference between revisions of "Ability ApplyUpkeepEffects"

From Dragon Age Toolset Wiki
Jump to: navigation, search
(added some explains)
m (Enabling headings)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{ToDoListItem|Sunjammer}}
 
{{dafunction
 
{{dafunction
|name = Ability_ApplyUpkeepEffects
+
|name         = Ability_ApplyUpkeepEffects
|brief = {{undocumented}}
+
|brief         = {{undocumented}}
|param1type = object
+
|param1type   = object
|param1name = oCaster
+
|param1name   = oCaster
|param1desc = The Caster of the Ability on which the upkeep will be applied.
+
|param1desc   = The caster of the ability on which the upkeep will be applied.
 
|param1default =
 
|param1default =
|param2type = int
+
|param2type   = int
|param2name = nAbility
+
|param2name   = nAbility
|param2desc = The Ability itself.
+
|param2desc   = The ability itself.
 
|param2default =
 
|param2default =
|param3type = effect
+
|param3type   = effect
|param3arra=true
+
|param3arra   = yes
|param3name = eEffects
+
|param3name   = eEffects
|param3desc = The Effects on which the upkeep come from.
+
|param3desc   = The effects on which the upkeep come from.
 
|param3default =
 
|param3default =
|param4type = object
+
|param4type   = object
|param4name = oTarget
+
|param4name   = oTarget
|param4desc = The Target is the Caster. It is not needed to change the default value.
+
|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 = Is the Effect Partywide or not.
+
|param5desc   = Is the Effect party wide or not.
|param5default =FALSE
+
|param5default = FALSE
|returntype = void
+
|returntype   = void
|returndesc =  
+
|returndesc   =  
|sourcefile = ability_h
+
|sourcefile   = ability_h
|sourcemodule = Core Resources
+
|sourcemodule = Core Game Resources
 
}}
 
}}
 
+
== Description ==
<!-- == Description == -->
+
 
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
 
<!-- This section contains the full description from the functions comments. Do not change unless you are confident these are incomplete or incorrect. -->
 
Upkeep effects are permanent until the effect is removed. They also set the UI-icon toggle inside the effect based on the ability ID.
 
Upkeep effects are permanent until the effect is removed. They also set the UI-icon toggle inside the effect based on the ability ID.
 
 
<!-- == 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.
+
== Examples ==
See [[_ApplyUpkeepEffect]] for more Informations.
+
 
+
<!-- == 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:
+
The following snippet is taken from the function itself:
  
 +
<dascript>
 
     // as explained above, the Target becomes the Caster.  
 
     // as explained above, the Target becomes the Caster.  
     if (!IsObjectValid(oTarget))
+
     if(!IsObjectValid(oTarget))
 
     {
 
     {
 
         oTarget = oCaster;
 
         oTarget = oCaster;
Line 49: Line 46:
  
 
     // now loop through the Effects[i]
 
     // now loop through the Effects[i]
     for (i = 0; i < nCount; i++)
+
     for(i = 0; i < nCount; i++)
 
     {
 
     {
         _ApplyUpkeepEffect( oCaster, eEffects[i], nAbility, oTarget, bPartywide);
+
         _ApplyUpkeepEffect(oCaster, eEffects[i], nAbility, oTarget, bPartywide);
 
     }
 
     }
  
     // define the spells mana cost and talents stamina cost
+
     // define the spell's mana cost or talent's stamina cost
 
     effect eUpkeep = EffectUpkeep(UPKEEP_TYPE_MANASTAMINA , fCost, nAbility, oTarget, bPartywide);
 
     effect eUpkeep = EffectUpkeep(UPKEEP_TYPE_MANASTAMINA , fCost, nAbility, oTarget, bPartywide);
  
     // the last step is to apply the effect on the target(caster)
+
     // apply the effect on the target (caster)
     ApplyEffectOnObject(EFFECT_DURATION_TYPE_PERMANENT, eUpkeep, oCaster, 0.0f, oCaster, nAbility);
+
     ApplyEffectOnObject(EFFECT_DURATION_TYPE_PERMANENT, eUpkeep, oCaster, 0.0, oCaster, nAbility);
 +
</dascript>
  
 
== 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]]
+
[[_ApplyUpkeepEffect]], [[Ability_ApplyUpkeepEffect]]

Latest revision as of 12:48, 26 April 2012


[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