// Checked: 2010-11-30 (RLVa-1.3.0b) | Modified: RLVa-1.3.0b RlvCommandOptionGetPath::RlvCommandOptionGetPath(const RlvCommand& rlvCmd) { m_fValid = true; // Assume the option will be a valid one until we find out otherwise // @getpath[:<option>]=<channel> => <option> is transformed to a list of inventory item UUIDs to get the path of RlvCommandOptionGeneric rlvCmdOption(rlvCmd.getOption()); if (rlvCmdOption.isWearableType()) // <option> can be a clothing layer { getItemIDs(rlvCmdOption.getWearableType(), m_idItems, false); } else if (rlvCmdOption.isAttachmentPoint()) // ... or it can specify an attachment point { getItemIDs(rlvCmdOption.getAttachmentPoint(), m_idItems, 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()); if ( (pObj) || (pObj->isAttachment()) ) m_idItems.push_back(pObj->getAttachmentItemID()); } else // ... but anything else isn't a valid option { m_fValid = false; } }
void MapHashTableBuildable::setItemIDs( ItemIDArray& newIDs, const CellOffsetMap& offsetMap ) { getItemIDs().swap( newIDs ); // setup original cells for ( uint32 v = 0; v < m_nbrVerticalCells; ++v ) { for ( uint32 h = 0; h < m_nbrHorizontalCells; ++h ) { MapHashCell& cell = static_cast<MapHashCell&>(*m_hashCell[ v ][ h ] ); CellOffsetMap::const_iterator offset = offsetMap.find( m_cells[ v ][ h ] ); MC2_ASSERT( offset != offsetMap.end() ); cell.m_allItemIDIndex = (*offset).second; cell.m_allItemIDSize = (*offset).first.size(); cell.m_nbrElements = cell.m_allItemIDSize; } } m_cells.clear(); }