Update RLVa to 1.4.0-compatible
This commit is contained in:
@@ -1375,6 +1375,11 @@ BOOL LLItemBridge::isItemRenameable() const
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
if ( (rlv_handler_t::isEnabled()) && (!RlvFolderLocks::instance().canRenameItem(mUUID)) )
|
||||
return FALSE;
|
||||
// [/RLVa:KB]
|
||||
|
||||
return (item->getPermissions().allowModifyBy(gAgent.getID()));
|
||||
}
|
||||
return FALSE;
|
||||
@@ -1545,6 +1550,13 @@ BOOL LLFolderBridge::isItemRemovable()
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
if ( ((rlv_handler_t::isEnabled()) && (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (!RlvFolderLocks::instance().canRemoveFolder(mUUID))) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
LLVOAvatar* avatar = gAgentAvatarp;
|
||||
if( !avatar )
|
||||
{
|
||||
@@ -1728,6 +1740,13 @@ BOOL LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
|
||||
//
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Added: RLVa-1.3.0g
|
||||
if ( (is_movable) && (rlv_handler_t::isEnabled()) && (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) )
|
||||
{
|
||||
is_movable = RlvFolderLocks::instance().canMoveFolder(cat_id, mUUID);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
accept = is_movable
|
||||
&& (mUUID != cat_id) // Can't move a folder into itself
|
||||
&& (mUUID != inv_cat->getParentUUID()) // Avoid moves that would change nothing
|
||||
@@ -2864,6 +2883,22 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
||||
is_movable &= inv_item->getIsLinkType() || !get_is_item_worn(inv_item->getUUID());
|
||||
}
|
||||
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
if ( (rlv_handler_t::isEnabled()) && (is_movable) )
|
||||
{
|
||||
if (move_is_into_current_outfit)
|
||||
{
|
||||
// RELEASE-RLVa: [RLVa-1.3.0] Keep sync'ed with code below => LLAppearanceMgr::wearItemOnAvatar() with "replace == true"
|
||||
const LLViewerInventoryItem* pItem = dynamic_cast<const LLViewerInventoryItem*>(inv_item);
|
||||
is_movable = rlvPredCanWearItem(pItem, RLV_WEAR_REPLACE);
|
||||
}
|
||||
if (is_movable)
|
||||
{
|
||||
is_movable = (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (RlvFolderLocks::instance().canMoveItem(inv_item->getUUID(), mUUID));
|
||||
}
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
accept = is_movable && (mUUID != inv_item->getParentUUID());
|
||||
if(accept && drop)
|
||||
{
|
||||
@@ -2894,7 +2929,7 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
|
||||
wear_inventory_item_on_avatar(inv_item);
|
||||
break;
|
||||
case LLAssetType::AT_OBJECT:
|
||||
rez_attachment((LLViewerInventoryItem*)inv_item, NULL, false);
|
||||
rez_attachment((LLViewerInventoryItem*)inv_item, NULL, true);
|
||||
break;
|
||||
/*
|
||||
case LLAssetType::AT_GESTURE:
|
||||
@@ -3834,6 +3869,12 @@ BOOL LLObjectBridge::isItemRemovable()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
if ( (rlv_handler_t::isEnabled()) && (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (!RlvFolderLocks::instance().canRemoveItem(mUUID)) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
const LLInventoryObject *obj = model->getItem(mUUID);
|
||||
if (obj && obj->getIsLinkType())
|
||||
{
|
||||
@@ -4888,8 +4929,8 @@ void wear_inventory_category_on_avatar_step3(LLWearableHoldingPattern* holder, B
|
||||
// item->setAssetUUID(wearable->getID());
|
||||
// item->updateAssetOnServer();
|
||||
// }
|
||||
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.1.3b) | Modified: RLVa-1.1.3b
|
||||
if (!gRlvWearableLocks.canWear(wearable->getType()))
|
||||
// [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.1.3b) | Modified: RLVa-1.1.4a
|
||||
if (!gRlvWearableLocks.canWear(item))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -5053,6 +5094,18 @@ BOOL LLWearableBridge::isItemRemovable()
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
if ( (rlv_handler_t::isEnabled()) && (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (!RlvFolderLocks::instance().canRemoveItem(mUUID)) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
// [RLVa:KB] - Checked: 2011-03-29 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
||||
if ( (rlv_handler_t::isEnabled()) && (RlvFolderLocks::instance().hasLockedFolder(RLV_LOCK_ANY)) && (!RlvFolderLocks::instance().canRemoveItem(mUUID)) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
const LLInventoryObject *obj = model->getItem(mUUID);
|
||||
if (obj && obj->getIsLinkType())
|
||||
{
|
||||
@@ -5196,6 +5249,13 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
|
||||
items.push_back(std::string("Wearable Wear"));
|
||||
items.push_back(std::string("Wearable Edit"));
|
||||
// [RLVa:KB] - Checked: 2011-09-16 (RLVa-1.1.4a) | Added: RLVa-1.1.4a
|
||||
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
|
||||
{
|
||||
disabled_items.push_back(std::string("Wearable Wear"));
|
||||
disabled_items.push_back(std::string("Wearable Edit"));
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
|
||||
if ((flags & FIRST_SELECTED_ITEM) == 0)
|
||||
{
|
||||
@@ -5215,20 +5275,24 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
|
||||
switch (item->getType())
|
||||
{
|
||||
case LLAssetType::AT_CLOTHING:
|
||||
items.push_back(std::string("Take Off"));
|
||||
items.push_back(std::string("Take Off"));
|
||||
// [RLVa:KB] - Checked: 2011-09-16 (RLVa-1.1.4a) | Added: RLVa-1.1.4a
|
||||
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(item)) )
|
||||
disabled_items.push_back(std::string("Take Off"));
|
||||
// [/RLVa:KB]
|
||||
// Fallthrough since clothing and bodypart share wear options
|
||||
case LLAssetType::AT_BODYPART:
|
||||
if (get_is_item_worn(item->getUUID()))
|
||||
{
|
||||
disabled_items.push_back(std::string("Wearable And Wear"));
|
||||
disabled_items.push_back(std::string("Wearable Add"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
items.push_back(std::string("Wearable Wear"));
|
||||
disabled_items.push_back(std::string("Take Off"));
|
||||
disabled_items.push_back(std::string("Wearable Edit"));
|
||||
}
|
||||
}
|
||||
|
||||
/*if (LLWearableType::getAllowMultiwear(mWearableType))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user