Initial hookup of update task inventory event. No functionality yet.
parent
21e32196c7
commit
1ac57290ae
|
@ -3043,7 +3043,6 @@ namespace OpenSim.Region.ClientStack
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PacketType.UpdateTaskInventory:
|
case PacketType.UpdateTaskInventory:
|
||||||
//Console.WriteLine(Pack.ToString());
|
|
||||||
UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket) Pack;
|
UpdateTaskInventoryPacket updatetask = (UpdateTaskInventoryPacket) Pack;
|
||||||
if (OnUpdateTaskInventory != null)
|
if (OnUpdateTaskInventory != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -357,7 +357,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// Request a prim (task) inventory
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
/// <param name="primLocalID"></param>
|
/// <param name="primLocalID"></param>
|
||||||
|
@ -375,8 +375,19 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MainLog.Instance.Warn(
|
||||||
|
"PRIMINVENTORY", "Inventory requested of prim {0} which doesn't exist", primLocalID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Remove an item from a prim (task) inventory
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="remoteClient"></param>
|
||||||
|
/// <param name="itemID"></param>
|
||||||
|
/// <param name="localID"></param>
|
||||||
public void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID)
|
public void RemoveTaskInventory(IClientAPI remoteClient, LLUUID itemID, uint localID)
|
||||||
{
|
{
|
||||||
SceneObjectGroup group = GetGroupByPrim(localID);
|
SceneObjectGroup group = GetGroupByPrim(localID);
|
||||||
|
@ -389,6 +400,44 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
EventManager.TriggerRemoveScript(localID, itemID);
|
EventManager.TriggerRemoveScript(localID, itemID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MainLog.Instance.Warn(
|
||||||
|
"PRIMINVENTORY",
|
||||||
|
"Removal of item {0} requested of prim {1} but this prim does not exist",
|
||||||
|
itemID,
|
||||||
|
localID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update an item in a prim (task) inventory
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="remoteClient"></param>
|
||||||
|
/// <param name="itemID"></param>
|
||||||
|
/// <param name="folderID"></param>
|
||||||
|
/// <param name="primLocalID"></param>
|
||||||
|
public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID,
|
||||||
|
uint primLocalID)
|
||||||
|
{
|
||||||
|
SceneObjectGroup group = GetGroupByPrim(primLocalID);
|
||||||
|
if (group != null)
|
||||||
|
{
|
||||||
|
// TODO Retrieve itemID from client's inventory to pass on
|
||||||
|
//group.AddInventoryItem(rmoteClient, primLocalID, null);
|
||||||
|
MainLog.Instance.Verbose(
|
||||||
|
"PRIMINVENTORY",
|
||||||
|
"UpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}",
|
||||||
|
itemID, folderID, primLocalID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MainLog.Instance.Warn(
|
||||||
|
"PRIMINVENTORY",
|
||||||
|
"Update with item {0} requested of prim {1} but this prim does not exist",
|
||||||
|
itemID,
|
||||||
|
primLocalID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID)
|
public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID)
|
||||||
|
@ -430,7 +479,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (group != null)
|
if (group != null)
|
||||||
{
|
{
|
||||||
// TODO: do we care about the value of this bool?
|
// TODO: do we care about the value of this bool?
|
||||||
bool added = group.AddInventoryItem(remoteClient, localID, item, copyID);
|
group.AddInventoryItem(remoteClient, localID, item, copyID);
|
||||||
group.GetProperites(remoteClient);
|
group.GetProperites(remoteClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1149,7 +1149,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
client.OnMoveInventoryFolder += CommsManager.UserProfileCacheService.HandleMoveInventoryFolder;
|
client.OnMoveInventoryFolder += CommsManager.UserProfileCacheService.HandleMoveInventoryFolder;
|
||||||
client.OnFetchInventoryDescendents += CommsManager.UserProfileCacheService.HandleFetchInventoryDescendents;
|
client.OnFetchInventoryDescendents += CommsManager.UserProfileCacheService.HandleFetchInventoryDescendents;
|
||||||
client.OnPurgeInventoryDescendents += CommsManager.UserProfileCacheService.HandlePurgeInventoryDescendents;
|
client.OnPurgeInventoryDescendents += CommsManager.UserProfileCacheService.HandlePurgeInventoryDescendents;
|
||||||
client.OnRequestTaskInventory += RequestTaskInventory;
|
|
||||||
client.OnFetchInventory += CommsManager.UserProfileCacheService.HandleFetchInventory;
|
client.OnFetchInventory += CommsManager.UserProfileCacheService.HandleFetchInventory;
|
||||||
client.OnUpdateInventoryItem += UpdateInventoryItemAsset;
|
client.OnUpdateInventoryItem += UpdateInventoryItemAsset;
|
||||||
client.OnCopyInventoryItem += CopyInventoryItem;
|
client.OnCopyInventoryItem += CopyInventoryItem;
|
||||||
|
@ -1157,7 +1156,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest;
|
client.OnAssetUploadRequest += CommsManager.TransactionsManager.HandleUDPUploadRequest;
|
||||||
client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer;
|
client.OnXferReceive += CommsManager.TransactionsManager.HandleXfer;
|
||||||
client.OnRezScript += RezScript;
|
client.OnRezScript += RezScript;
|
||||||
|
|
||||||
|
client.OnRequestTaskInventory += RequestTaskInventory;
|
||||||
client.OnRemoveTaskItem += RemoveTaskInventory;
|
client.OnRemoveTaskItem += RemoveTaskInventory;
|
||||||
|
client.OnUpdateTaskInventory += UpdateTaskInventory;
|
||||||
|
|
||||||
client.OnGrabObject += ProcessObjectGrab;
|
client.OnGrabObject += ProcessObjectGrab;
|
||||||
client.OnAvatarPickerRequest += ProcessAvatarPickerRequest;
|
client.OnAvatarPickerRequest += ProcessAvatarPickerRequest;
|
||||||
|
|
Loading…
Reference in New Issue