Object functions

class ObjectFunctions

Public Static Functions

static void ReadReceivedObjectList() noexcept

Use the last object list received by the server as the one being read.

Returns

void

static void ClearObjectList() noexcept

Clear the data from the object list stored on the server.

Returns

void

static void SetObjectListPid(unsigned short pid) noexcept

Set the pid attached to the ObjectList.

Parameters

pid – The player ID to whom the object list should be attached.

Returns

void

static void CopyReceivedObjectListToStore() noexcept

Take the contents of the read-only object list last received by the server from a player and move its contents to the stored object list that can be sent by the server.

Returns

void

static unsigned int GetObjectListSize() noexcept

Get the number of indexes in the read object list.

Returns

The number of indexes.

static unsigned char GetObjectListOrigin() noexcept

Get the origin of the read object list.

Returns

The origin (0 for CLIENT_GAMEPLAY, 1 for CLIENT_CONSOLE, 2 for CLIENT_DIALOGUE, 3 for CLIENT_SCRIPT_LOCAL, 4 for CLIENT_SCRIPT_GLOBAL, 5 for SERVER_SCRIPT).

static const char *GetObjectListClientScript() noexcept

Get the client script that the read object list originated from.

Returns

The ID of the client script.

static unsigned char GetObjectListAction() noexcept

Get the action type used in the read object list.

Returns

The action type (0 for SET, 1 for ADD, 2 for REMOVE, 3 for REQUEST).

static const char *GetObjectListConsoleCommand() noexcept

Get the console command used in the read object list.

Returns

The console command.

static unsigned char GetObjectListContainerSubAction() noexcept

Get the container subaction type used in the read object list.

Returns

The action type (0 for NONE, 1 for DRAG, 2 for DROP, 3 for TAKE_ALL).

static bool IsObjectPlayer(unsigned int index) noexcept

Check whether the object at a certain index in the read object list is a player.

Note: Although most player data and events are dealt with in Player packets, object activation is general enough for players themselves to be included as objects in ObjectActivate packets.

Parameters

index – The index of the object.

Returns

Whether the object is a player.

static int GetObjectPid(unsigned int index) noexcept

Get the player ID of the object at a certain index in the read object list, only valid if the object is a player.

Note: Currently, players can only be objects in ObjectActivate and ConsoleCommand packets.

Parameters

index – The index of the object.

Returns

The player ID of the object.

static const char *GetObjectRefId(unsigned int index) noexcept

Get the refId of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The refId.

static unsigned int GetObjectRefNum(unsigned int index) noexcept

Get the refNum of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The refNum.

static unsigned int GetObjectMpNum(unsigned int index) noexcept

Get the mpNum of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The mpNum.

static int GetObjectCount(unsigned int index) noexcept

Get the count of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The object count.

static int GetObjectCharge(unsigned int index) noexcept

Get the charge of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The charge.

static double GetObjectEnchantmentCharge(unsigned int index) noexcept

Get the enchantment charge of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The enchantment charge.

static const char *GetObjectSoul(unsigned int index) noexcept

Get the soul of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The soul.

static int GetObjectGoldValue(unsigned int index) noexcept

Get the gold value of the object at a certain index in the read object list.

This is used solely to get the gold value of gold. It is not used for other objects.

Parameters

index – The index of the object.

Returns

The gold value.

static double GetObjectScale(unsigned int index) noexcept

Get the object scale of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The object scale.

static const char *GetObjectSoundId(unsigned int index) noexcept

Get the object sound ID of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The object sound ID.

static bool GetObjectState(unsigned int index) noexcept

Get the object state of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The object state.

static int GetObjectDoorState(unsigned int index) noexcept

Get the door state of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The door state.

static int GetObjectLockLevel(unsigned int index) noexcept

Get the lock level of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The lock level.

static unsigned int GetObjectDialogueChoiceType(unsigned int index) noexcept

Get the dialogue choice type for the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The dialogue choice type.

static const char *GetObjectDialogueChoiceTopic(unsigned int index) noexcept

Get the dialogue choice topic for the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The dialogue choice topic.

static unsigned int GetObjectGoldPool(unsigned int index) noexcept

Get the gold pool of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The gold pool.

static double GetObjectLastGoldRestockHour(unsigned int index) noexcept

Get the hour of the last gold restock of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The hour of the last gold restock.

