Ejemplo n.º 1
0
S32 LLInventoryItem::packBinaryBucket(U8* bin_bucket, LLPermissions* perm_override) const
{
	// Figure out which permissions to use.
	LLPermissions perm;
	if (perm_override)
	{
		// Use the permissions override.
		perm = *perm_override;
	}
	else
	{
		// Use the current permissions.
		perm = getPermissions();
	}

	// describe the inventory item
	char* buffer = (char*) bin_bucket;
	std::string creator_id_str;

	perm.getCreator().toString(creator_id_str);
	std::string owner_id_str;
	perm.getOwner().toString(owner_id_str);
	std::string last_owner_id_str;
	perm.getLastOwner().toString(last_owner_id_str);
	std::string group_id_str;
	perm.getGroup().toString(group_id_str);
	std::string asset_id_str;
	getAssetUUID().toString(asset_id_str);
	S32 size = sprintf(buffer,	/* Flawfinder: ignore */
					   "%d|%d|%s|%s|%s|%s|%s|%x|%x|%x|%x|%x|%s|%s|%d|%d|%x",
					   getType(),
					   getInventoryType(),
					   getName().c_str(),
					   creator_id_str.c_str(),
					   owner_id_str.c_str(),
					   last_owner_id_str.c_str(),
					   group_id_str.c_str(),
					   perm.getMaskBase(),
					   perm.getMaskOwner(),
					   perm.getMaskGroup(),
					   perm.getMaskEveryone(),
					   perm.getMaskNextOwner(),
					   asset_id_str.c_str(),
					   getDescription().c_str(),
					   getSaleInfo().getSaleType(),
					   getSaleInfo().getSalePrice(),
					   getFlags()) + 1;

	return size;
}
Ejemplo n.º 2
0
// [RLVa:KB] - Checked: 2010-09-27 (RLVa-1.1.3a) | Added: RLVa-1.1.3a
bool LLViewerInventoryItem::isWearableType() const
{
	return (getInventoryType() == LLInventoryType::IT_WEARABLE);
}