[Server] Add GetObjectMpNum() and SetObjectMpNum() script functions

0.6.1
David Cernat 8 years ago
parent 8cc61b6048
commit 665fe09fd0

@ -45,6 +45,11 @@ int WorldFunctions::GetObjectRefNumIndex(unsigned int i) noexcept
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).refNumIndex;
}
int WorldFunctions::GetObjectMpNum(unsigned int i) noexcept
{
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).mpNum;
}
int WorldFunctions::GetObjectCount(unsigned int i) noexcept
{
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).count;
@ -172,6 +177,11 @@ void WorldFunctions::SetObjectRefNumIndex(int refNumIndex) noexcept
tempWorldObject.refNumIndex = refNumIndex;
}
void WorldFunctions::SetObjectMpNum(int mpNum) noexcept
{
tempWorldObject.mpNum = mpNum;
}
void WorldFunctions::SetObjectCount(int count) noexcept
{
tempWorldObject.count = count;

@ -9,6 +9,7 @@
\
{"GetObjectRefId", WorldFunctions::GetObjectRefId},\
{"GetObjectRefNumIndex", WorldFunctions::GetObjectRefNumIndex},\
{"GetObjectMpNum", WorldFunctions::GetObjectMpNum},\
{"GetObjectCount", WorldFunctions::GetObjectCount},\
{"GetObjectCharge", WorldFunctions::GetObjectCharge},\
{"GetObjectGoldValue", WorldFunctions::GetObjectGoldValue},\
@ -33,6 +34,7 @@
\
{"SetObjectRefId", WorldFunctions::SetObjectRefId},\
{"SetObjectRefNumIndex", WorldFunctions::SetObjectRefNumIndex},\
{"SetObjectMpNum", WorldFunctions::SetObjectMpNum},\
{"SetObjectCount", WorldFunctions::SetObjectCount},\
{"SetObjectCharge", WorldFunctions::SetObjectCharge},\
{"SetObjectGoldValue", WorldFunctions::SetObjectGoldValue},\
@ -72,6 +74,7 @@ public:
static const char *GetObjectRefId(unsigned int i) noexcept;
static int GetObjectRefNumIndex(unsigned int i) noexcept;
static int GetObjectMpNum(unsigned int i) noexcept;
static int GetObjectCount(unsigned int i) noexcept;
static int GetObjectCharge(unsigned int i) noexcept;
static int GetObjectGoldValue(unsigned int i) noexcept;
@ -96,6 +99,7 @@ public:
static void SetObjectRefId(const char* refId) noexcept;
static void SetObjectRefNumIndex(int refNumIndex) noexcept;
static void SetObjectMpNum(int mpNum) noexcept;
static void SetObjectCount(int count) noexcept;
static void SetObjectCharge(int charge) noexcept;
static void SetObjectGoldValue(int goldValue) noexcept;

Loading…
Cancel
Save