forked from mirror/openmw-tes3mp
[Server] Add GetContainerItemActionCount() for getting drag count
This commit is contained in:
parent
4f2b88df8a
commit
b1009ad33d
2 changed files with 57 additions and 49 deletions
|
@ -138,6 +138,12 @@ int WorldFunctions::GetContainerItemGoldValue(unsigned int objectIndex, unsigned
|
||||||
.containerChanges.items.at(itemIndex).goldValue;
|
.containerChanges.items.at(itemIndex).goldValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int WorldFunctions::GetContainerItemActionCount(unsigned int objectIndex, unsigned int itemIndex) noexcept
|
||||||
|
{
|
||||||
|
return mwmp::Networking::getPtr()->getLastEvent()->objectChanges.objects.at(objectIndex)
|
||||||
|
.containerChanges.items.at(itemIndex).actionCount;
|
||||||
|
}
|
||||||
|
|
||||||
void WorldFunctions::SetBaseEventCell(const char* cellDescription) noexcept
|
void WorldFunctions::SetBaseEventCell(const char* cellDescription) noexcept
|
||||||
{
|
{
|
||||||
std::string description = cellDescription;
|
std::string description = cellDescription;
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
{"GetContainerItemCount", WorldFunctions::GetContainerItemCount},\
|
{"GetContainerItemCount", WorldFunctions::GetContainerItemCount},\
|
||||||
{"GetContainerItemCharge", WorldFunctions::GetContainerItemCharge},\
|
{"GetContainerItemCharge", WorldFunctions::GetContainerItemCharge},\
|
||||||
{"GetContainerItemGoldValue", WorldFunctions::GetContainerItemGoldValue},\
|
{"GetContainerItemGoldValue", WorldFunctions::GetContainerItemGoldValue},\
|
||||||
|
{"GetContainerItemActionCount", WorldFunctions::GetContainerItemActionCount},\
|
||||||
\
|
\
|
||||||
{"SetBaseEventCell", WorldFunctions::SetBaseEventCell},\
|
{"SetBaseEventCell", WorldFunctions::SetBaseEventCell},\
|
||||||
{"SetBaseEventAction", WorldFunctions::SetBaseEventAction},\
|
{"SetBaseEventAction", WorldFunctions::SetBaseEventAction},\
|
||||||
|
@ -90,6 +91,7 @@ public:
|
||||||
static int GetContainerItemCount(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
static int GetContainerItemCount(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
||||||
static int GetContainerItemCharge(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
static int GetContainerItemCharge(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
||||||
static int GetContainerItemGoldValue(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
static int GetContainerItemGoldValue(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
||||||
|
static int GetContainerItemActionCount(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
||||||
|
|
||||||
static void SetBaseEventCell(const char* cellDescription) noexcept;
|
static void SetBaseEventCell(const char* cellDescription) noexcept;
|
||||||
static void SetBaseEventAction(int action) noexcept;
|
static void SetBaseEventAction(int action) noexcept;
|
||||||
|
|
Loading…
Reference in a new issue