コード例 #1
0
	static void processForeignLandmark(LLLandmark* landmark,
			const LLUUID& object_id, const LLUUID& notecard_inventory_id,
			LLPointer<LLInventoryItem> item_ptr)
	{
		LLVector3d global_pos;
		landmark->getGlobalPos(global_pos);
		LLViewerInventoryItem* agent_landmark =
				LLLandmarkActions::findLandmarkForGlobalPos(global_pos);

		if (agent_landmark)
		{
			showInfo(agent_landmark->getUUID());
		}
		else
		{
			if (item_ptr.isNull())
			{
				// check to prevent a crash. See EXT-8459.
				LL_WARNS() << "Passed handle contains a dead inventory item. Most likely notecard has been closed and embedded item was destroyed." << LL_ENDL;
			}
			else
			{
				LLInventoryItem* item = item_ptr.get();
				LLPointer<LLEmbeddedLandmarkCopied> cb = new LLEmbeddedLandmarkCopied();
				copy_inventory_from_notecard(get_folder_by_itemtype(item),
											 object_id,
											 notecard_inventory_id,
											 item,
											 gInventoryCallbacks.registerCB(cb));
			}
		}
	}
コード例 #2
0
	static void processForeignLandmark(LLLandmark* landmark,
			const LLUUID& object_id, const LLUUID& notecard_inventory_id,
			LLPointer<LLInventoryItem> item_ptr)
	{
		LLVector3d global_pos;
		landmark->getGlobalPos(global_pos);
		LLViewerInventoryItem* agent_landmark =
				LLLandmarkActions::findLandmarkForGlobalPos(global_pos);

		if (agent_landmark)
		{
			showInfo(agent_landmark->getUUID());
		}
//		else
// [SL:KB] - Patch: UI-Notecards | Checked: 2010-09-05 (Catznip-2.1.2a) | Added: Catznip-2.1.2a
		else if (gSavedSettings.getBOOL("EmbeddedLandmarkCopyToInventory"))
// [/SL:KB]
		{
			if (item_ptr.isNull())
			{
				// check to prevent a crash. See EXT-8459.
				llwarns << "Passed handle contains a dead inventory item. Most likely notecard has been closed and embedded item was destroyed." << llendl;
			}
			else
			{
				LLInventoryItem* item = item_ptr.get();
				LLPointer<LLEmbeddedLandmarkCopied> cb = new LLEmbeddedLandmarkCopied();
				copy_inventory_from_notecard(get_folder_by_itemtype(item),
											 object_id,
											 notecard_inventory_id,
											 item,
											 gInventoryCallbacks.registerCB(cb));
			}
		}
// [SL:KB] - Patch: UI-Notecards | Checked: 2010-09-05 (Catznip-2.1.2a) | Added: Catznip-2.1.2a
		else
		{
			showInfo(global_pos);
		}
// [/SL:KB]
	}