Changed FromAssetID to FromItemID
parent
dd8b9d5810
commit
1bbf06405c
|
@ -1906,8 +1906,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
item.CreationDate = Util.UnixTimeSinceEpoch();
|
item.CreationDate = Util.UnixTimeSinceEpoch();
|
||||||
|
|
||||||
// sets assetID so client can show asset as 'attached' in inventory
|
// sets itemID so client can show item as 'attached' in inventory
|
||||||
grp.SetFromAssetID(item.ID);
|
grp.SetFromItemID(item.ID);
|
||||||
|
|
||||||
if (InventoryService.AddItem(item))
|
if (InventoryService.AddItem(item))
|
||||||
remoteClient.SendInventoryItemCreateUpdate(item, 0);
|
remoteClient.SendInventoryItemCreateUpdate(item, 0);
|
||||||
|
@ -2044,7 +2044,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
group.SetFromAssetID(itemID);
|
group.SetFromItemID(itemID);
|
||||||
}
|
}
|
||||||
|
|
||||||
SceneObjectPart rootPart = null;
|
SceneObjectPart rootPart = null;
|
||||||
|
@ -2373,7 +2373,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (part == null || part.ParentGroup == null)
|
if (part == null || part.ParentGroup == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
UUID inventoryID = part.ParentGroup.GetFromAssetID();
|
UUID inventoryID = part.ParentGroup.GetFromItemID();
|
||||||
|
|
||||||
ScenePresence presence;
|
ScenePresence presence;
|
||||||
if (TryGetAvatar(remoteClient.AgentId, out presence))
|
if (TryGetAvatar(remoteClient.AgentId, out presence))
|
||||||
|
|
|
@ -1962,7 +1962,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_log.DebugFormat("[ATTACHMENT]: Received " +
|
m_log.DebugFormat("[ATTACHMENT]: Received " +
|
||||||
"attachment {0}, inworld asset id {1}",
|
"attachment {0}, inworld asset id {1}",
|
||||||
//grp.RootPart.LastOwnerID.ToString(),
|
//grp.RootPart.LastOwnerID.ToString(),
|
||||||
grp.GetFromAssetID(),
|
grp.GetFromItemID(),
|
||||||
grp.UUID.ToString());
|
grp.UUID.ToString());
|
||||||
|
|
||||||
//grp.SetFromAssetID(grp.RootPart.LastOwnerID);
|
//grp.SetFromAssetID(grp.RootPart.LastOwnerID);
|
||||||
|
|
|
@ -442,7 +442,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (group != null)
|
if (group != null)
|
||||||
{
|
{
|
||||||
//group.DetachToGround();
|
//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
|
// Calls attach with a Zero position
|
||||||
//
|
//
|
||||||
AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, Vector3.Zero, false);
|
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(
|
public SceneObjectGroup RezSingleAttachment(
|
||||||
|
@ -536,14 +536,14 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (entity is SceneObjectGroup)
|
if (entity is SceneObjectGroup)
|
||||||
{
|
{
|
||||||
group = (SceneObjectGroup)entity;
|
group = (SceneObjectGroup)entity;
|
||||||
if (group.GetFromAssetID() == itemID)
|
if (group.GetFromItemID() == itemID)
|
||||||
{
|
{
|
||||||
m_parentScene.SendAttachEvent(group.LocalId, itemID, UUID.Zero);
|
m_parentScene.SendAttachEvent(group.LocalId, itemID, UUID.Zero);
|
||||||
group.DetachToInventoryPrep();
|
group.DetachToInventoryPrep();
|
||||||
m_log.Debug("[DETACH]: Saving attachpoint: " +
|
m_log.Debug("[DETACH]: Saving attachpoint: " +
|
||||||
((uint)group.GetAttachmentPoint()).ToString());
|
((uint)group.GetAttachmentPoint()).ToString());
|
||||||
m_parentScene.UpdateKnownItem(remoteClient, group,
|
m_parentScene.UpdateKnownItem(remoteClient, group,
|
||||||
group.GetFromAssetID(), group.OwnerID);
|
group.GetFromItemID(), group.OwnerID);
|
||||||
m_parentScene.DeleteSceneObject(group, false);
|
m_parentScene.DeleteSceneObject(group, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -588,13 +588,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Saves and gets assetID
|
// Saves and gets assetID
|
||||||
UUID itemId;
|
UUID itemId;
|
||||||
|
|
||||||
if (group.GetFromAssetID() == UUID.Zero)
|
if (group.GetFromItemID() == UUID.Zero)
|
||||||
{
|
{
|
||||||
m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemId);
|
m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemId);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
itemId = group.GetFromAssetID();
|
itemId = group.GetFromItemID();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group);
|
m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group);
|
||||||
|
@ -1307,7 +1307,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
group.UpdateGroupPosition(pos);
|
group.UpdateGroupPosition(pos);
|
||||||
group.RootPart.IsAttachment = false;
|
group.RootPart.IsAttachment = false;
|
||||||
group.AbsolutePosition = group.RootPart.AttachedPos;
|
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);
|
group.SetAttachmentPoint(attachmentPoint);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -447,22 +447,22 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetFromAssetID(UUID AssetId)
|
public void SetFromItemID(UUID AssetId)
|
||||||
{
|
{
|
||||||
lock (m_parts)
|
lock (m_parts)
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
foreach (SceneObjectPart part in m_parts.Values)
|
||||||
{
|
{
|
||||||
part.FromAssetID = AssetId;
|
part.FromItemID = AssetId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public UUID GetFromAssetID()
|
public UUID GetFromItemID()
|
||||||
{
|
{
|
||||||
if (m_rootPart != null)
|
if (m_rootPart != null)
|
||||||
{
|
{
|
||||||
return m_rootPart.FromAssetID;
|
return m_rootPart.FromItemID;
|
||||||
}
|
}
|
||||||
return UUID.Zero;
|
return UUID.Zero;
|
||||||
}
|
}
|
||||||
|
@ -3374,19 +3374,19 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
public virtual string ExtraToXmlString()
|
public virtual string ExtraToXmlString()
|
||||||
{
|
{
|
||||||
return "<ExtraFromAssetID>" + GetFromAssetID().ToString() + "</ExtraFromAssetID>";
|
return "<ExtraFromItemID>" + GetFromItemID().ToString() + "</ExtraFromItemID>";
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void ExtraFromXmlString(string xmlstr)
|
public virtual void ExtraFromXmlString(string xmlstr)
|
||||||
{
|
{
|
||||||
string id = xmlstr.Substring(xmlstr.IndexOf("<ExtraFromAssetID>"));
|
string id = xmlstr.Substring(xmlstr.IndexOf("<ExtraFromItemID>"));
|
||||||
id = xmlstr.Replace("<ExtraFromAssetID>", "");
|
id = xmlstr.Replace("<ExtraFromItemID>", "");
|
||||||
id = id.Replace("</ExtraFromAssetID>", "");
|
id = id.Replace("</ExtraFromItemID>", "");
|
||||||
|
|
||||||
UUID uuid = UUID.Zero;
|
UUID uuid = UUID.Zero;
|
||||||
UUID.TryParse(id, out uuid);
|
UUID.TryParse(id, out uuid);
|
||||||
|
|
||||||
SetFromAssetID(uuid);
|
SetFromItemID(uuid);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
@ -139,7 +139,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public uint TimeStampTerse = 0;
|
public uint TimeStampTerse = 0;
|
||||||
|
|
||||||
[XmlIgnore]
|
[XmlIgnore]
|
||||||
public UUID FromAssetID = UUID.Zero;
|
public UUID FromItemID = UUID.Zero;
|
||||||
|
|
||||||
/// <value>
|
/// <value>
|
||||||
/// The UUID of the user inventory item from which this object was rezzed if this is a root part.
|
/// 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,
|
remoteClient.SendPrimitiveToClient(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, m_shape,
|
||||||
lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, _ownerID,
|
lPos, Velocity, Acceleration, RotationOffset, RotationalVelocity, clientFlags, m_uuid, _ownerID,
|
||||||
m_text, color, _parentID, m_particleSystem, m_clickAction, (byte)m_material, m_TextureAnimation, IsAttachment,
|
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>
|
/// <summary>
|
||||||
|
@ -3767,7 +3767,7 @@ if (m_shape != null) {
|
||||||
(ushort)(m_parentGroup.GetTimeDilation() *
|
(ushort)(m_parentGroup.GetTimeDilation() *
|
||||||
(float)ushort.MaxValue), LocalId, lPos,
|
(float)ushort.MaxValue), LocalId, lPos,
|
||||||
RotationOffset, Velocity,
|
RotationOffset, Velocity,
|
||||||
RotationalVelocity, state, FromAssetID,
|
RotationalVelocity, state, FromItemID,
|
||||||
OwnerID, (int)AttachmentPoint);
|
OwnerID, (int)AttachmentPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2801,7 +2801,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
if ((item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0)
|
if ((item.PermsMask & ScriptBaseClass.PERMISSION_ATTACH) != 0)
|
||||||
{
|
{
|
||||||
SceneObjectGroup grp = m_host.ParentGroup;
|
SceneObjectGroup grp = m_host.ParentGroup;
|
||||||
UUID itemID = grp.GetFromAssetID();
|
UUID itemID = grp.GetFromItemID();
|
||||||
|
|
||||||
ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
|
ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue