Difference between revisions of "Osiris/API/GetStatusTurns"
From Divinity Engine Wiki
(Documented GetStatusTurns) |
m |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
===== Full Definition(s) ===== | ===== Full Definition(s) ===== | ||
− | * query '''GetStatusTurns'''('''''[in]'''(GUIDSTRING)'''''_Source''', ''''[in] | + | * query '''GetStatusTurns'''('''''[in]'''(GUIDSTRING)'''''_Source''', '''''[in]'''(STRING)''''_StatusID''''', '''''[out]'''(INTEGER)'''_Turns''') |
===== Description ===== | ===== Description ===== | ||
Returns the remaining lifetime of a status '''_StatusID''' on '''_Source''', which can either be a character or an item. | Returns the remaining lifetime of a status '''_StatusID''' on '''_Source''', which can either be a character or an item. | ||
Line 7: | Line 7: | ||
* '''_Turns''': The number of '''_Turns''' that '''_Source''' will still be under the influence of '''_StatusID''', rounded up to the next integer (e.g. if there are '''1.01''' turns left, it will return '''2'''). If the query failed, the result is guaranteed to be '''0'''. | * '''_Turns''': The number of '''_Turns''' that '''_Source''' will still be under the influence of '''_StatusID''', rounded up to the next integer (e.g. if there are '''1.01''' turns left, it will return '''2'''). If the query failed, the result is guaranteed to be '''0'''. | ||
===== Notes ===== | ===== Notes ===== | ||
− | * / | + | * This query is new in DOS2 Patch 5. |
+ | * As of DOS 2 Patch 6, this query returns '''-1''' for statuses with an infinite duration. Before, it returned '''0''' in that case. | ||
+ | * See the notes of [[Osiris/API/CharacterStatusAttempt|CharacterStatusAttempt]] for a usage constraint. | ||
===== See Also ===== | ===== See Also ===== | ||
* [[Osiris/API/ApplyStatus|ApplyStatus]] | * [[Osiris/API/ApplyStatus|ApplyStatus]] | ||
Line 22: | Line 24: | ||
* [[Osiris/API/RemoveHarmfulStatuses|RemoveHarmfulStatuses]] | * [[Osiris/API/RemoveHarmfulStatuses|RemoveHarmfulStatuses]] | ||
− | [[Category:Osiris Queries]] | + | [[Category:Osiris Queries|GetStatusTurns]] |
Latest revision as of 13:26, 26 February 2018
Full Definition(s)
- query GetStatusTurns([in](GUIDSTRING)_Source, [in](STRING)'_StatusID, [out](INTEGER)_Turns)
Description
Returns the remaining lifetime of a status _StatusID on _Source, which can either be a character or an item.
Return Values
- Success/Failure: Fails if _Source is NULL or if _Source is not currently under the influence of _StatusIID.
- _Turns: The number of _Turns that _Source will still be under the influence of _StatusID, rounded up to the next integer (e.g. if there are 1.01 turns left, it will return 2). If the query failed, the result is guaranteed to be 0.
Notes
- This query is new in DOS2 Patch 5.
- As of DOS 2 Patch 6, this query returns -1 for statuses with an infinite duration. Before, it returned 0 in that case.
- See the notes of CharacterStatusAttempt for a usage constraint.