FIRE-13990: Pull fix for BUG-6578 / MAINT-4216 by VirLinden early and add additional FS-specific stuff because of FIRE-303
parent
b9d7531ba8
commit
cb4c5bdfc9
|
|
@ -1364,7 +1364,10 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up
|
|||
LLNotificationsUtil::add("CannotWearTrash");
|
||||
return false;
|
||||
}
|
||||
else if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), LLAppearanceMgr::instance().getCOF())) // EXT-84911
|
||||
// <FS:Ansariel> FIRE-13990 / BUG-6578 / MAINT-4216 FIX
|
||||
//else if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), LLAppearanceMgr::instance().getCOF())) // EXT-84911
|
||||
else if (isLinkedInCOF(item_to_wear->getUUID())) // EXT-84911
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -2974,6 +2977,14 @@ LLInventoryModel::item_array_t LLAppearanceMgr::findCOFItemLinks(const LLUUID& i
|
|||
return result;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> FIRE-13990 / BUG-6578 / MAINT-4216 FIX
|
||||
bool LLAppearanceMgr::isLinkedInCOF(const LLUUID& item_id)
|
||||
{
|
||||
LLInventoryModel::item_array_t links = LLAppearanceMgr::instance().findCOFItemLinks(item_id);
|
||||
return links.size() > 0;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
void LLAppearanceMgr::removeAllClothesFromAvatar()
|
||||
{
|
||||
// Fetch worn clothes (i.e. the ones in COF).
|
||||
|
|
|
|||
|
|
@ -151,6 +151,7 @@ public:
|
|||
|
||||
// Find COF entries referencing the given item.
|
||||
LLInventoryModel::item_array_t findCOFItemLinks(const LLUUID& item_id);
|
||||
bool isLinkedInCOF(const LLUUID& item_id); // <FS:Ansariel> FIRE-13990 / BUG-6578 / MAINT-4216 FIX
|
||||
|
||||
// Remove COF entries
|
||||
void removeCOFItemLinks(const LLUUID& item_id);
|
||||
|
|
|
|||
|
|
@ -6808,8 +6808,17 @@ public:
|
|||
LLViewerInventoryItem* item = getItem();
|
||||
if(item)
|
||||
{
|
||||
if ( get_is_item_worn(mUUID) ) LLAppearanceMgr::instance().removeItemFromAvatar(mUUID);
|
||||
else LLAppearanceMgr::instance().wearItemOnAvatar(mUUID /*item->getUUID()*/, true, !gSavedSettings.getBOOL("FSDoubleClickAddInventoryClothing"));
|
||||
if ( get_is_item_worn(mUUID) )
|
||||
{
|
||||
if (item->getType() != LLAssetType::AT_BODYPART)
|
||||
{
|
||||
LLAppearanceMgr::instance().removeItemFromAvatar(mUUID);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LLAppearanceMgr::instance().wearItemOnAvatar(mUUID /*item->getUUID()*/, true, !gSavedSettings.getBOOL("FSDoubleClickAddInventoryClothing"));
|
||||
}
|
||||
}
|
||||
// </FS>
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue