void RlvCurrentlyWorn::fetchWorn()
{
	LLInventoryFetchObserver::item_ref_t idItems;

	// Fetch all currently worn clothing layers and body parts
	for (int type = 0; type < (int)WT_COUNT; type++)
	{
		const LLUUID& idItem = gAgent.getWearableItem((EWearableType)type);
		if (idItem.notNull())
			idItems.push_back(idItem);
	}

	// Fetch all currently worn attachments
	LLVOAvatar* pAvatar = gAgent.getAvatarObject();
	if (pAvatar)
	{
		for (LLVOAvatar::attachment_map_t::const_iterator itAttach = pAvatar->mAttachmentPoints.begin(); 
			 itAttach != pAvatar->mAttachmentPoints.end(); ++itAttach)
		{
			const LLUUID& idItem = itAttach->second->getItemID();
			if (idItem.notNull())
				idItems.push_back(idItem);
		}
	}

	RlvCurrentlyWorn f;
	f.fetchItems(idItems);
}
Beispiel #2
0
// Checked: 2010-09-27 (RLVa-1.1.3a) | Added: RLVa-1.1.3a
void RlvInventory::fetchWornItem(const LLUUID& idItem)
{ 
	if (idItem.notNull()) 
	{
		LLInventoryFetchObserver::item_ref_t idItems; 
		idItems.push_back(idItem);
		RlvItemFetcher itemFetcher;
		itemFetcher.fetchItems(idItems);
	}
}