[Server] Add GetBaseEventAction script function

coverity_scan^2
David Cernat 8 years ago
parent e0bc557aa4
commit 8a5bc77699

@ -131,6 +131,11 @@ unsigned int WorldFunctions::GetObjectChangesSize() noexcept
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
{
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).refId.c_str();

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

Loading…
Cancel
Save