Table of Contents

Class MtDti

Namespace
SharpPluginLoader.Core
Assembly
SharpPluginLoader.Core.dll

This class represents a Monster Hunter World: Iceborne data type info.

public class MtDti : MtObject
Inheritance
MtDti
Inherited Members

Constructors

MtDti()

Constructs a new instance of MtDti with nullptr as the native pointer.

public MtDti()

MtDti(nint)

Constructs a new instance of MtDti with the specified native pointer.

public MtDti(nint instance)

Parameters

instance nint

Properties

AllChildren

Gets all classes that inherit from this class (directly or indirectly).

public MtDti[] AllChildren { get; }

Property Value

MtDti[]

AllocatorIndex

Gets the index of the allocator used by this class.

public uint AllocatorIndex { get; }

Property Value

uint

Attributes

Gets the attributes of the class.

public uint Attributes { get; }

Property Value

uint

Child

Gets the first child class of this class.

public MtDti? Child { get; }

Property Value

MtDti

Children

Gets all classes that inherit directly from this class.

public MtDti[] Children { get; }

Property Value

MtDti[]

Id

Gets the id of the class.

public uint Id { get; }

Property Value

uint

Gets the linked class of this class. This property is used by the game to form a hash table of classes.

public MtDti? Link { get; }

Property Value

MtDti

Name

Gets the name of the class.

public string Name { get; }

Property Value

string

Next

Gets the next class in the list.

public MtDti? Next { get; }

Property Value

MtDti

Parent

Gets the parent class of this class.

public MtDti? Parent { get; }

Property Value

MtDti

Size

Gets the size in bytes of the class.

public uint Size { get; }

Property Value

uint

Methods

CreateInstance<T>()

Creates and instantiates a new instance of the of the type represented by this class.

public T CreateInstance<T>() where T : MtObject, new()

Returns

T

The created object

Type Parameters

T

The type of the object

Find(string)

Finds a DTI by its name.

public static MtDti? Find(string name)

Parameters

name string

The fully qualified name of the class

Returns

MtDti

The DTI or null if no DTI was found

Find(uint)

Finds a DTI by its id.

public static MtDti? Find(uint id)

Parameters

id uint

The id of the class

Returns

MtDti

The DTI or null if no DTI was found

InheritsFrom(MtDti)

Checks if this class inherits from the specified class.

public bool InheritsFrom(MtDti dti)

Parameters

dti MtDti

The class to check for

Returns

bool

True if the class inherits from the specified class

InheritsFrom(string)

Checks if this class inherits from the class with the specified name.

public bool InheritsFrom(string name)

Parameters

name string

The name of the class to check

Returns

bool

True if the class inherits from the specified class

InheritsFrom(uint)

Checks if this class inherits from the class with the specified CRC.

public bool InheritsFrom(uint id)

Parameters

id uint

The CRC hash of the class to check

Returns

bool

True if the class inherits from the specified class

Instantiate<T>(T)

Instantiates the specified object with the type represented by this class.

public T? Instantiate<T>(T obj) where T : MtObject

Parameters

obj T

The object to instantiate

Returns

T

The object if the instantiation was successfull or null

Type Parameters

T

The type of the object

MakeId(string)

Computes the dti id of a class from its name.

public static uint MakeId(string name)

Parameters

name string

The name of the class

Returns

uint

The computed dti id of the class

Register(string, long, DtiDtorDelegate, DtiNewDelegate, DtiCtorDelegate, DtiCtorArrayDelegate, MtDti?, uint, int)

Registers a new DTI.

public static MtDti Register(string name, long size, DtiDtorDelegate dtor, DtiNewDelegate @new, DtiCtorDelegate ctor, DtiCtorArrayDelegate ctorArray, MtDti? parent = null, uint attr = 0, int allocatorIndex = 0)

Parameters

name string

The name of the class

size long

The size of the class

dtor DtiDtorDelegate

The DTI's destructor

new DtiNewDelegate

The factory method for creating new instances of the class

ctor DtiCtorDelegate

The constructor for initializing new instances of the class

ctorArray DtiCtorArrayDelegate

The constructor for initializing arrays of instances of the class

parent MtDti

The parent class of the class, use MtObject if unsure

attr uint

The attributes of the class, mostly unknown

allocatorIndex int

The index of the allocator used by the class, leave at 0 if unsure

Returns

MtDti

The newly registered DTI