Difference between revisions of "GetItemPropertyDurationRemaining"

From NWN Lexicon
Jump to: navigation, search
(See Also)
Line 1: Line 1:
{{NWNEE}} Returns the remaining duration of the item property in seconds.
+
{{DISPLAYTITLE:GetItemPropertyDurationRemaining(itemproperty)}}__NOTOC__{{NWNEE}}Returns the remaining duration of the item property in seconds.
 
 
 
<nwscript>
 
<nwscript>
 
int GetItemPropertyDurationRemaining(
 
int GetItemPropertyDurationRemaining(
Line 8: Line 7:
  
 
===Parameters===
 
===Parameters===
 +
 
; nProperty
 
; nProperty
 
: The item property to get the remaining duration of.
 
: The item property to get the remaining duration of.
 +
  
 
===Description===
 
===Description===
 +
 
Returns the remaining duration of the item property in seconds. Returns 0 if the [[duration type]] of the item property is not DURATION_TYPE_TEMPORARY.
 
Returns the remaining duration of the item property in seconds. Returns 0 if the [[duration type]] of the item property is not DURATION_TYPE_TEMPORARY.
 +
  
 
===Remarks===
 
===Remarks===
{{stub section}}
+
 
 +
This can be used to check if a duration is due to expire soon, maybe to refresh it by removing and adding the item property again.
 +
 
  
 
===Version===
 
===Version===
 
[https://www.beamdog.com/files/nwnee_release_notes.pdf 1.74.8149]
 
[https://www.beamdog.com/files/nwnee_release_notes.pdf 1.74.8149]
 +
 +
{{patchnwnee|patch=1.85.8193.30|link=https://store.steampowered.com/news/app/704450/view/2966167980978915190|type=updated}} Game/VM: Fixed Get*DurationRemaining returning the wrong value due to time overflow.
  
 
===Example===
 
===Example===
Line 33: Line 40:
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Item Properties Functions]]
 
[[Category:Item Properties Functions]]
{{DISPLAYTITLE:GetItemPropertyDurationRemaining(itemproperty)}}
 

Revision as of 00:34, 24 July 2021

Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.
Returns the remaining duration of the item property in seconds.
int GetItemPropertyDurationRemaining(
    itemproperty nProperty
);

Parameters

nProperty
The item property to get the remaining duration of.


Description

Returns the remaining duration of the item property in seconds. Returns 0 if the duration type of the item property is not DURATION_TYPE_TEMPORARY.


Remarks

This can be used to check if a duration is due to expire soon, maybe to refresh it by removing and adding the item property again.


Version

1.74.8149

This function was updated in 1.85.8193.30 of NWN:EE. Game/VM: Fixed Get*DurationRemaining returning the wrong value due to time overflow.

Example

Information icon.png This article is in need of examples. You can help the NWN Lexicon by showing how to use this code effectively.

See Also

functions: GetItemPropertyDuration(), GetItemPropertyDurationType()