本文整理汇总了C#中Aurora.Framework.InventoryItemBase类的典型用法代码示例。如果您正苦于以下问题:C# InventoryItemBase类的具体用法?C# InventoryItemBase怎么用?C# InventoryItemBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InventoryItemBase类属于Aurora.Framework命名空间,在下文中一共展示了InventoryItemBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetLLSDItems
public override OSDArray GetLLSDItems(string[] fields, string[] vals)
{
string query = "";
for (int i = 0; i < fields.Length; i++)
{
query += String.Format("where {0} = '{1}' and ", fields[i], vals[i]);
i++;
}
query = query.Remove(query.Length - 5);
if (fields[0] == "inventoryID")
{
IInventoryService invService = m_registry.RequestModuleInterface<IInventoryService>();
if (invService != null)
{
UUID inventoryID = UUID.Parse(vals[0]);
InventoryItemBase baseItem = new InventoryItemBase(UUID.Parse(vals[0]));
if (vals.Count() > 1)
{
UUID avatarID = UUID.Parse(vals[1]);
IUserFinder userFinder = m_registry.RequestModuleInterface<IUserFinder>();
if (userFinder != null && !userFinder.IsLocalGridUser(avatarID))
{
string serverURL = userFinder.GetUserServerURL(avatarID, "InventoryServerURI") + "xinventory";
XInventoryServicesConnector xinv = new XInventoryServicesConnector(serverURL);
return BuildLLSDInventoryItems(xinv.GetItem(baseItem));
}
}
return BuildLLSDInventoryItems(invService.GetItem(baseItem));
}
}
return null;
}
示例2: AddItem
public override bool AddItem(InventoryItemBase item)
{
// MainConsole.Instance.DebugFormat(
// "[XINVENTORY SERVICE]: Adding item {0} to folder {1} for {2}", item.ID, item.Folder, item.Owner);
item.Folder = GetRootFolder (item.Owner).ID;//All items into the foreign folder please!
m_Database.IncrementFolder (item.Folder);
return m_Database.StoreItem (item);
}
示例3: AddItem
public override bool AddItem(InventoryItemBase item)
{
string invserverURL = "";
if (GetHandlers.GetIsForeign (item.Owner, "InventoryServerURI", m_registry, out invserverURL))
{
XInventoryServicesConnector xinv = new XInventoryServicesConnector (invserverURL + "xinventory");
bool success = xinv.AddItem (item);
return success;
}
return base.AddItem (item);
}
示例4: AddItem
public override bool AddItem(InventoryItemBase item)
{
object remoteValue = DoRemote(item);
if (remoteValue != null || m_doRemoteOnly)
return remoteValue != null && (bool)remoteValue;
string invserverURL = "";
if (GetHandlers.GetIsForeign (item.Owner, "InventoryServerURI", m_registry, out invserverURL))
{
XInventoryServicesConnector xinv = new XInventoryServicesConnector (invserverURL + "xinventory");
bool success = xinv.AddItem (item);
return success;
}
return base.AddItem (item);
}
示例5: FromOSD
public override void FromOSD(OSDMap map)
{
OSDArray items = (OSDArray)map["Items"];
Items = items.ConvertAll<InventoryItemBase>((osd) =>
{
InventoryItemBase item = new InventoryItemBase();
item.FromOSD((OSDMap)osd);
return item;
}
);
OSDArray folders = (OSDArray)map["Folders"];
Folders = folders.ConvertAll<InventoryFolderBase>((osd) =>
{
InventoryFolderBase folder = new InventoryFolderBase();
folder.FromOSD((OSDMap)osd);
return folder;
}
);
UserID = map["UserID"];
}
示例6: GetLLSDItems
public override OSDArray GetLLSDItems(string[] fields, string[] vals)
{
string query = "";
for (int i = 0; i < fields.Length; i++)
{
query += String.Format("where {0} = '{1}' and ", fields[i], vals[i]);
i++;
}
query = query.Remove(query.Length - 5);
if (fields[0] == "inventoryID")
{
IInventoryService invService = m_registry.RequestModuleInterface<IInventoryService>();
if (invService != null)
{
InventoryItemBase baseItem = new InventoryItemBase(UUID.Parse(vals[0]));
return BuildLLSDInventoryItems(invService.GetItem(baseItem));
}
}
return null;
}
示例7: UpdateTaskInventory
/// <summary>
/// Update an item in a prim (task) inventory.
/// This method does not handle scripts, <see>RezScript(IClientAPI, UUID, unit)</see>
/// </summary>
/// <param name="remoteClient"></param>
/// <param name="transactionID"></param>
/// <param name="itemInfo"></param>
/// <param name="primLocalID"></param>
protected void UpdateTaskInventory(IClientAPI remoteClient, UUID transactionID, TaskInventoryItem itemInfo,
uint primLocalID)
{
UUID itemID = itemInfo.ItemID;
// Find the prim we're dealing with
ISceneChildEntity part = m_scene.GetSceneObjectPart (primLocalID);
if (part != null)
{
TaskInventoryItem currentItem = part.Inventory.GetInventoryItem(itemID);
bool allowInventoryDrop = (part.GetEffectiveObjectFlags()
& (uint)PrimFlags.AllowInventoryDrop) != 0;
// Explicity allow anyone to add to the inventory if the
// AllowInventoryDrop flag has been set. Don't however let
// them update an item unless they pass the external checks
//
if (!m_scene.Permissions.CanEditObjectInventory(part.UUID, remoteClient.AgentId)
&& (currentItem != null || !allowInventoryDrop))
return;
if (currentItem == null)
{
UUID copyID = UUID.Random();
if (itemID != UUID.Zero)
{
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
item = m_scene.InventoryService.GetItem(item);
// If we've found the item in the user's inventory or in the library
if (item != null)
{
part.ParentEntity.AddInventoryItem (remoteClient, primLocalID, item, copyID);
MainConsole.Instance.InfoFormat(
"[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}",
item.Name, primLocalID, remoteClient.Name);
part.GetProperties(remoteClient);
if (!m_scene.Permissions.BypassPermissions())
{
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
{
List<UUID> uuids = new List<UUID> {itemID};
RemoveInventoryItem(remoteClient, uuids);
}
}
}
else
{
MainConsole.Instance.ErrorFormat(
"[PRIM INVENTORY]: Could not find inventory item {0} to update for {1}!",
itemID, remoteClient.Name);
}
}
}
else // Updating existing item with new perms etc
{
// Base ALWAYS has move
currentItem.BasePermissions |= (uint)PermissionMask.Move;
// Check if we're allowed to mess with permissions
if (!m_scene.Permissions.IsGod(remoteClient.AgentId)) // Not a god
{
if (remoteClient.AgentId != part.OwnerID) // Not owner
{
// Friends and group members can't change any perms
itemInfo.BasePermissions = currentItem.BasePermissions;
itemInfo.EveryonePermissions = currentItem.EveryonePermissions;
itemInfo.GroupPermissions = currentItem.GroupPermissions;
itemInfo.NextPermissions = currentItem.NextPermissions;
itemInfo.CurrentPermissions = currentItem.CurrentPermissions;
}
else
{
// Owner can't change base, and can change other
// only up to base
itemInfo.BasePermissions = currentItem.BasePermissions;
itemInfo.EveryonePermissions &= currentItem.BasePermissions;
itemInfo.GroupPermissions &= currentItem.BasePermissions;
itemInfo.CurrentPermissions &= currentItem.BasePermissions;
itemInfo.NextPermissions &= currentItem.BasePermissions;
}
}
// Next ALWAYS has move
itemInfo.NextPermissions |= (uint)PermissionMask.Move;
if (part.Inventory.UpdateInventoryItem(itemInfo))
{
part.GetProperties(remoteClient);
}
//.........这里部分代码省略.........
示例8: UploadCompleteHandler
//.........这里部分代码省略.........
int textureNum = faceMap["image"].AsInteger();
float imagerot = faceMap["imagerot"].AsInteger();
float offsets = (float) faceMap["offsets"].AsReal();
float offsett = (float) faceMap["offsett"].AsReal();
float scales = (float) faceMap["scales"].AsReal();
float scalet = (float) faceMap["scalet"].AsReal();
if (imagerot != 0)
f.Rotation = imagerot;
if (offsets != 0)
f.OffsetU = offsets;
if (offsett != 0)
f.OffsetV = offsett;
if (scales != 0)
f.RepeatU = scales;
if (scalet != 0)
f.RepeatV = scalet;
f.TextureID = textures.Count > textureNum ? textures[textureNum] : Primitive.TextureEntry.WHITE_TEXTURE;
textureEntry.FaceTextures[face] = f;
}
pbs.TextureEntry = textureEntry.GetBytes();
AssetBase meshAsset = new AssetBase(UUID.Random(), assetName, AssetType.Mesh, m_service.AgentID)
{Data = mesh_list[i].AsBinary()};
meshAsset.ID = m_assetService.Store(meshAsset);
if (meshFolder == null)
{
m_inventoryService.CreateUserInventory(m_service.AgentID, false);
meshFolder = m_inventoryService.GetFolderForType(m_service.AgentID, InventoryType.Mesh,
AssetType.Mesh);
}
InventoryItemBase itemBase = new InventoryItemBase(UUID.Random(), m_service.AgentID)
{
AssetType = (sbyte) AssetType.Mesh,
AssetID = meshAsset.ID,
CreatorId = m_service.AgentID.ToString(),
Folder = meshFolder.ID,
InvType = (int) InventoryType.Texture,
Name = "(Mesh) - " + assetName,
CurrentPermissions = (uint) PermissionMask.All,
BasePermissions = (uint) PermissionMask.All,
EveryOnePermissions = everyone_mask,
GroupPermissions = group_mask,
NextPermissions = next_owner_mask
};
//Bad... but whatever
m_inventoryService.AddItem(itemBase);
pbs.SculptEntry = true;
pbs.SculptTexture = meshAsset.ID;
pbs.SculptType = (byte) SculptType.Mesh;
pbs.SculptData = meshAsset.Data;
Vector3 position = inner_instance_list["position"].AsVector3();
Vector3 scale = inner_instance_list["scale"].AsVector3();
Quaternion rotation = inner_instance_list["rotation"].AsQuaternion();
int physicsShapeType = inner_instance_list["physics_shape_type"].AsInteger();
int material = inner_instance_list["material"].AsInteger();
int mesh = inner_instance_list["mesh"].AsInteger();
UUID owner_id = m_service.AgentID;
IScene fakeScene = new Scene();
示例9: SetAppearanceAssets
private void SetAppearanceAssets(UUID userID, List<AvatarWearingArgs.Wearable> nowWearing, AvatarAppearance oldAppearance, ref AvatarAppearance appearance)
{
IInventoryService invService = m_scene.InventoryService;
for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++)
{
for (int j = 0; j < appearance.Wearables[j].Count; j++)
{
if (appearance.Wearables[i][j].ItemID == UUID.Zero)
continue;
// Ignore ruth's assets
if (appearance.Wearables[i][j].ItemID == AvatarWearable.DefaultWearables[i][j].ItemID)
{
//MainConsole.Instance.ErrorFormat(
// "[AvatarFactory]: Found an asset for the default avatar, itemID {0}, wearable {1}, asset {2}" +
// ", setting to default asset {3}.",
// appearance.Wearables[i][j].ItemID, (WearableType)i, appearance.Wearables[i][j].AssetID,
// AvatarWearable.DefaultWearables[i][j].AssetID);
appearance.Wearables[i].Add(appearance.Wearables[i][j].ItemID,
appearance.Wearables[i][j].AssetID);
continue;
}
if (nowWearing[i].ItemID == oldAppearance.Wearables[i][j].ItemID)
continue;//Don't relookup items that are the same and have already been found earlier
InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID);
baseItem = invService.GetItem(baseItem);
if (baseItem != null)
{
if (baseItem.AssetType == (int) AssetType.Link)
{
baseItem = new InventoryItemBase(baseItem.AssetID, userID);
baseItem = invService.GetItem(baseItem);
}
appearance.Wearables[i].Add(baseItem.ID, baseItem.AssetID);
}
else
{
MainConsole.Instance.ErrorFormat(
"[AvatarFactory]: Can't find inventory item {0} for {1}, setting to default",
appearance.Wearables[i][j].ItemID, (WearableType) i);
appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID);
appearance.Wearables[i].Add(AvatarWearable.DefaultWearables[i][j].ItemID,
AvatarWearable.DefaultWearables[i][j].AssetID);
}
}
}
}
示例10: AvatarIsWearing
/// <summary>
/// Update what the avatar is wearing using an item from their inventory.
/// </summary>
/// <param name = "client"></param>
/// <param name = "e"></param>
public void AvatarIsWearing(IClientAPI client, AvatarWearingArgs e)
{
IScenePresence sp = m_scene.GetScenePresence(client.AgentId);
if (sp == null)
{
MainConsole.Instance.WarnFormat("[AvatarFactory]: AvatarIsWearing unable to find presence for {0}", client.AgentId);
return;
}
MainConsole.Instance.DebugFormat("[AvatarFactory]: AvatarIsWearing called for {0}", client.AgentId);
// operate on a copy of the appearance so we don't have to lock anything
IAvatarAppearanceModule appearance = sp.RequestModuleInterface<IAvatarAppearanceModule>();
AvatarAppearance avatAppearance = new AvatarAppearance(appearance.Appearance, false);
IOpenRegionSettingsModule module = m_scene.RequestModuleInterface<IOpenRegionSettingsModule>();
bool NeedsRebake = false;
if (module != null && module.EnableTeenMode)
{
foreach (AvatarWearingArgs.Wearable wear in e.NowWearing)
{
if (wear.Type == 10 & wear.ItemID == UUID.Zero && module.DefaultUnderpants != UUID.Zero)
{
NeedsRebake = true;
wear.ItemID = module.DefaultUnderpants;
InventoryItemBase item = new InventoryItemBase(UUID.Random())
{
InvType = (int) InventoryType.Wearable,
AssetType = (int) AssetType.Clothing,
Name = "Default Underpants",
Folder =
m_scene.InventoryService.GetFolderForType(client.AgentId,
InventoryType.
Wearable,
AssetType.
Clothing).ID,
Owner = client.AgentId,
CurrentPermissions = 0,
CreatorId = UUID.Zero.ToString(),
AssetID = module.DefaultUnderpants
};
//Locked
client.SendInventoryItemCreateUpdate(item, 0);
}
else if (wear.Type == 10 & wear.ItemID == UUID.Zero)
{
NeedsRebake = true;
InventoryItemBase item = new InventoryItemBase(UUID.Random())
{
InvType = (int) InventoryType.Wearable,
AssetType = (int) AssetType.Clothing,
Name = "Default Underpants",
Folder =
m_scene.InventoryService.GetFolderForType(client.AgentId,
InventoryType.
Wearable,
AssetType.
Clothing).ID,
Owner = client.AgentId,
CurrentPermissions = 0
};
//Locked
if (m_underPantsUUID == UUID.Zero)
{
m_underPantsUUID = UUID.Random();
AssetBase asset = new AssetBase(m_underPantsUUID, "Default Underpants", AssetType.Clothing,
UUID.Zero) {Data = Utils.StringToBytes(m_defaultUnderPants)};
asset.FillHash();
asset.ID = m_scene.AssetService.Store(asset);
m_underPantsUUID = asset.ID;
}
item.CreatorId = UUID.Zero.ToString();
item.AssetID = m_underPantsUUID;
m_scene.InventoryService.AddItem(item);
client.SendInventoryItemCreateUpdate(item, 0);
wear.ItemID = item.ID;
}
if (wear.Type == 11 && wear.ItemID == UUID.Zero && module.DefaultUndershirt != UUID.Zero)
{
NeedsRebake = true;
wear.ItemID = module.DefaultUndershirt;
InventoryItemBase item = new InventoryItemBase(UUID.Random())
{
InvType = (int) InventoryType.Wearable,
AssetType = (int) AssetType.Clothing,
Name = "Default Undershirt",
Folder =
m_scene.InventoryService.GetFolderForType(client.AgentId,
InventoryType.
Wearable,
AssetType.
Clothing).ID,
Owner = client.AgentId,
CurrentPermissions = 0,
//.........这里部分代码省略.........
示例11: UpdateInventoryItemAsset
/// <summary>
/// Update an item which is either already in the client's inventory or is within
/// a transaction
/// </summary>
/// <param name="remoteClient"></param>
/// <param name="transactionID">The transaction ID. If this is UUID.Zero we will
/// assume that we are not in a transaction</param>
/// <param name="itemID">The ID of the updated item</param>
/// <param name="itemUpd"></param>
protected void UpdateInventoryItemAsset(IClientAPI remoteClient, UUID transactionID,
UUID itemID, InventoryItemBase itemUpd)
{
// This one will let people set next perms on items in agent
// inventory. Rut-Roh. Whatever. Make this secure. Yeah.
//
// Passing something to another avatar or a an object will already
InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
item = m_scene.InventoryService.GetItem(item);
if (item != null)
{
if (UUID.Zero == transactionID)
{
uint oldnextperms = item.NextPermissions;
bool hasPermissionsChanged = item.NextPermissions != (itemUpd.NextPermissions & item.BasePermissions);
item.Name = itemUpd.Name;
item.Description = itemUpd.Description;
item.NextPermissions = itemUpd.NextPermissions & item.BasePermissions;
item.EveryOnePermissions = itemUpd.EveryOnePermissions & item.BasePermissions;
item.GroupPermissions = itemUpd.GroupPermissions & item.BasePermissions;
item.GroupID = itemUpd.GroupID;
item.GroupOwned = itemUpd.GroupOwned;
item.CreationDate = itemUpd.CreationDate;
// The client sends zero if its newly created?
item.CreationDate = itemUpd.CreationDate == 0 ? Util.UnixTimeSinceEpoch() : itemUpd.CreationDate;
// TODO: Check if folder changed and move item
//item.NextPermissions = itemUpd.Folder;
item.InvType = itemUpd.InvType;
item.SalePrice = itemUpd.SalePrice;
item.SaleType = itemUpd.SaleType;
item.Flags = itemUpd.Flags;
if ((hasPermissionsChanged) && (item.AssetType == (int)InventoryType.Object))
{
AssetBase asset = m_scene.AssetService.Get(item.AssetID.ToString());
if (asset != null)
{
SceneObjectGroup group =
SceneObjectSerializer.FromOriginalXmlFormat(Utils.BytesToString(asset.Data), m_scene);
bool didchange = false;
//copy
if ((((PermissionMask)oldnextperms & PermissionMask.Copy) == PermissionMask.Copy) &&
(((PermissionMask)item.NextPermissions & PermissionMask.Copy) != PermissionMask.Copy))
{
didchange = true;
group.UpdatePermissions(remoteClient.AgentId, 16, 1, (uint)PermissionMask.Copy, 0);
}
else if ((((PermissionMask)oldnextperms & PermissionMask.Copy) != PermissionMask.Copy) &&
(((PermissionMask)item.NextPermissions & PermissionMask.Copy) == PermissionMask.Copy))
{
didchange = true;
group.UpdatePermissions(remoteClient.AgentId, 16, 1, (uint)PermissionMask.Copy, 1);
}
//mod
if ((((PermissionMask)oldnextperms & PermissionMask.Modify) == PermissionMask.Modify) &&
(((PermissionMask)item.NextPermissions & PermissionMask.Modify) != PermissionMask.Modify))
{
didchange = true;
group.UpdatePermissions(remoteClient.AgentId, 16, 1, (uint)PermissionMask.Modify, 0);
}
else if ((((PermissionMask)oldnextperms & PermissionMask.Modify) != PermissionMask.Modify) &&
(((PermissionMask)item.NextPermissions & PermissionMask.Modify) == PermissionMask.Modify))
{
didchange = true;
group.UpdatePermissions(remoteClient.AgentId, 16, 1, (uint)PermissionMask.Modify, 1);
}
//trans
if ((((PermissionMask)oldnextperms & PermissionMask.Transfer) == PermissionMask.Transfer) &&
(((PermissionMask)item.NextPermissions & PermissionMask.Transfer) != PermissionMask.Transfer))
{
didchange = true;
group.UpdatePermissions(remoteClient.AgentId, 16, 1, (uint)PermissionMask.Transfer, 0);
}
else if ((((PermissionMask)oldnextperms & PermissionMask.Transfer) != PermissionMask.Transfer) &&
(((PermissionMask)item.NextPermissions & PermissionMask.Transfer) == PermissionMask.Transfer))
{
didchange = true;
group.UpdatePermissions(remoteClient.AgentId, 16, 1, (uint)PermissionMask.Transfer, 1);
}
if (didchange)
{
asset.Data = Encoding.ASCII.GetBytes(group.ToXml2());
asset.ID = m_scene.AssetService.Store(asset);
item.AssetID = asset.ID;
//.........这里部分代码省略.........
示例12: AddInventoryItemAsync
/// Add an inventory item to an avatar's inventory.
/// </summary>
/// <param name="remoteClient">The remote client controlling the avatar</param>
/// <param name="item">The item. This structure contains all the item metadata, including the folder
/// in which the item is to be placed.</param>
//public void AddInventoryItem(IClientAPI remoteClient, InventoryItemBase item)
public void AddInventoryItemAsync(IClientAPI remoteClient, InventoryItemBase item)
{
m_scene.InventoryService.AddItemAsync(item,
(itm) => remoteClient.SendInventoryItemCreateUpdate(itm, 0));
}
示例13: GetItem
public virtual InventoryItemBase GetItem(InventoryItemBase item)
{
if (item == null)
return null;
try
{
Dictionary<string, object> ret = MakeRequest("GETITEM",
new Dictionary<string, object>
{
{"ID", item.ID.ToString()}
});
if (ret == null)
return null;
if (ret.Count == 0)
return null;
return BuildItem((Dictionary<string, object>)ret["item"]);
}
catch (Exception e)
{
MainConsole.Instance.DebugFormat("[XINVENTORY CONNECTOR STUB]: Exception in GetItem: {0}", e.Message);
}
return null;
}
示例14: GetItem
// Unfortunately we need to use the inherited method because of how DeRez works.
// The viewer sends the folderID hard-wired in the derez message
//public override bool AddItem(InventoryItemBase item)
//{
// // Check if it's under the Suitcase folder
// List<InventoryFolderBase> skel = base.GetInventorySkeleton(item.Owner);
// InventoryFolderBase suitcase = GetRootFolder(item.Owner);
// List<InventoryFolderBase> suitDescendents = GetDescendents(skel, suitcase.ID);
// foreach (InventoryFolderBase f in suitDescendents)
// if (item.Folder == f.ID)
// return m_Database.StoreItem(ConvertFromOpenSim(item));
// return false;
//}
//public override bool UpdateItem(InventoryItemBase item)
//{
// // Check if it's under the Suitcase folder
// List<InventoryFolderBase> skel = base.GetInventorySkeleton(item.Owner);
// InventoryFolderBase suitcase = GetRootFolder(item.Owner);
// List<InventoryFolderBase> suitDescendents = GetDescendents(skel, suitcase.ID);
// foreach (InventoryFolderBase f in suitDescendents)
// if (item.Folder == f.ID)
// return m_Database.StoreItem(ConvertFromOpenSim(item));
// return false;
//}
//public override bool MoveItems(UUID principalID, List<InventoryItemBase> items)
//{
// // Principal is b0rked. *sigh*
// //
// // Let's assume they all have the same principal
// // Check if it's under the Suitcase folder
// List<InventoryFolderBase> skel = base.GetInventorySkeleton(items[0].Owner);
// InventoryFolderBase suitcase = GetRootFolder(items[0].Owner);
// List<InventoryFolderBase> suitDescendents = GetDescendents(skel, suitcase.ID);
// foreach (InventoryItemBase i in items)
// {
// foreach (InventoryFolderBase f in suitDescendents)
// if (i.Folder == f.ID)
// m_Database.MoveItem(i.ID.ToString(), i.Folder.ToString());
// }
// return true;
//}
// Let these pass. Use inherited methods.
//public bool DeleteItems(UUID principalID, List<UUID> itemIDs)
//{
//}
public override InventoryItemBase GetItem(InventoryItemBase item)
{
InventoryItemBase it = base.GetItem (item);
UserAccount user = m_UserAccountService.GetUserAccount (null, UUID.Parse(it.CreatorId));
// Adjust the creator data
if (user != null && it != null && (it.CreatorData == null || it.CreatorData == string.Empty))
it.CreatorData = GetHandlers.PROFILE_URL + "/" + it.CreatorId + ";" + user.FirstName + " " + user.LastName;
return it;
}
示例15: CreateArchiveItemName
///<summary>
/// Create the archive name for a particular item.
///</summary>
///These names are prepended with an inventory item's UUID so that more than one item can have the
///same name
///<param name = "item"></param>
///<returns></returns>
public static string CreateArchiveItemName(InventoryItemBase item)
{
return CreateArchiveItemName(item.Name, item.ID);
}