Table of Contents

Class CustomAction

Namespace
SharpPluginLoader.Core.Actions
Assembly
SharpPluginLoader.Core.dll
public class CustomAction
Inheritance
CustomAction
Inherited Members

Constructors

CustomAction()

public CustomAction()

CustomAction(string?, MtDti, OnInitializeCallback?, OnExecuteCallback?, OnUpdateCallback?, OnEndCallback?, int)

public CustomAction(string? name, MtDti baseDti, OnInitializeCallback? onInitialize = null, OnExecuteCallback? onExecute = null, OnUpdateCallback? onUpdate = null, OnEndCallback? onEnd = null, int flags = -1)

Parameters

name string
baseDti MtDti
onInitialize OnInitializeCallback
onExecute OnExecuteCallback
onUpdate OnUpdateCallback
onEnd OnEndCallback
flags int

CustomAction(string?, int, OnInitializeCallback?, OnExecuteCallback?, OnUpdateCallback?, OnEndCallback?, int)

public CustomAction(string? name, int baseActionId, OnInitializeCallback? onInitialize = null, OnExecuteCallback? onExecute = null, OnUpdateCallback? onUpdate = null, OnEndCallback? onEnd = null, int flags = -1)

Parameters

name string
baseActionId int
onInitialize OnInitializeCallback
onExecute OnExecuteCallback
onUpdate OnUpdateCallback
onEnd OnEndCallback
flags int

Properties

BaseActionId

The Id of the action to use as a base for the custom action. If you set this leave BaseDti as nullptr

public int BaseActionId { get; init; }

Property Value

int

BaseDti

The DTI of the action to use as a base for the custom action. Use this if the action you want to use as a base is from a different monster. If you set this BaseActionId will be ignored

public MtDti? BaseDti { get; init; }

Property Value

MtDti

Flags

The flags of the action. -1 for default.

public int Flags { get; init; }

Property Value

int

Name

The name of the action. Has no effect on functionality. Can be null.

public string? Name { get; init; }

Property Value

string

OnEnd

The OnEnd function will be called when the action ends

public OnEndCallback? OnEnd { get; init; }

Property Value

OnEndCallback

OnExecute

The OnExecute function will be called each time the action is executed

public OnExecuteCallback? OnExecute { get; init; }

Property Value

OnExecuteCallback

OnInitialize

The OnInitialize function will be called after the action object is created

public OnInitializeCallback? OnInitialize { get; init; }

Property Value

OnInitializeCallback

OnUpdate

The OnUpdate function will be called once per frame while the action is active. Return false to end the action

public OnUpdateCallback? OnUpdate { get; init; }

Property Value

OnUpdateCallback

VirtualFunctions

A dictionary of virtual functions to override. The key is the index of the virtual function

public Dictionary<int, Delegate> VirtualFunctions { get; }

Property Value

Dictionary<int, Delegate>

Methods

~CustomAction()

protected ~CustomAction()