Table of Contents

Method AddItemProperty

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

AddItemProperty(ItemProperty, EffectDuration, TimeSpan, AddPropPolicy, bool, bool, bool)

Add an item property. Optional parameters allow for preventing unwanted stacking by removing the existing one first.

public void AddItemProperty(ItemProperty itemProperty, EffectDuration durationType, TimeSpan duration = default, AddPropPolicy policy = AddPropPolicy.IgnoreExisting, bool ignoreDuration = false, bool ignoreSubType = false, bool ignoreTag = false)

Parameters

itemProperty ItemProperty

The item property to add.

durationType EffectDuration

(Permanent/Temporary) - the duration of this item property.

duration TimeSpan

If DurationType is temporary, how long this item property should stay applied.

policy AddPropPolicy

The policy to use when adding this item property.

ignoreDuration bool

If set to true, an item property will be considered identical even if the DurationType is different. Be careful when using this with ReplaceExisting, as this could lead to a temporary item property removing a permanent one

ignoreSubType bool

If set to true an item property will be considered identical even if the SubType is different.

ignoreTag bool

If set to true an item property will be considered identical even if the tag is different.