mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
* Long awaited patch from A_Biondi Mantis 923. Kept alive by Melanie. Thanks A_Biondi and Melanie!
* This builds but might not work. JustinCC will examine.. it may work out of the box.
This commit is contained in:
@@ -325,7 +325,7 @@ namespace OpenSim.Framework.Communications.Cache
|
||||
{
|
||||
if ((userID == UserProfile.ID) && HasInventory)
|
||||
{
|
||||
m_commsManager.InventoryService.AddNewInventoryItem(userID, itemInfo);
|
||||
m_commsManager.InventoryService.UpdateInventoryItem(userID, itemInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,13 @@ namespace OpenSim.Framework.Communications
|
||||
/// <param name="item"></param>
|
||||
void AddNewInventoryItem(LLUUID userID, InventoryItemBase item);
|
||||
|
||||
/// <summary>
|
||||
/// Update an item in the given user's inventory
|
||||
/// </summary>
|
||||
/// <param name="userID"></param>
|
||||
/// <param name="item"></param>
|
||||
void UpdateInventoryItem(LLUUID userID, InventoryItemBase item);
|
||||
|
||||
/// <summary>
|
||||
/// Delete an item from the given user's inventory
|
||||
/// </summary>
|
||||
|
||||
@@ -172,6 +172,9 @@ namespace OpenSim.Framework.Communications
|
||||
|
||||
// See IInventoryServices
|
||||
public abstract void AddNewInventoryItem(LLUUID userID, InventoryItemBase item);
|
||||
|
||||
// See IInventoryServices
|
||||
public abstract void UpdateInventoryItem(LLUUID userID, InventoryItemBase item);
|
||||
|
||||
// See IInventoryServices
|
||||
public abstract void DeleteInventoryItem(LLUUID userID, InventoryItemBase item);
|
||||
@@ -230,6 +233,14 @@ namespace OpenSim.Framework.Communications
|
||||
}
|
||||
}
|
||||
|
||||
protected void UpdateItem(InventoryItemBase item)
|
||||
{
|
||||
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
||||
{
|
||||
plugin.Value.updateInventoryItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
protected void DeleteItem(InventoryItemBase item)
|
||||
{
|
||||
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
||||
|
||||
@@ -393,9 +393,12 @@ namespace OpenSim.Framework
|
||||
|
||||
public delegate void RequestTaskInventory(IClientAPI remoteClient, uint localID);
|
||||
|
||||
public delegate void UpdateInventoryItem(
|
||||
/* public delegate void UpdateInventoryItem(
|
||||
IClientAPI remoteClient, LLUUID transactionID, LLUUID itemID, string name, string description,
|
||||
uint nextOwnerMask);
|
||||
uint nextOwnerMask);*/
|
||||
|
||||
public delegate void UpdateInventoryItem(
|
||||
IClientAPI remoteClient, LLUUID transactionID, LLUUID itemID, InventoryItemBase itemUpd);
|
||||
|
||||
public delegate void CopyInventoryItem(
|
||||
IClientAPI remoteClient, uint callbackID, LLUUID oldAgentID, LLUUID oldItemID, LLUUID newFolderID,
|
||||
@@ -756,4 +759,4 @@ namespace OpenSim.Framework
|
||||
public byte[] usecircuit;
|
||||
public EndPoint userEP;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,6 +54,10 @@ namespace OpenSim.Framework
|
||||
/// </summary>
|
||||
private LLUUID _creator;
|
||||
|
||||
private LLUUID _owner;
|
||||
|
||||
private uint _nextPermissions;
|
||||
|
||||
/// <summary>
|
||||
/// A mask containing permissions for the current owner (cannot be enforced)
|
||||
/// </summary>
|
||||
@@ -89,20 +93,44 @@ namespace OpenSim.Framework
|
||||
/// </summary>
|
||||
private string _name;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A mask containing the permissions for the next owner (cannot be enforced)
|
||||
///
|
||||
/// </summary>
|
||||
private uint _nextPermissions;
|
||||
private LLUUID _groupID;
|
||||
|
||||
/// <summary>
|
||||
/// The owner of this inventory item
|
||||
///
|
||||
/// </summary>
|
||||
private LLUUID _owner;
|
||||
private bool _groupOwned;
|
||||
|
||||
public LLUUID ID
|
||||
{
|
||||
get { return _id; }
|
||||
set { _id = value; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private int _salePrice;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private byte _saleType;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private uint _flags;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int _creationDate;
|
||||
|
||||
public LLUUID ID {
|
||||
get {
|
||||
return _id;
|
||||
}
|
||||
set {
|
||||
_id = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int InvType
|
||||
@@ -176,5 +204,77 @@ namespace OpenSim.Framework
|
||||
get { return _assetID; }
|
||||
set { _assetID = value; }
|
||||
}
|
||||
|
||||
public LLUUID GroupID
|
||||
{
|
||||
get
|
||||
{
|
||||
return _groupID;
|
||||
}
|
||||
set
|
||||
{
|
||||
_groupID = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool GroupOwned
|
||||
{
|
||||
get
|
||||
{
|
||||
return _groupOwned;
|
||||
}
|
||||
set
|
||||
{
|
||||
_groupOwned = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int SalePrice
|
||||
{
|
||||
get
|
||||
{
|
||||
return _salePrice;
|
||||
}
|
||||
set
|
||||
{
|
||||
_salePrice = value;
|
||||
}
|
||||
}
|
||||
|
||||
public byte SaleType
|
||||
{
|
||||
get
|
||||
{
|
||||
return _saleType;
|
||||
}
|
||||
set
|
||||
{
|
||||
_saleType = value;
|
||||
}
|
||||
}
|
||||
|
||||
public uint Flags
|
||||
{
|
||||
get
|
||||
{
|
||||
return _flags;
|
||||
}
|
||||
set
|
||||
{
|
||||
_flags = value;
|
||||
}
|
||||
}
|
||||
|
||||
public int CreationDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return _creationDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
_creationDate = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user