From 17a7805444aeffe048b8bb5d20e7e60b0ac9f9b8 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Mon, 28 Mar 2011 16:04:32 +0100 Subject: [PATCH] - fixed : RLV_LOCK_ADD folder locks aren't enforced --HG-- branch : RLVa --- indra/newview/rlvlocks.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/indra/newview/rlvlocks.h b/indra/newview/rlvlocks.h index 6e119e2a31..a4f4ea8b76 100644 --- a/indra/newview/rlvlocks.h +++ b/indra/newview/rlvlocks.h @@ -404,7 +404,7 @@ inline S32 RlvAttachPtLookup::getAttachPointIndex(const LLViewerObject* pObj) // RlvAttachmentLocks inlined member functions // -// Checked: 2010-08-07 (RLVa-1.2.0i) | Modified: RLVa-1.2.0i +// Checked: 2011-03-27 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g inline ERlvWearMask RlvAttachmentLocks::canAttach(const LLInventoryItem* pItem, LLViewerJointAttachment** ppAttachPtOut /*=NULL*/) const { // The specified item can be attached if: @@ -413,7 +413,8 @@ inline ERlvWearMask RlvAttachmentLocks::canAttach(const LLInventoryItem* pItem, LLViewerJointAttachment* pAttachPt = RlvAttachPtLookup::getAttachPoint(pItem); if (ppAttachPtOut) *ppAttachPtOut = pAttachPt; - return (!pAttachPt) ? RLV_WEAR : canAttach(pAttachPt); + return ((pItem) && (!gRlvFolderLocks.isLockedFolder(pItem->getParentUUID(), RLV_LOCK_ADD))) + ? ((!pAttachPt) ? RLV_WEAR : canAttach(pAttachPt)) : RLV_WEAR_LOCKED; } // Checked: 2010-08-07 (RLVa-1.2.0i) | Modified: RLVa-1.2.0i @@ -491,12 +492,13 @@ inline bool RlvWearableLocks::canRemove(const LLInventoryItem* pItem) const return (pWearable) && (!isLockedWearable(pWearable)); } -// Checked: 2010-05-14 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g +// Checked: 2011-03-27 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g inline ERlvWearMask RlvWearableLocks::canWear(const LLViewerInventoryItem* pItem) const { // The specified item can be worn if the wearable type it specifies can be worn on RLV_ASSERT( (pItem) && (LLInventoryType::IT_WEARABLE == pItem->getInventoryType()) ); - return (pItem) ? canWear(pItem->getWearableType()) : RLV_WEAR_LOCKED; + return ((pItem) && (!gRlvFolderLocks.isLockedFolder(pItem->getParentUUID(), RLV_LOCK_ADD))) + ? canWear(pItem->getWearableType()) : RLV_WEAR_LOCKED; } // Checked: 2010-05-14 (RLVa-1.2.0g) | Modified: RLVa-1.2.0g