static int GetObjectLastGoldRestockDay(unsigned int index) noexcept

Get the day of the last gold restock of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The day of the last gold restock.

static bool DoesObjectHavePlayerActivating(unsigned int index) noexcept

Check whether the object at a certain index in the read object list has been activated by a player.

Parameters

index – The index of the object.

Returns

Whether the object has been activated by a player.

static int GetObjectActivatingPid(unsigned int index) noexcept

Get the player ID of the player activating the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The player ID of the activating player.

static const char *GetObjectActivatingRefId(unsigned int index) noexcept

Get the refId of the actor activating the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The refId of the activating actor.

static unsigned int GetObjectActivatingRefNum(unsigned int index) noexcept

Get the refNum of the actor activating the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The refNum of the activating actor.

static unsigned int GetObjectActivatingMpNum(unsigned int index) noexcept

Get the mpNum of the actor activating the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The mpNum of the activating actor.

static const char *GetObjectActivatingName(unsigned int index) noexcept

Get the name of the actor activating the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The name of the activating actor.

static bool GetObjectHitSuccess(unsigned int index) noexcept

Check whether the object at a certain index in the read object list has been hit successfully.

Parameters

index – The index of the object.

Returns

The success state.

static double GetObjectHitDamage(unsigned int index) noexcept

Get the damage caused to the object at a certain index in the read object list in a hit.

Parameters

index – The index of the object.

Returns

The damage.

static bool GetObjectHitBlock(unsigned int index) noexcept

Check whether the object at a certain index in the read object list has blocked the hit on it.

Parameters

index – The index of the object.

Returns

The block state.

static bool GetObjectHitKnockdown(unsigned int index) noexcept

Check whether the object at a certain index in the read object list has been knocked down.

Parameters

index – The index of the object.

Returns

The knockdown state.

static bool DoesObjectHavePlayerHitting(unsigned int index) noexcept

Check whether the object at a certain index in the read object list has been hit by a player.

Parameters

index – The index of the object.

Returns

Whether the object has been hit by a player.

static int GetObjectHittingPid(unsigned int index) noexcept

Get the player ID of the player hitting the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The player ID of the hitting player.

static const char *GetObjectHittingRefId(unsigned int index) noexcept

Get the refId of the actor hitting the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The refId of the hitting actor.

static unsigned int GetObjectHittingRefNum(unsigned int index) noexcept

Get the refNum of the actor hitting the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The refNum of the hitting actor.

static unsigned int GetObjectHittingMpNum(unsigned int index) noexcept

Get the mpNum of the actor hitting the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The mpNum of the hitting actor.

static const char *GetObjectHittingName(unsigned int index) noexcept

Get the name of the actor hitting the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The name of the hitting actor.

static bool GetObjectSummonState(unsigned int index) noexcept

Check whether the object at a certain index in the read object list is a summon.

Only living actors can be summoned.

Returns

The summon state.

static double GetObjectSummonEffectId(unsigned int index) noexcept

Get the summon effect ID of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The summon effect ID.

static const char *GetObjectSummonSpellId(unsigned int index) noexcept

Get the summon spell ID of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The summon spell ID.

static double GetObjectSummonDuration(unsigned int index) noexcept

Get the summon duration of the object at a certain index in the read object list.

Note: Returns -1 if indefinite.

Parameters

index – The index of the object.

Returns

The summon duration.

static bool DoesObjectHavePlayerSummoner(unsigned int index) noexcept

Check whether the object at a certain index in the read object list has a player as its summoner.

Only living actors can be summoned.

Parameters

index – The index of the object.

Returns

Whether a player is the summoner of the object.

static int GetObjectSummonerPid(unsigned int index) noexcept

Get the player ID of the summoner of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The player ID of the summoner.

static const char *GetObjectSummonerRefId(unsigned int index) noexcept

Get the refId of the actor summoner of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The refId of the summoner.

static unsigned int GetObjectSummonerRefNum(unsigned int index) noexcept

Get the refNum of the actor summoner of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The refNum of the summoner.

static unsigned int GetObjectSummonerMpNum(unsigned int index) noexcept

Get the mpNum of the actor summoner of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The mpNum of the summoner.

static double GetObjectPosX(unsigned int index) noexcept

Get the X position of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The X position.

static double GetObjectPosY(unsigned int index) noexcept

