[Server] Add GetContainerItemActionCount() for getting drag count

pull/163/head
David Cernat 8 years ago
parent 4f2b88df8a
commit b1009ad33d

@ -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…
Cancel
Save