Interface ICustomModelsComponent.IManagedInterface
Represents the managed interface implemented by its unmanaged counterpart.
public interface ICustomModelsComponent.IManagedInterface : IUnmanagedInterface
- Inherited Members
Methods
AddCustomModel(ModelType, int, int, string, string, int, byte, byte)
Adds a custom model to the server.
bool AddCustomModel(ModelType type, int id, int baseId, string dffName, string txdName, int virtualWorld = -1, byte timeOn = 0, byte timeOff = 0)
Parameters
typeModelTypeThe type of model being added.
idintThe custom model ID to assign.
baseIdintThe base model ID to replace.
dffNamestringThe name of the DFF file.
txdNamestringThe name of the TXD file.
virtualWorldintThe virtual world for the model (-1 for all).
timeOnbyteTime when the model is active (hour).
timeOffbyteTime when the model is inactive (hour).
Returns
- bool
trueif the model was added successfully; otherwise,false.
GetBaseModel(ref uint, ref uint)
Gets the relationship between a base model and custom model.
bool GetBaseModel(ref uint baseModelIdOrInput, ref uint customModel)
Parameters
Returns
- bool
trueif the mapping exists; otherwise,false.
GetCustomModelPath(int, out string?, out string?)
Gets the file paths for a custom model.
bool GetCustomModelPath(int modelId, out string? dffPath, out string? txdPath)
Parameters
modelIdintThe custom model ID.
dffPathstringWhen the method returns, contains the DFF file path.
txdPathstringWhen the method returns, contains the TXD file path.
Returns
- bool
trueif the paths were retrieved successfully; otherwise,false.
GetEventDispatcher()
Gets the event dispatcher for custom model events.
IEventDispatcher<IPlayerModelsEventHandler> GetEventDispatcher()
Returns
- IEventDispatcher<IPlayerModelsEventHandler>
The event dispatcher instance.
GetModelNameFromChecksum(uint)
Gets the model name from its checksum.
string? GetModelNameFromChecksum(uint checksum)
Parameters
checksumuintThe model checksum.
Returns
- string
The model name, or
nullif not found.
IsValidCustomModel(int)
Checks whether a model ID is a valid custom model.
bool IsValidCustomModel(int modelId)
Parameters
modelIdintThe model ID to check.
Returns
- bool
trueif the model is a valid custom model; otherwise,false.