Get the Y position of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The Y position.

static double GetObjectPosZ(unsigned int index) noexcept

Get the Z position at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The Z position.

static double GetObjectRotX(unsigned int index) noexcept

Get the X rotation of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The X rotation.

static double GetObjectRotY(unsigned int index) noexcept

Get the Y rotation of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The Y rotation.

static double GetObjectRotZ(unsigned int index) noexcept

Get the Z rotation of the object at a certain index in the read object list.

Parameters

index – The index of the object.

Returns

The Z rotation.

static const char *GetVideoFilename(unsigned int index) noexcept

Get the videoFilename of the object at a certain index in the read object list.

Returns

The videoFilename.

static unsigned int GetClientLocalsSize(unsigned int objectIndex) noexcept

Get the number of client local variables of the object at a certain index in the read object list.

Parameters

objectIndex – The index of the object.

Returns

The number of client local variables.

static unsigned int GetClientLocalInternalIndex(unsigned int objectIndex, unsigned int variableIndex) noexcept

Get the internal script index of the client local variable at a certain variableIndex in the client locals of the object at a certain objectIndex in the read object list.

Parameters
  • objectIndex – The index of the object.

  • variableIndex – The index of the client local.

Returns

The internal script index.

static unsigned short GetClientLocalVariableType(unsigned int objectIndex, unsigned int variableIndex) noexcept

Get the type of the client local variable at a certain variableIndex in the client locals of the object at a certain objectIndex in the read object list.

Parameters
  • objectIndex – The index of the object.

  • variableIndex – The index of the client local.

Returns

The variable type (0 for INTEGER, 1 for LONG, 2 for FLOAT).

static int GetClientLocalIntValue(unsigned int objectIndex, unsigned int variableIndex) noexcept

Get the integer value of the client local variable at a certain variableIndex in the client locals of the object at a certain objectIndex in the read object list.

Parameters
  • objectIndex – The index of the object.

  • variableIndex – The index of the client local.

Returns

The integer value.

static double GetClientLocalFloatValue(unsigned int objectIndex, unsigned int variableIndex) noexcept

Get the float value of the client local variable at a certain variableIndex in the client locals of the object at a certain objectIndex in the read object list.

Parameters
  • objectIndex – The index of the object.

  • variableIndex – The index of the client local.

Returns

The float value.

static unsigned int GetContainerChangesSize(unsigned int objectIndex) noexcept

Get the number of container item indexes of the object at a certain index in the read object list.

Parameters

objectIndex – The index of the object.

Returns

The number of container item indexes.

static const char *GetContainerItemRefId(unsigned int objectIndex, unsigned int itemIndex) noexcept

Get the refId of the container item at a certain itemIndex in the container changes of the object at a certain objectIndex in the read object list.

Parameters
  • objectIndex – The index of the object.

  • itemIndex – The index of the container item.

Returns

The refId.

static int GetContainerItemCount(unsigned int objectIndex, unsigned int itemIndex) noexcept

Get the item count of the container item at a certain itemIndex in the container changes of the object at a certain objectIndex in the read object list.

Parameters
  • objectIndex – The index of the object.

  • itemIndex – The index of the container item.

Returns

The item count.

static int GetContainerItemCharge(unsigned int objectIndex, unsigned int itemIndex) noexcept

Get the charge of the container item at a certain itemIndex in the container changes of the object at a certain objectIndex in the read object list.

Parameters
  • objectIndex – The index of the object.

  • itemIndex – The index of the container item.

Returns

The charge.

static double GetContainerItemEnchantmentCharge(unsigned int objectIndex, unsigned int itemIndex) noexcept

Get the enchantment charge of the container item at a certain itemIndex in the container changes of the object at a certain objectIndex in the read object list.

Parameters
  • objectIndex – The index of the object.

  • itemIndex – The index of the container item.

Returns

The enchantment charge.

static const char *GetContainerItemSoul(unsigned int objectIndex, unsigned int itemIndex) noexcept

Get the soul of the container item at a certain itemIndex in the container changes of the object at a certain objectIndex in the read object list.

Parameters
  • objectIndex – The index of the object.

  • itemIndex – The index of the container item.

Returns

The soul.

static int GetContainerItemActionCount(unsigned int objectIndex, unsigned int itemIndex) noexcept

