1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-06 03:45:35 +00:00

[Server] Add GetBaseEventAction script function

This commit is contained in:
David Cernat 2017-02-17 14:51:16 +02:00
parent e0bc557aa4
commit 8a5bc77699
2 changed files with 7 additions and 0 deletions

View file

@ -131,6 +131,11 @@ unsigned int WorldFunctions::GetObjectChangesSize() noexcept
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.count; return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.count;
} }
unsigned int WorldFunctions::GetBaseEventAction() noexcept
{
return mwmp::Networking::getPtr()->getLastEvent()->action;
}
const char *WorldFunctions::GetObjectRefId(unsigned int i) noexcept const char *WorldFunctions::GetObjectRefId(unsigned int i) noexcept
{ {
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).refId.c_str(); return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).refId.c_str();

View file

@ -20,6 +20,7 @@
{"SetObjectRotation", WorldFunctions::SetObjectRotation},\ {"SetObjectRotation", WorldFunctions::SetObjectRotation},\
\ \
{"GetObjectChangesSize", WorldFunctions::GetObjectChangesSize},\ {"GetObjectChangesSize", WorldFunctions::GetObjectChangesSize},\
{"GetBaseEventAction", WorldFunctions::GetBaseEventAction},\
\ \
{"GetObjectRefId", WorldFunctions::GetObjectRefId},\ {"GetObjectRefId", WorldFunctions::GetObjectRefId},\
{"GetObjectRefNumIndex", WorldFunctions::GetObjectRefNumIndex},\ {"GetObjectRefNumIndex", WorldFunctions::GetObjectRefNumIndex},\
@ -71,6 +72,7 @@ public:
static void SetObjectRotation(double x, double y, double z) noexcept; static void SetObjectRotation(double x, double y, double z) noexcept;
static unsigned int GetObjectChangesSize() noexcept; static unsigned int GetObjectChangesSize() noexcept;
static unsigned int GetBaseEventAction() noexcept;
static const char *GetObjectRefId(unsigned int i) noexcept; static const char *GetObjectRefId(unsigned int i) noexcept;
static int GetObjectRefNumIndex(unsigned int i) noexcept; static int GetObjectRefNumIndex(unsigned int i) noexcept;