mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-10-05 02:56:31 +00:00
[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;
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
std::string description = cellDescription;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
{"GetContainerItemCount", WorldFunctions::GetContainerItemCount},\
|
||||
{"GetContainerItemCharge", WorldFunctions::GetContainerItemCharge},\
|
||||
{"GetContainerItemGoldValue", WorldFunctions::GetContainerItemGoldValue},\
|
||||
{"GetContainerItemActionCount", WorldFunctions::GetContainerItemActionCount},\
|
||||
\
|
||||
{"SetBaseEventCell", WorldFunctions::SetBaseEventCell},\
|
||||
{"SetBaseEventAction", WorldFunctions::SetBaseEventAction},\
|
||||
|
@ -90,6 +91,7 @@ public:
|
|||
static int GetContainerItemCount(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 GetContainerItemActionCount(unsigned int objectIndex, unsigned int itemIndex) noexcept;
|
||||
|
||||
static void SetBaseEventCell(const char* cellDescription) noexcept;
|
||||
static void SetBaseEventAction(int action) noexcept;
|
||||
|
|
Loading…
Reference in a new issue