Get the action count of the container item at a certain itemIndex in the container changes of the object at a certain objectIndex in the read object list.

Parameters
  • objectIndex – The index of the object.

  • itemIndex – The index of the container item.

Returns

The action count.

static bool DoesObjectHaveContainer(unsigned int index) noexcept

Check whether the object at a certain index in the read object list has a container.

Note: Only ObjectLists from ObjectPlace packets contain this information. Objects from received ObjectSpawn packets can always be assumed to have a container.

Parameters

index – The index of the object.

Returns

Whether the object has a container.

static bool IsObjectDroppedByPlayer(unsigned int index) noexcept

Check whether the object at a certain index in the read object list has been dropped by a player.

Note: Only ObjectLists from ObjectPlace packets contain this information.

Parameters

index – The index of the object.

Returns

Whether the object has been dropped by a player.

static void SetObjectListCell(const char *cellDescription) noexcept

Set the cell of the temporary object list stored on the server.

The cell is determined to be an exterior cell if it fits the pattern of a number followed by a comma followed by another number.

Parameters

cellDescription – The description of the cell.

Returns

void

static void SetObjectListAction(unsigned char action) noexcept

Set the action type of the temporary object list stored on the server.

Parameters

action – The action type (0 for SET, 1 for ADD, 2 for REMOVE, 3 for REQUEST).

Returns

void

static void SetObjectListContainerSubAction(unsigned char subAction) noexcept

Set the container subaction type of the temporary object list stored on the server.

Parameters

subAction – The action type (0 for NONE, 1 for DRAG, 2 for DROP, 3 for TAKE_ALL, 4 for REPLY_TO_REQUEST, 5 for RESTOCK_RESULT).

Returns

void

static void SetObjectListConsoleCommand(const char *consoleCommand) noexcept

Set the console command of the temporary object list stored on the server.

When sent, the command will run once on every object added to the object list. If no objects have been added, it will run once without any object reference.

Parameters

consoleCommand – The console command.

Returns

void

static void SetObjectRefId(const char *refId) noexcept

Set the refId of the temporary object stored on the server.

Parameters

refId – The refId.

Returns

void

static void SetObjectRefNum(int refNum) noexcept

Set the refNum of the temporary object stored on the server.

Every object loaded from .ESM and .ESP data files has a unique refNum which needs to be retained to refer to it in packets.

On the other hand, objects placed or spawned via the server should always have a refNum of 0.

Parameters

refNum – The refNum.

Returns

void

static void SetObjectMpNum(int mpNum) noexcept

Set the mpNum of the temporary object stored on the server.

Every object placed or spawned via the server is assigned an mpNum by incrementing the last mpNum stored on the server. Scripts should take care to ensure that mpNums are kept unique for these objects.

Objects loaded from .ESM and .ESP data files should always have an mpNum of 0, because they have unique refNumes instead.

Parameters

mpNum – The mpNum.

Returns

void

static void SetObjectCount(int count) noexcept

Set the object count of the temporary object stored on the server.

This determines the quantity of an object, with the exception of gold.

Parameters

count – The object count.

Returns

void

static void SetObjectCharge(int charge) noexcept

Set the charge of the temporary object stored on the server.

Object durabilities are set through this value.

Parameters

charge – The charge.

Returns

void

static void SetObjectEnchantmentCharge(double enchantmentCharge) noexcept

Set the enchantment charge of the temporary object stored on the server.

Object durabilities are set through this value.

Parameters

enchantmentCharge – The enchantment charge.

Returns

void

static void SetObjectSoul(const char *soul) noexcept

Set the soul of the temporary object stored on the server.

Parameters

soul – The ID of the soul.

Returns

void

static void SetObjectGoldValue(int goldValue) noexcept

Set the gold value of the temporary object stored on the server.

This is used solely to set the gold value for gold. It has no effect on other objects.

Parameters

goldValue – The gold value.

Returns

void

static void SetObjectScale(double scale) noexcept

Set the scale of the temporary object stored on the server.

Objects are smaller or larger than their default size based on their scale.

Parameters

scale – The scale.

Returns

void

static void SetObjectState(bool objectState) noexcept

Set the object state of the temporary object stored on the server.

Objects are enabled or disabled based on their object state.

Parameters

objectState – The object state.

Returns

void

static void SetObjectLockLevel(int lockLevel) noexcept

