Add RlvCommandOption support for Attachment UUID

This commit is contained in:
Liru Færs
2020-01-05 23:26:09 -05:00
parent 4c7eacf4fc
commit c772179149

View File

@@ -210,6 +210,10 @@ RlvCommandOptionGeneric::RlvCommandOptionGeneric(const std::string& strOption):
m_fValid = true;
}
// ============================================================================
// RlvCommandOption structures
//
// Checked: 2012-07-28 (RLVa-1.4.7)
class RlvCommandOptionGetPathCallback
{
@@ -269,6 +273,14 @@ RlvCommandOptionGetPath::RlvCommandOptionGetPath(const RlvCommand& rlvCmd, getpa
{
getItemIDs(rlvCmdOption.getAttachmentPoint(), m_idItems);
}
else if (rlvCmdOption.isUUID()) // ... or it can specify a specific attachment
{
const LLViewerObject* pAttachObj = gObjectList.findObject(rlvCmdOption.getUUID());
if ( (pAttachObj) && (pAttachObj->isAttachment()) && (pAttachObj->permYouOwner()) )
m_idItems.push_back(pAttachObj->getAttachmentItemID());
else
m_fValid = false;
}
else if (rlvCmdOption.isEmpty()) // ... or it can be empty (in which case we act on the object that issued the command)
{
const LLViewerObject* pObj = gObjectList.findObject(rlvCmd.getObjectID());