Table of Contents

Class PapyrusScriptExtensions

Namespace
SkyrimForge.Papyrus
Assembly
SkyrimForge.Game.dll

Provides extension members for PapyrusScript<T>.

public static class PapyrusScriptExtensions
Inheritance
PapyrusScriptExtensions
Inherited Members

Methods

AddItem<T, TForm>(PapyrusScript<T>, FormId<TForm>, int, bool)

Adds the item akItemToAdd identifies to this reference's inventory.

public static Task AddItem<T, TForm>(this PapyrusScript<T> self, FormId<TForm> akItemToAdd, int aiCount = 1, bool abSilent = false) where T : notnull, IObjectReference where TForm : struct, IForm

Parameters

self PapyrusScript<T>
akItemToAdd FormId<TForm>
aiCount int
abSilent bool

Returns

Task

Type Parameters

T
TForm

Exceptions

InvalidOperationException

No form has the ID, or the form is not a TForm.

GetItemCount<T, TForm>(PapyrusScript<T>, FormId<TForm>)

Returns how many of the item akItem identifies are in this reference's inventory.

public static Task<int> GetItemCount<T, TForm>(this PapyrusScript<T> self, FormId<TForm> akItem) where T : notnull, IObjectReference where TForm : struct, IForm

Parameters

self PapyrusScript<T>
akItem FormId<TForm>

Returns

Task<int>

Type Parameters

T
TForm

Exceptions

InvalidOperationException

No form has the ID, or the form is not a TForm.

RemoveItem<T, TForm>(PapyrusScript<T>, FormId<TForm>, int, bool, IObjectReference?)

Removes the item akItemToRemove identifies from this reference's inventory.

public static Task RemoveItem<T, TForm>(this PapyrusScript<T> self, FormId<TForm> akItemToRemove, int aiCount = 1, bool abSilent = false, IObjectReference? akOtherContainer = null) where T : notnull, IObjectReference where TForm : struct, IForm

Parameters

self PapyrusScript<T>
akItemToRemove FormId<TForm>
aiCount int
abSilent bool
akOtherContainer IObjectReference

Returns

Task

Type Parameters

T
TForm

Exceptions

InvalidOperationException

No form has the ID, or the form is not a TForm.