Changed FromAssetID to FromItemID

arthursv
Diva Canto 2009-08-15 09:36:45 -07:00
parent dd8b9d5810
commit 1bbf06405c
6 changed files with 25 additions and 25 deletions

View File

@ -1906,8 +1906,8 @@ namespace OpenSim.Region.Framework.Scenes
}
item.CreationDate = Util.UnixTimeSinceEpoch();
// sets assetID so client can show asset as 'attached' in inventory
grp.SetFromAssetID(item.ID);
// sets itemID so client can show item as 'attached' in inventory
grp.SetFromItemID(item.ID);
if (InventoryService.AddItem(item))
remoteClient.SendInventoryItemCreateUpdate(item, 0);
@ -2044,7 +2044,7 @@ namespace OpenSim.Region.Framework.Scenes
}
else
{
group.SetFromAssetID(itemID);
group.SetFromItemID(itemID);
}
SceneObjectPart rootPart = null;
@ -2373,7 +2373,7 @@ namespace OpenSim.Region.Framework.Scenes
if (part == null || part.ParentGroup == null)
return;
UUID inventoryID = part.ParentGroup.GetFromAssetID();
UUID inventoryID = part.ParentGroup.GetFromItemID();
ScenePresence presence;
if (TryGetAvatar(remoteClient.AgentId, out presence))

View File

@ -1962,7 +1962,7 @@ namespace OpenSim.Region.Framework.Scenes
m_log.DebugFormat("[ATTACHMENT]: Received " +
"attachment {0}, inworld asset id {1}",
//grp.RootPart.LastOwnerID.ToString(),
grp.GetFromAssetID(),
grp.GetFromItemID(),
grp.UUID.ToString());
//grp.SetFromAssetID(grp.RootPart.LastOwnerID);

View File

@ -442,7 +442,7 @@ namespace OpenSim.Region.Framework.Scenes
if (group != null)
{
//group.DetachToGround();
m_parentScene.DetachSingleAttachmentToInv(group.GetFromAssetID(), remoteClient);
m_parentScene.DetachSingleAttachmentToInv(group.GetFromItemID(), remoteClient);
}
}
@ -489,7 +489,7 @@ namespace OpenSim.Region.Framework.Scenes
// Calls attach with a Zero position
//
AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, Vector3.Zero, false);
m_parentScene.SendAttachEvent(objectLocalID, part.ParentGroup.GetFromAssetID(), remoteClient.AgentId);
m_parentScene.SendAttachEvent(objectLocalID, part.ParentGroup.GetFromItemID(), remoteClient.AgentId);
}
public SceneObjectGroup RezSingleAttachment(
@ -536,14 +536,14 @@ namespace OpenSim.Region.Framework.Scenes
if (entity is SceneObjectGroup)
{
group = (SceneObjectGroup)entity;
if (group.GetFromAssetID() == itemID)
if (group.GetFromItemID() == itemID)
{
m_parentScene.SendAttachEvent(group.LocalId, itemID, UUID.Zero);
group.DetachToInventoryPrep();
m_log.Debug("[DETACH]: Saving attachpoint: " +
((uint)group.GetAttachmentPoint()).ToString());
m_parentScene.UpdateKnownItem(remoteClient, group,
group.GetFromAssetID(), group.OwnerID);
group.GetFromItemID(), group.OwnerID);
m_parentScene.DeleteSceneObject(group, false);
return;
}
@ -588,13 +588,13 @@ namespace OpenSim.Region.Framework.Scenes
// Saves and gets assetID
UUID itemId;
if (group.GetFromAssetID() == UUID.Zero)
if (group.GetFromItemID() == UUID.Zero)
{
m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemId);
}
else
{
itemId = group.GetFromAssetID();
itemId = group.GetFromItemID();
}
m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group);
@ -1307,7 +1307,7 @@ namespace OpenSim.Region.Framework.Scenes
group.UpdateGroupPosition(pos);
group.RootPart.IsAttachment = false;
group.AbsolutePosition = group.RootPart.AttachedPos;
m_parentScene.UpdateKnownItem(remoteClient, group, group.GetFromAssetID(), group.OwnerID);
m_parentScene.UpdateKnownItem(remoteClient, group, group.GetFromItemID(), group.OwnerID);
group.SetAttachmentPoint(attachmentPoint);
}

View File

@ -447,22 +447,22 @@ namespace OpenSim.Region.Framework.Scenes
}
}
public void SetFromAssetID(UUID AssetId)
public void SetFromItemID(UUID AssetId)
{
lock (m_parts)
{
foreach (SceneObjectPart part in m_parts.Values)
{
part.FromAssetID = AssetId;
part.FromItemID = AssetId;
}
}
}
public UUID GetFromAssetID()
public UUID GetFromItemID()
{
if (m_rootPart != null)
{
return m_rootPart.FromAssetID;
return m_rootPart.FromItemID;
}
return UUID.Zero;
}
@ -3374,19 +3374,19 @@ namespace OpenSim.Region.Framework.Scenes
public virtual string ExtraToXmlString()
{
return "<ExtraFromAssetID>" + GetFromAssetID().ToString() + "</ExtraFromAssetID>";
return "<ExtraFromItemID>" + GetFromItemID().ToString() + "</ExtraFromItemID>";
}
public virtual void ExtraFromXmlString(string xmlstr)
{
string id = xmlstr.Substring(xmlstr.IndexOf("<ExtraFromAssetID>"));
id = xmlstr.Replace("<ExtraFromAssetID>", "");
id = id.Replace("</ExtraFromAssetID>", "");
string id = xmlstr.Substring(xmlstr.IndexOf("<ExtraFromItemID>"));
id = xmlstr.Replace("<ExtraFromItemID>", "");
id = id.Replace("</ExtraFromItemID>", "");
UUID uuid = UUID.Zero;
UUID.TryParse(id, out uuid);
SetFromAssetID(uuid);
SetFromItemID(uuid);
}
#endregion

View File

@ -139,7 +139,7 @@ namespace OpenSim.Region.Framework.Scenes
public uint TimeStampTerse = 0;
[XmlIgnore]
public UUID FromAssetID = UUID.Zero;
public UUID FromItemID = UUID.Zero;
/// <value>
/// The UUID of the user inventory item from which this object was rezzed if this is a root part.
@ -2389,7 +2389,7 @@ if (m_shape != null) {
remoteClient.SendPrimitiveToClient(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape,
lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, _ownerID,
m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment,
AttachmentPoint,FromAssetID, Sound, SoundGain, SoundFlags, SoundRadius);
AttachmentPoint,FromItemID, Sound, SoundGain, SoundFlags, SoundRadius);
}
/// <summary>
@ -3767,7 +3767,7 @@ if (m_shape != null) {
(ushort)(m_parentGroup.GetTimeDilation() *
(float)ushort.MaxValue), LocalId, lPos,
RotationOffset, Velocity,
RotationalVelocity, state, FromAssetID,
RotationalVelocity, state, FromItemID,
OwnerID, (int)AttachmentPoint);
}

View File

@ -2801,7 +2801,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if ((item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0)
{
SceneObjectGroup grp = m_host.ParentGroup;
UUID itemID = grp.GetFromAssetID();
UUID itemID = grp.GetFromItemID();
ScenePresence presence = World.GetScenePresence(m_host.OwnerID);