Merge branch 'careminster-presence-refactor' of ssh://melanie@3dhosting.de/var/git/careminster into careminster-presence-refactor
commit
6bac92db80
|
@ -175,8 +175,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
if (im.binaryBucket.Length < 17) // Invalid
|
if (im.binaryBucket.Length < 17) // Invalid
|
||||||
return;
|
return;
|
||||||
|
|
||||||
UUID receipientID = new UUID(im.toAgentID);
|
UUID recipientID = new UUID(im.toAgentID);
|
||||||
ScenePresence user = scene.GetScenePresence(receipientID);
|
ScenePresence user = scene.GetScenePresence(recipientID);
|
||||||
UUID copyID;
|
UUID copyID;
|
||||||
|
|
||||||
// First byte is the asset type
|
// First byte is the asset type
|
||||||
|
@ -191,7 +191,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
folderID, new UUID(im.toAgentID));
|
folderID, new UUID(im.toAgentID));
|
||||||
|
|
||||||
InventoryFolderBase folderCopy
|
InventoryFolderBase folderCopy
|
||||||
= scene.GiveInventoryFolder(receipientID, client.AgentId, folderID, UUID.Zero);
|
= scene.GiveInventoryFolder(recipientID, client.AgentId, folderID, UUID.Zero);
|
||||||
|
|
||||||
if (folderCopy == null)
|
if (folderCopy == null)
|
||||||
{
|
{
|
||||||
|
@ -419,22 +419,64 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="msg"></param>
|
/// <param name="msg"></param>
|
||||||
private void OnGridInstantMessage(GridInstantMessage msg)
|
private void OnGridInstantMessage(GridInstantMessage im)
|
||||||
{
|
{
|
||||||
// Check if this is ours to handle
|
// Check if this is ours to handle
|
||||||
//
|
//
|
||||||
Scene scene = FindClientScene(new UUID(msg.toAgentID));
|
Scene scene = FindClientScene(new UUID(im.toAgentID));
|
||||||
|
|
||||||
if (scene == null)
|
if (scene == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Find agent to deliver to
|
// Find agent to deliver to
|
||||||
//
|
//
|
||||||
ScenePresence user = scene.GetScenePresence(new UUID(msg.toAgentID));
|
ScenePresence user = scene.GetScenePresence(new UUID(im.toAgentID));
|
||||||
|
if (user == null)
|
||||||
|
return;
|
||||||
|
|
||||||
// Just forward to local handling
|
// This requires a little bit of processing because we have to make the
|
||||||
OnInstantMessage(user.ControllingClient, msg);
|
// new item visible in the recipient's inventory here
|
||||||
|
//
|
||||||
|
if (im.dialog == (byte) InstantMessageDialog.InventoryOffered)
|
||||||
|
{
|
||||||
|
if (im.binaryBucket.Length < 17) // Invalid
|
||||||
|
return;
|
||||||
|
|
||||||
|
UUID recipientID = new UUID(im.toAgentID);
|
||||||
|
|
||||||
|
// First byte is the asset type
|
||||||
|
AssetType assetType = (AssetType)im.binaryBucket[0];
|
||||||
|
|
||||||
|
if (AssetType.Folder == assetType)
|
||||||
|
{
|
||||||
|
UUID folderID = new UUID(im.binaryBucket, 1);
|
||||||
|
|
||||||
|
InventoryFolderBase given =
|
||||||
|
new InventoryFolderBase(folderID, recipientID);
|
||||||
|
InventoryFolderBase folder =
|
||||||
|
scene.InventoryService.GetFolder(given);
|
||||||
|
|
||||||
|
if (folder != null)
|
||||||
|
user.ControllingClient.SendBulkUpdateInventory(folder);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UUID itemID = new UUID(im.binaryBucket, 1);
|
||||||
|
|
||||||
|
InventoryItemBase given =
|
||||||
|
new InventoryItemBase(itemID, recipientID);
|
||||||
|
InventoryItemBase item =
|
||||||
|
scene.InventoryService.GetItem(given);
|
||||||
|
|
||||||
|
if (item != null)
|
||||||
|
{
|
||||||
|
user.ControllingClient.SendBulkUpdateInventory(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Just forward to the client
|
||||||
|
user.ControllingClient.SendInstantMessage(im);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1760,6 +1760,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
//
|
//
|
||||||
foreach (SceneObjectGroup g in affectedGroups)
|
foreach (SceneObjectGroup g in affectedGroups)
|
||||||
{
|
{
|
||||||
|
// Child prims that have been unlinked and deleted will
|
||||||
|
// return unless the root is deleted. This will remove them
|
||||||
|
// from the database. They will be rewritten immediately,
|
||||||
|
// minus the rows for the unlinked child prims.
|
||||||
|
m_parentScene.SimulationDataService.RemoveObject(g.UUID, m_parentScene.RegionInfo.RegionID);
|
||||||
g.TriggerScriptChangedEvent(Changed.LINK);
|
g.TriggerScriptChangedEvent(Changed.LINK);
|
||||||
g.HasGroupChanged = true; // Persist
|
g.HasGroupChanged = true; // Persist
|
||||||
g.areUpdatesSuspended = false;
|
g.areUpdatesSuspended = false;
|
||||||
|
|
Loading…
Reference in New Issue