From c772179149ba6eef6e1123496727251b62a7bd02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 5 Jan 2020 23:26:09 -0500 Subject: [PATCH] Add RlvCommandOption support for Attachment UUID --- indra/newview/rlvhelper.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index 629d3a14e..ebe57b279 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -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());