Set the lock level of the temporary object stored on the server.

Parameters

lockLevel – The lock level.

Returns

void

static void SetObjectDialogueChoiceType(unsigned int dialogueChoiceType) noexcept

Set the dialogue choice type of the temporary object stored on the server.

Parameters

dialogueChoiceType – The dialogue choice type.

Returns

void

static void SetObjectDialogueChoiceTopic(const char *topic) noexcept

Set the dialogue choice topic for the temporary object stored on the server.

Parameters

topic – The dialogue choice topic.

Returns

void

static void SetObjectGoldPool(unsigned int goldPool) noexcept

Set the gold pool of the temporary object stored on the server.

Parameters

goldPool – The gold pool.

Returns

void

static void SetObjectLastGoldRestockHour(double hour) noexcept

Set the hour of the last gold restock of the temporary object stored on the server.

Parameters

hour – The hour of the last gold restock.

Returns

void

static void SetObjectLastGoldRestockDay(int day) noexcept

Set the day of the last gold restock of the temporary object stored on the server.

Parameters

day – The day of the last gold restock.

Returns

void

static void SetObjectDisarmState(bool disarmState) noexcept

Set the disarm state of the temporary object stored on the server.

Parameters

disarmState – The disarmState.

Returns

void

static void SetObjectDroppedByPlayerState(bool dropedByPlayerState) noexcept

Set the droppedByPlayer state of the temporary object stored on the server.

Parameters

dropedByPlayerState – Whether the object has been dropped by a player or not.

Returns

void

static void SetObjectPosition(double x, double y, double z) noexcept

Set the position of the temporary object stored on the server.

Parameters
  • x – The X position.

  • y – The Y position.

  • z – The Z position.

Returns

void

static void SetObjectRotation(double x, double y, double z) noexcept

Set the rotation of the temporary object stored on the server.

Parameters
  • x – The X rotation.

  • y – The Y rotation.

  • z – The Z rotation.

Returns

void

static void SetObjectSummonState(bool summonState) noexcept

Set the summon state of the temporary object stored on the server.

This only affects living actors and determines whether they are summons of another living actor.

Parameters

summonState – The summon state.

Returns

void

static void SetObjectSummonEffectId(int summonEffectId) noexcept

Set the summon effect ID of the temporary object stored on the server.

Parameters

summonEffectId – The summon effect ID.

Returns

void

static void SetObjectSummonSpellId(const char *summonSpellId) noexcept

Set the summon spell ID of the temporary object stored on the server.

Parameters

summonSpellId – The summon spell ID.

Returns

void

static void SetObjectSummonDuration(double summonDuration) noexcept

Set the summon duration of the temporary object stored on the server.

Parameters

summonDuration – The summon duration.

Returns

void

static void SetObjectSummonerPid(unsigned short pid) noexcept

Set the player ID of the summoner of the temporary object stored on the server.

Parameters

pid – The player ID of the summoner.

Returns

void

static void SetObjectSummonerRefNum(int refNum) noexcept

Set the refNum of the actor summoner of the temporary object stored on the server.

Parameters

refNum – The refNum of the summoner.

Returns

void

static void SetObjectSummonerMpNum(int mpNum) noexcept

Set the mpNum of the actor summoner of the temporary object stored on the server.

Parameters

mpNum – The mpNum of the summoner.

Returns

void

static void SetObjectActivatingPid(unsigned short pid) noexcept

Set the player ID of the player activating the temporary object stored on the server. Currently only used for ObjectActivate packets.

Parameters

pid – The pid of the player.

Returns

void

static void SetObjectDoorState(int doorState) noexcept

Set the door state of the temporary object stored on the server.

Doors are open or closed based on their door state.

Parameters

doorState – The door state.

Returns

void

static void SetObjectDoorTeleportState(bool teleportState) noexcept

Set the teleport state of the temporary object stored on the server.

If a door’s teleport state is true, interacting with the door teleports a player to its destination. If it’s false, it opens and closes like a regular door.

Parameters

teleportState – The teleport state.

Returns

void

static void SetObjectDoorDestinationCell(const char *cellDescription) noexcept

Set the door destination cell of the temporary object stored on the server.

The cell is determined to be an exterior cell if it fits the pattern of a number followed by a comma followed by another number.

Parameters

cellDescription – The description of the cell.

Returns

void

