forked from mirror/openmw-tes3mp
[Server] Add GetObjectMpNum() and SetObjectMpNum() script functions
This commit is contained in:
parent
8cc61b6048
commit
665fe09fd0
2 changed files with 14 additions and 0 deletions
|
@ -45,6 +45,11 @@ int WorldFunctions::GetObjectRefNumIndex(unsigned int i) noexcept
|
||||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).refNumIndex;
|
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
|
int WorldFunctions::GetObjectCount(unsigned int i) noexcept
|
||||||
{
|
{
|
||||||
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).count;
|
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(i).count;
|
||||||
|
@ -172,6 +177,11 @@ void WorldFunctions::SetObjectRefNumIndex(int refNumIndex) noexcept
|
||||||
tempWorldObject.refNumIndex = refNumIndex;
|
tempWorldObject.refNumIndex = refNumIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WorldFunctions::SetObjectMpNum(int mpNum) noexcept
|
||||||
|
{
|
||||||
|
tempWorldObject.mpNum = mpNum;
|
||||||
|
}
|
||||||
|
|
||||||
void WorldFunctions::SetObjectCount(int count) noexcept
|
void WorldFunctions::SetObjectCount(int count) noexcept
|
||||||
{
|
{
|
||||||
tempWorldObject.count = count;
|
tempWorldObject.count = count;
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
\
|
\
|
||||||
{"GetObjectRefId", WorldFunctions::GetObjectRefId},\
|
{"GetObjectRefId", WorldFunctions::GetObjectRefId},\
|
||||||
{"GetObjectRefNumIndex", WorldFunctions::GetObjectRefNumIndex},\
|
{"GetObjectRefNumIndex", WorldFunctions::GetObjectRefNumIndex},\
|
||||||
|
{"GetObjectMpNum", WorldFunctions::GetObjectMpNum},\
|
||||||
{"GetObjectCount", WorldFunctions::GetObjectCount},\
|
{"GetObjectCount", WorldFunctions::GetObjectCount},\
|
||||||
{"GetObjectCharge", WorldFunctions::GetObjectCharge},\
|
{"GetObjectCharge", WorldFunctions::GetObjectCharge},\
|
||||||
{"GetObjectGoldValue", WorldFunctions::GetObjectGoldValue},\
|
{"GetObjectGoldValue", WorldFunctions::GetObjectGoldValue},\
|
||||||
|
@ -33,6 +34,7 @@
|
||||||
\
|
\
|
||||||
{"SetObjectRefId", WorldFunctions::SetObjectRefId},\
|
{"SetObjectRefId", WorldFunctions::SetObjectRefId},\
|
||||||
{"SetObjectRefNumIndex", WorldFunctions::SetObjectRefNumIndex},\
|
{"SetObjectRefNumIndex", WorldFunctions::SetObjectRefNumIndex},\
|
||||||
|
{"SetObjectMpNum", WorldFunctions::SetObjectMpNum},\
|
||||||
{"SetObjectCount", WorldFunctions::SetObjectCount},\
|
{"SetObjectCount", WorldFunctions::SetObjectCount},\
|
||||||
{"SetObjectCharge", WorldFunctions::SetObjectCharge},\
|
{"SetObjectCharge", WorldFunctions::SetObjectCharge},\
|
||||||
{"SetObjectGoldValue", WorldFunctions::SetObjectGoldValue},\
|
{"SetObjectGoldValue", WorldFunctions::SetObjectGoldValue},\
|
||||||
|
@ -72,6 +74,7 @@ public:
|
||||||
|
|
||||||
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;
|
||||||
|
static int GetObjectMpNum(unsigned int i) noexcept;
|
||||||
static int GetObjectCount(unsigned int i) noexcept;
|
static int GetObjectCount(unsigned int i) noexcept;
|
||||||
static int GetObjectCharge(unsigned int i) noexcept;
|
static int GetObjectCharge(unsigned int i) noexcept;
|
||||||
static int GetObjectGoldValue(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 SetObjectRefId(const char* refId) noexcept;
|
||||||
static void SetObjectRefNumIndex(int refNumIndex) noexcept;
|
static void SetObjectRefNumIndex(int refNumIndex) noexcept;
|
||||||
|
static void SetObjectMpNum(int mpNum) noexcept;
|
||||||
static void SetObjectCount(int count) noexcept;
|
static void SetObjectCount(int count) noexcept;
|
||||||
static void SetObjectCharge(int charge) noexcept;
|
static void SetObjectCharge(int charge) noexcept;
|
||||||
static void SetObjectGoldValue(int goldValue) noexcept;
|
static void SetObjectGoldValue(int goldValue) noexcept;
|
||||||
|
|
Loading…
Reference in a new issue