summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-11-23 14:39:01 -0800
committerMerov Linden <merov@lindenlab.com>2014-11-23 14:39:01 -0800
commit02c535276404faca30d626b311967e2888052843 (patch)
tree19a2b7dde46b9688c6eef2bb4e20ba6faf88a12b
parent171b60d0685d0e70ac02d3a1833d4bafbcbbe874 (diff)
DD-284 : Do not count incoming stock items if dropped in a stock folder
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index d1acbee533..71a5ad412e 100755
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -1124,6 +1124,7 @@ bool can_move_item_to_marketplace(const LLInventoryCategory* root_folder, LLInve
{
// Check stock folder type matches item type in marketplace listings or merchant outbox (even if of no use there for the moment)
LLViewerInventoryCategory* view_folder = dynamic_cast<LLViewerInventoryCategory*>(dest_folder);
+ bool move_in_stock = (view_folder && (view_folder->getPreferredType() == LLFolderType::FT_MARKETPLACE_STOCK));
bool accept = (view_folder && view_folder->acceptItem(inv_item));
if (!accept)
{
@@ -1139,7 +1140,8 @@ bool can_move_item_to_marketplace(const LLInventoryCategory* root_folder, LLInve
// Check that the total amount of items won't violate the max limit on the marketplace
if (accept)
{
- int existing_item_count = bundle_size;
+ // If the dest folder is a stock folder, we do not count the incoming items toward the total (stock items are seen as one)
+ int existing_item_count = (move_in_stock ? 0 : bundle_size);
// Get the version folder: that's where the counts start from
const LLViewerInventoryCategory * version_folder = ((root_folder && (root_folder != dest_folder)) ? gInventory.getFirstDescendantOf(root_folder->getUUID(), dest_folder->getUUID()) : NULL);