|
|
@ -2,78 +2,82 @@
|
|
|
|
#define OPENMW_WORLDAPI_HPP
|
|
|
|
#define OPENMW_WORLDAPI_HPP
|
|
|
|
|
|
|
|
|
|
|
|
#define WORLDAPI \
|
|
|
|
#define WORLDAPI \
|
|
|
|
{"ReadLastEvent", WorldFunctions::ReadLastEvent},\
|
|
|
|
{"ReadLastEvent", WorldFunctions::ReadLastEvent},\
|
|
|
|
{"InitializeEvent", WorldFunctions::InitializeEvent},\
|
|
|
|
{"InitializeEvent", WorldFunctions::InitializeEvent},\
|
|
|
|
\
|
|
|
|
\
|
|
|
|
{"GetObjectChangesSize", WorldFunctions::GetObjectChangesSize},\
|
|
|
|
{"GetObjectChangesSize", WorldFunctions::GetObjectChangesSize},\
|
|
|
|
{"GetEventAction", WorldFunctions::GetEventAction},\
|
|
|
|
{"GetEventAction", WorldFunctions::GetEventAction},\
|
|
|
|
\
|
|
|
|
\
|
|
|
|
{"GetObjectRefId", WorldFunctions::GetObjectRefId},\
|
|
|
|
{"GetObjectRefId", WorldFunctions::GetObjectRefId},\
|
|
|
|
{"GetObjectRefNumIndex", WorldFunctions::GetObjectRefNumIndex},\
|
|
|
|
{"GetObjectRefNumIndex", WorldFunctions::GetObjectRefNumIndex},\
|
|
|
|
{"GetObjectMpNum", WorldFunctions::GetObjectMpNum},\
|
|
|
|
{"GetObjectMpNum", WorldFunctions::GetObjectMpNum},\
|
|
|
|
{"GetObjectCount", WorldFunctions::GetObjectCount},\
|
|
|
|
{"GetObjectCount", WorldFunctions::GetObjectCount},\
|
|
|
|
{"GetObjectCharge", WorldFunctions::GetObjectCharge},\
|
|
|
|
{"GetObjectCharge", WorldFunctions::GetObjectCharge},\
|
|
|
|
{"GetObjectGoldValue", WorldFunctions::GetObjectGoldValue},\
|
|
|
|
{"GetObjectEnchantmentCharge", WorldFunctions::GetObjectEnchantmentCharge},\
|
|
|
|
{"GetObjectScale", WorldFunctions::GetObjectScale},\
|
|
|
|
{"GetObjectGoldValue", WorldFunctions::GetObjectGoldValue},\
|
|
|
|
{"GetObjectState", WorldFunctions::GetObjectState},\
|
|
|
|
{"GetObjectScale", WorldFunctions::GetObjectScale},\
|
|
|
|
{"GetObjectDoorState", WorldFunctions::GetObjectDoorState},\
|
|
|
|
{"GetObjectState", WorldFunctions::GetObjectState},\
|
|
|
|
{"GetObjectLockLevel", WorldFunctions::GetObjectLockLevel},\
|
|
|
|
{"GetObjectDoorState", WorldFunctions::GetObjectDoorState},\
|
|
|
|
{"GetObjectPosX", WorldFunctions::GetObjectPosX},\
|
|
|
|
{"GetObjectLockLevel", WorldFunctions::GetObjectLockLevel},\
|
|
|
|
{"GetObjectPosY", WorldFunctions::GetObjectPosY},\
|
|
|
|
{"GetObjectPosX", WorldFunctions::GetObjectPosX},\
|
|
|
|
{"GetObjectPosZ", WorldFunctions::GetObjectPosZ},\
|
|
|
|
{"GetObjectPosY", WorldFunctions::GetObjectPosY},\
|
|
|
|
{"GetObjectRotX", WorldFunctions::GetObjectRotX},\
|
|
|
|
{"GetObjectPosZ", WorldFunctions::GetObjectPosZ},\
|
|
|
|
{"GetObjectRotY", WorldFunctions::GetObjectRotY},\
|
|
|
|
{"GetObjectRotX", WorldFunctions::GetObjectRotX},\
|
|
|
|
{"GetObjectRotZ", WorldFunctions::GetObjectRotZ},\
|
|
|
|
{"GetObjectRotY", WorldFunctions::GetObjectRotY},\
|
|
|
|
|
|
|
|
{"GetObjectRotZ", WorldFunctions::GetObjectRotZ},\
|
|
|
|
\
|
|
|
|
\
|
|
|
|
{"GetContainerChangesSize", WorldFunctions::GetContainerChangesSize},\
|
|
|
|
{"GetContainerChangesSize", WorldFunctions::GetContainerChangesSize},\
|
|
|
|
{"GetContainerItemRefId", WorldFunctions::GetContainerItemRefId},\
|
|
|
|
{"GetContainerItemRefId", WorldFunctions::GetContainerItemRefId},\
|
|
|
|
{"GetContainerItemCount", WorldFunctions::GetContainerItemCount},\
|
|
|
|
{"GetContainerItemCount", WorldFunctions::GetContainerItemCount},\
|
|
|
|
{"GetContainerItemCharge", WorldFunctions::GetContainerItemCharge},\
|
|
|
|
{"GetContainerItemCharge", WorldFunctions::GetContainerItemCharge},\
|
|
|
|
{"GetContainerItemActionCount", WorldFunctions::GetContainerItemActionCount},\
|
|
|
|
{"GetContainerItemEnchantmentCharge", WorldFunctions::GetContainerItemEnchantmentCharge},\
|
|
|
|
|
|
|
|
{"GetContainerItemActionCount", WorldFunctions::GetContainerItemActionCount},\
|
|
|
|
\
|
|
|
|
\
|
|
|
|
{"SetEventCell", WorldFunctions::SetEventCell},\
|
|
|
|
{"SetEventCell", WorldFunctions::SetEventCell},\
|
|
|
|
{"SetEventAction", WorldFunctions::SetEventAction},\
|
|
|
|
{"SetEventAction", WorldFunctions::SetEventAction},\
|
|
|
|
{"SetEventConsoleCommand", WorldFunctions::SetEventConsoleCommand},\
|
|
|
|
{"SetEventConsoleCommand", WorldFunctions::SetEventConsoleCommand},\
|
|
|
|
\
|
|
|
|
\
|
|
|
|
{"SetObjectRefId", WorldFunctions::SetObjectRefId},\
|
|
|
|
{"SetObjectRefId", WorldFunctions::SetObjectRefId},\
|
|
|
|
{"SetObjectRefNumIndex", WorldFunctions::SetObjectRefNumIndex},\
|
|
|
|
{"SetObjectRefNumIndex", WorldFunctions::SetObjectRefNumIndex},\
|
|
|
|
{"SetObjectMpNum", WorldFunctions::SetObjectMpNum},\
|
|
|
|
{"SetObjectMpNum", WorldFunctions::SetObjectMpNum},\
|
|
|
|
{"SetObjectCount", WorldFunctions::SetObjectCount},\
|
|
|
|
{"SetObjectCount", WorldFunctions::SetObjectCount},\
|
|
|
|
{"SetObjectCharge", WorldFunctions::SetObjectCharge},\
|
|
|
|
{"SetObjectCharge", WorldFunctions::SetObjectCharge},\
|
|
|
|
{"SetObjectGoldValue", WorldFunctions::SetObjectGoldValue},\
|
|
|
|
{"SetObjectEnchantmentCharge", WorldFunctions::SetObjectEnchantmentCharge},\
|
|
|
|
{"SetObjectScale", WorldFunctions::SetObjectScale},\
|
|
|
|
{"SetObjectGoldValue", WorldFunctions::SetObjectGoldValue},\
|
|
|
|
{"SetObjectState", WorldFunctions::SetObjectState},\
|
|
|
|
{"SetObjectScale", WorldFunctions::SetObjectScale},\
|
|
|
|
{"SetObjectDoorState", WorldFunctions::SetObjectDoorState},\
|
|
|
|
{"SetObjectState", WorldFunctions::SetObjectState},\
|
|
|
|
{"SetObjectLockLevel", WorldFunctions::SetObjectLockLevel},\
|
|
|
|
{"SetObjectDoorState", WorldFunctions::SetObjectDoorState},\
|
|
|
|
{"SetObjectDisarmState", WorldFunctions::SetObjectDisarmState},\
|
|
|
|
{"SetObjectLockLevel", WorldFunctions::SetObjectLockLevel},\
|
|
|
|
{"SetObjectMasterState", WorldFunctions::SetObjectMasterState},\
|
|
|
|
{"SetObjectDisarmState", WorldFunctions::SetObjectDisarmState},\
|
|
|
|
{"SetObjectPosition", WorldFunctions::SetObjectPosition},\
|
|
|
|
{"SetObjectMasterState", WorldFunctions::SetObjectMasterState},\
|
|
|
|
{"SetObjectRotation", WorldFunctions::SetObjectRotation},\
|
|
|
|
{"SetObjectPosition", WorldFunctions::SetObjectPosition},\
|
|
|
|
{"SetPlayerAsObject", WorldFunctions::SetPlayerAsObject},\
|
|
|
|
{"SetObjectRotation", WorldFunctions::SetObjectRotation},\
|
|
|
|
|
|
|
|
{"SetPlayerAsObject", WorldFunctions::SetPlayerAsObject},\
|
|
|
|
\
|
|
|
|
\
|
|
|
|
{"SetContainerItemRefId", WorldFunctions::SetContainerItemRefId},\
|
|
|
|
{"SetContainerItemRefId", WorldFunctions::SetContainerItemRefId},\
|
|
|
|
{"SetContainerItemCount", WorldFunctions::SetContainerItemCount},\
|
|
|
|
{"SetContainerItemCount", WorldFunctions::SetContainerItemCount},\
|
|
|
|
{"SetContainerItemCharge", WorldFunctions::SetContainerItemCharge},\
|
|
|
|
{"SetContainerItemCharge", WorldFunctions::SetContainerItemCharge},\
|
|
|
|
|
|
|
|
{"SetContainerItemEnchantmentCharge", WorldFunctions::SetContainerItemEnchantmentCharge},\
|
|
|
|
\
|
|
|
|
\
|
|
|
|
{"AddWorldObject", WorldFunctions::AddWorldObject},\
|
|
|
|
{"AddWorldObject", WorldFunctions::AddWorldObject},\
|
|
|
|
{"AddContainerItem", WorldFunctions::AddContainerItem},\
|
|
|
|
{"AddContainerItem", WorldFunctions::AddContainerItem},\
|
|
|
|
\
|
|
|
|
\
|
|
|
|
{"SendObjectPlace", WorldFunctions::SendObjectPlace},\
|
|
|
|
{"SendObjectPlace", WorldFunctions::SendObjectPlace},\
|
|
|
|
{"SendObjectSpawn", WorldFunctions::SendObjectSpawn},\
|
|
|
|
{"SendObjectSpawn", WorldFunctions::SendObjectSpawn},\
|
|
|
|
{"SendObjectDelete", WorldFunctions::SendObjectDelete},\
|
|
|
|
{"SendObjectDelete", WorldFunctions::SendObjectDelete},\
|
|
|
|
{"SendObjectLock", WorldFunctions::SendObjectLock},\
|
|
|
|
{"SendObjectLock", WorldFunctions::SendObjectLock},\
|
|
|
|
{"SendObjectTrap", WorldFunctions::SendObjectTrap},\
|
|
|
|
{"SendObjectTrap", WorldFunctions::SendObjectTrap},\
|
|
|
|
{"SendObjectScale", WorldFunctions::SendObjectScale},\
|
|
|
|
{"SendObjectScale", WorldFunctions::SendObjectScale},\
|
|
|
|
{"SendObjectState", WorldFunctions::SendObjectState},\
|
|
|
|
{"SendObjectState", WorldFunctions::SendObjectState},\
|
|
|
|
{"SendDoorState", WorldFunctions::SendDoorState},\
|
|
|
|
{"SendDoorState", WorldFunctions::SendDoorState},\
|
|
|
|
{"SendContainer", WorldFunctions::SendContainer},\
|
|
|
|
{"SendContainer", WorldFunctions::SendContainer},\
|
|
|
|
{"SendConsoleCommand", WorldFunctions::SendConsoleCommand},\
|
|
|
|
{"SendConsoleCommand", WorldFunctions::SendConsoleCommand},\
|
|
|
|
\
|
|
|
|
\
|
|
|
|
{"SetHour", WorldFunctions::SetHour},\
|
|
|
|
{"SetHour", WorldFunctions::SetHour},\
|
|
|
|
{"SetMonth", WorldFunctions::SetMonth},\
|
|
|
|
{"SetMonth", WorldFunctions::SetMonth},\
|
|
|
|
{"SetDay", WorldFunctions::SetDay}
|
|
|
|
{"SetDay", WorldFunctions::SetDay}
|
|
|
|
|
|
|
|
|
|
|
|
class WorldFunctions
|
|
|
|
class WorldFunctions
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
|
@ -148,6 +152,14 @@ public:
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static int GetObjectCharge(unsigned int i) noexcept;
|
|
|
|
static int GetObjectCharge(unsigned int i) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* \brief Get the enchantment charge of the object at a certain index in the read event's object changes.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param i The index of the object.
|
|
|
|
|
|
|
|
* \return The enchantment charge.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
static int GetObjectEnchantmentCharge(unsigned int i) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Get the gold value of the object at a certain index in the read event's object
|
|
|
|
* \brief Get the gold value of the object at a certain index in the read event's object
|
|
|
|
* changes.
|
|
|
|
* changes.
|
|
|
@ -287,6 +299,16 @@ public:
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static int GetContainerItemCharge(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
|
|
|
static int GetContainerItemCharge(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* \brief 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 event's object changes.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param objectIndex The index of the object.
|
|
|
|
|
|
|
|
* \param itemIndex The index of the container item.
|
|
|
|
|
|
|
|
* \return The enchantment charge.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
static int GetContainerItemEnchantmentCharge(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Get the action count of the container item at a certain itemIndex in the container
|
|
|
|
* \brief 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 event's object changes.
|
|
|
|
* changes of the object at a certain objectIndex in the read event's object changes.
|
|
|
@ -384,6 +406,16 @@ public:
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void SetObjectCharge(int charge) noexcept;
|
|
|
|
static void SetObjectCharge(int charge) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* \brief Set the enchantment charge of the temporary world object stored on the server.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* Object durabilities are set through this value.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param charge The enchantment charge.
|
|
|
|
|
|
|
|
* \return void
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void SetObjectEnchantmentCharge(int enchantmentCharge) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Set the gold value of the temporary world object stored on the server.
|
|
|
|
* \brief Set the gold value of the temporary world object stored on the server.
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -504,6 +536,14 @@ public:
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
static void SetContainerItemCharge(int charge) noexcept;
|
|
|
|
static void SetContainerItemCharge(int charge) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* \brief Set the enchantment charge of the temporary container item stored on the server.
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* \param charge The enchantment charge.
|
|
|
|
|
|
|
|
* \return void
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void SetContainerItemEnchantmentCharge(int enchantmentCharge) noexcept;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* \brief Add a copy of the server's temporary world object to the server's temporary event.
|
|
|
|
* \brief Add a copy of the server's temporary world object to the server's temporary event.
|
|
|
|
*
|
|
|
|
*
|
|
|
|