static void SetObjectDoorDestinationPosition(double x, double y, double z) noexcept

Set the door destination position of the temporary object stored on the server.

Parameters
  • x – The X position.

  • y – The Y position.

  • z – The Z position.

Returns

void

static void SetObjectDoorDestinationRotation(double x, double z) noexcept

Set the door destination rotation of the temporary object stored on the server.

Note: Because this sets the rotation a player will have upon using the door, and rotation on the Y axis has no effect on players, the Y value has been omitted as an argument.

Parameters
  • x – The X rotation.

  • z – The Z rotation.

Returns

void

static void SetPlayerAsObject(unsigned short pid) noexcept

Set a player as the object in the temporary object stored on the server. Currently only used for ConsoleCommand packets.

Parameters

pid – The pid of the player.

Returns

void

static void SetContainerItemRefId(const char *refId) noexcept

Set the refId of the temporary container item stored on the server.

Parameters

refId – The refId.

Returns

void

static void SetContainerItemCount(int count) noexcept

Set the item count of the temporary container item stored on the server.

Parameters

count – The item count.

Returns

void

static void SetContainerItemCharge(int charge) noexcept

Set the charge of the temporary container item stored on the server.

Parameters

charge – The charge.

Returns

void

static void SetContainerItemEnchantmentCharge(double enchantmentCharge) noexcept

Set the enchantment charge of the temporary container item stored on the server.

Parameters

enchantmentCharge – The enchantment charge.

Returns

void

static void SetContainerItemSoul(const char *soul) noexcept

Set the soul of the temporary container item stored on the server.

Parameters

soul – The soul.

Returns

void

static void SetContainerItemActionCountByIndex(unsigned int objectIndex, unsigned int itemIndex, int actionCount) noexcept

Set the action count of the container item at a certain itemIndex in the container changes of the object at a certain objectIndex in the object list stored on the server.

When resending a received Container packet, this allows you to correct the amount of items removed from a container by a player when it conflicts with what other players have already taken.

Parameters
  • objectIndex – The index of the object.

  • itemIndex – The index of the container item.

  • actionCount – The action count.

Returns

void

static void AddObject() noexcept

Add a copy of the server’s temporary object to the server’s currently stored object list.

In the process, the server’s temporary object will automatically be cleared so a new one can be set up.

Returns

void

static void AddClientLocalInteger(int internalIndex, int intValue, unsigned int variableType) noexcept

Add a client local variable with an integer value to the client locals of the server’s temporary object.

Parameters
  • internalIndex – The internal script index of the client local.

  • variableType – The variable type (0 for SHORT, 1 for LONG).

  • intValue – The integer value of the client local.

Returns

void

static void AddClientLocalFloat(int internalIndex, double floatValue) noexcept

Add a client local variable with a float value to the client locals of the server’s temporary object.

Parameters
  • internalIndex – The internal script index of the client local.

  • floatValue – The float value of the client local.

Returns

void

static void AddContainerItem() noexcept

Add a copy of the server’s temporary container item to the container changes of the server’s temporary object.

In the process, the server’s temporary container item will automatically be cleared so a new one can be set up.

Returns

void

static void SendObjectActivate(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectActivate packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectPlace(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectPlace packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectSpawn(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectSpawn packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectDelete(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectDelete packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectLock(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectLock packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectDialogueChoice(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectDialogueChoice packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectMiscellaneous(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectMiscellaneous packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectRestock(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectRestock packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectTrap(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectTrap packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectScale(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectScale packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectSound(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectSound packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectState(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectState packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectMove(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectMove packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendObjectRotate(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send an ObjectRotate packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendDoorState(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send a DoorState packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendDoorDestination(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send a DoorDestination packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendContainer(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send a Container packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendVideoPlay(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send a VideoPlay packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendClientScriptLocal(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send a ClientScriptLocal packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void

static void SendConsoleCommand(bool sendToOtherPlayers, bool skipAttachedPlayer) noexcept

Send a ConsoleCommand packet.

Parameters
  • sendToOtherPlayers – Whether this packet should be sent to players other than the player attached to the packet (false by default).

  • skipAttachedPlayer – Whether the packet should skip being sent to the player attached to the packet (false by default).

Returns

void