Thank you kindly, Melanie, for:
Nothing huge, but the new button code for producing a new script does well, but the script will not allow for name change once created. It reverts back to new script.0.6.0-stable
parent
7dcaa409b3
commit
066b350d20
|
@ -566,7 +566,7 @@ namespace OpenSim.Framework
|
||||||
|
|
||||||
public delegate void RezScript(IClientAPI remoteClient, InventoryItemBase item, LLUUID transactionID, uint localID);
|
public delegate void RezScript(IClientAPI remoteClient, InventoryItemBase item, LLUUID transactionID, uint localID);
|
||||||
|
|
||||||
public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID, uint localID);
|
public delegate void UpdateTaskInventory(IClientAPI remoteClient, LLUUID transactionID, TaskInventoryItem item, uint localID);
|
||||||
|
|
||||||
public delegate void MoveTaskInventory(IClientAPI remoteClient, LLUUID folderID, uint localID, LLUUID itemID);
|
public delegate void MoveTaskInventory(IClientAPI remoteClient, LLUUID folderID, uint localID, LLUUID itemID);
|
||||||
|
|
||||||
|
|
|
@ -5075,8 +5075,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
handlerUpdateTaskInventory = OnUpdateTaskInventory;
|
handlerUpdateTaskInventory = OnUpdateTaskInventory;
|
||||||
if (handlerUpdateTaskInventory != null)
|
if (handlerUpdateTaskInventory != null)
|
||||||
{
|
{
|
||||||
handlerUpdateTaskInventory(this, updatetask.InventoryData.ItemID,
|
TaskInventoryItem newTaskItem=new TaskInventoryItem();
|
||||||
updatetask.InventoryData.FolderID, updatetask.UpdateData.LocalID);
|
newTaskItem.ItemID=updatetask.InventoryData.ItemID;
|
||||||
|
newTaskItem.ParentID=updatetask.InventoryData.FolderID;
|
||||||
|
newTaskItem.CreatorID=updatetask.InventoryData.CreatorID;
|
||||||
|
newTaskItem.OwnerID=updatetask.InventoryData.OwnerID;
|
||||||
|
newTaskItem.GroupID=updatetask.InventoryData.GroupID;
|
||||||
|
newTaskItem.BaseMask=updatetask.InventoryData.BaseMask;
|
||||||
|
newTaskItem.OwnerMask=updatetask.InventoryData.OwnerMask;
|
||||||
|
newTaskItem.GroupMask=updatetask.InventoryData.GroupMask;
|
||||||
|
newTaskItem.EveryoneMask=updatetask.InventoryData.EveryoneMask;
|
||||||
|
newTaskItem.NextOwnerMask=updatetask.InventoryData.NextOwnerMask;
|
||||||
|
//newTaskItem.GroupOwned=updatetask.InventoryData.GroupOwned;
|
||||||
|
newTaskItem.Type=updatetask.InventoryData.Type;
|
||||||
|
newTaskItem.InvType=updatetask.InventoryData.InvType;
|
||||||
|
newTaskItem.Flags=updatetask.InventoryData.Flags;
|
||||||
|
//newTaskItem.SaleType=updatetask.InventoryData.SaleType;
|
||||||
|
//newTaskItem.SalePrice=updatetask.InventoryData.SalePrice;;
|
||||||
|
newTaskItem.Name=Util.FieldToString(updatetask.InventoryData.Name);
|
||||||
|
newTaskItem.Description=Util.FieldToString(updatetask.InventoryData.Description);
|
||||||
|
newTaskItem.CreationDate=(uint)updatetask.InventoryData.CreationDate;
|
||||||
|
handlerUpdateTaskInventory(this, updatetask.InventoryData.TransactionID,
|
||||||
|
newTaskItem, updatetask.UpdateData.LocalID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -301,13 +301,14 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
|
||||||
LLObject.ObjectFlags.ObjectMove | // tells client that you can move the object (only, no mod)
|
LLObject.ObjectFlags.ObjectMove | // tells client that you can move the object (only, no mod)
|
||||||
LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it
|
LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it
|
||||||
LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object
|
LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object
|
||||||
|
LLObject.ObjectFlags.ObjectOwnerModify | // Tells client that you're the owner of the object
|
||||||
LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set
|
LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set
|
||||||
);
|
);
|
||||||
|
|
||||||
// Creating the three ObjectFlags options for this method to choose from.
|
// Creating the three ObjectFlags options for this method to choose from.
|
||||||
// Customize the OwnerMask
|
// Customize the OwnerMask
|
||||||
uint objectOwnerMask = ApplyObjectModifyMasks(task.OwnerMask, objflags);
|
uint objectOwnerMask = ApplyObjectModifyMasks(task.OwnerMask, objflags);
|
||||||
objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectYouOwner;
|
objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectYouOwner | (uint)LLObject.ObjectFlags.ObjectOwnerModify;
|
||||||
|
|
||||||
// Customize the GroupMask
|
// Customize the GroupMask
|
||||||
uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags);
|
uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags);
|
||||||
|
|
|
@ -897,53 +897,66 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// This method does not handle scripts, <see>RezScript(IClientAPI, LLUUID, unit)</see>
|
/// This method does not handle scripts, <see>RezScript(IClientAPI, LLUUID, unit)</see>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
/// <param name="itemID"></param>
|
/// <param name="transactionID"></param>
|
||||||
/// <param name="folderID"></param>
|
/// <param name="itemInfo"></param>
|
||||||
/// <param name="primLocalID"></param>
|
/// <param name="primLocalID"></param>
|
||||||
public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID itemID, LLUUID folderID,
|
public void UpdateTaskInventory(IClientAPI remoteClient, LLUUID transactionID, TaskInventoryItem itemInfo,
|
||||||
uint primLocalID)
|
uint primLocalID)
|
||||||
{
|
{
|
||||||
|
LLUUID itemID=itemInfo.ItemID;
|
||||||
|
LLUUID folderID=itemInfo.ParentID;
|
||||||
|
|
||||||
|
// Find the prim we're dealing with
|
||||||
SceneObjectPart part = GetSceneObjectPart(primLocalID);
|
SceneObjectPart part = GetSceneObjectPart(primLocalID);
|
||||||
|
|
||||||
if (part != null)
|
if (part != null)
|
||||||
{
|
{
|
||||||
LLUUID copyID = LLUUID.Random();
|
TaskInventoryItem currentItem=part.GetInventoryItem(itemID);
|
||||||
if (itemID != LLUUID.Zero)
|
if(currentItem == null)
|
||||||
{
|
{
|
||||||
CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
|
LLUUID copyID = LLUUID.Random();
|
||||||
|
if (itemID != LLUUID.Zero)
|
||||||
if (userInfo != null && userInfo.RootFolder != null)
|
|
||||||
{
|
{
|
||||||
InventoryItemBase item = userInfo.RootFolder.FindItem(itemID);
|
CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
|
||||||
|
|
||||||
// Try library
|
if (userInfo != null && userInfo.RootFolder != null)
|
||||||
// XXX clumsy, possibly should be one call
|
|
||||||
if (null == item)
|
|
||||||
{
|
{
|
||||||
item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID);
|
InventoryItemBase item = userInfo.RootFolder.FindItem(itemID);
|
||||||
}
|
|
||||||
|
|
||||||
if (item != null)
|
// Try library
|
||||||
{
|
// XXX clumsy, possibly should be one call
|
||||||
part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID);
|
if (null == item)
|
||||||
m_log.InfoFormat(
|
|
||||||
"[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}",
|
|
||||||
item.Name, primLocalID, remoteClient.Name);
|
|
||||||
part.GetProperties(remoteClient);
|
|
||||||
if (!ExternalChecks.ExternalChecksBypassPermissions())
|
|
||||||
{
|
{
|
||||||
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
item = CommsManager.UserProfileCacheService.libraryRoot.FindItem(itemID);
|
||||||
RemoveInventoryItem(remoteClient, itemID);
|
}
|
||||||
|
|
||||||
|
if (item != null)
|
||||||
|
{
|
||||||
|
part.ParentGroup.AddInventoryItem(remoteClient, primLocalID, item, copyID);
|
||||||
|
m_log.InfoFormat(
|
||||||
|
"[PRIM INVENTORY]: Update with item {0} requested of prim {1} for {2}",
|
||||||
|
item.Name, primLocalID, remoteClient.Name);
|
||||||
|
part.GetProperties(remoteClient);
|
||||||
|
if (!ExternalChecks.ExternalChecksBypassPermissions())
|
||||||
|
{
|
||||||
|
if ((item.CurrentPermissions & (uint)PermissionMask.Copy) == 0)
|
||||||
|
RemoveInventoryItem(remoteClient, itemID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.ErrorFormat(
|
||||||
|
"[PRIM INVENTORY]: Could not find inventory item {0} to update for {1}!",
|
||||||
|
itemID, remoteClient.Name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
m_log.ErrorFormat(
|
|
||||||
"[PRIM INVENTORY]: Could not find inventory item {0} to update for {1}!",
|
|
||||||
itemID, remoteClient.Name);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else // Updating existing item with new perms etc
|
||||||
|
{
|
||||||
|
if(part.UpdateInventoryItem(itemInfo))
|
||||||
|
part.GetProperties(remoteClient);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,6 +69,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
(uint)LLObject.ObjectFlags.ObjectMove |
|
(uint)LLObject.ObjectFlags.ObjectMove |
|
||||||
(uint)LLObject.ObjectFlags.ObjectTransfer |
|
(uint)LLObject.ObjectFlags.ObjectTransfer |
|
||||||
(uint)LLObject.ObjectFlags.ObjectYouOwner |
|
(uint)LLObject.ObjectFlags.ObjectYouOwner |
|
||||||
|
(uint)LLObject.ObjectFlags.ObjectOwnerModify |
|
||||||
(uint)LLObject.ObjectFlags.ObjectYouOfficer;
|
(uint)LLObject.ObjectFlags.ObjectYouOfficer;
|
||||||
|
|
||||||
foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions)
|
foreach (GenerateClientFlags check in GenerateClientFlagsCheckFunctions)
|
||||||
|
|
|
@ -286,7 +286,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public void AddInventoryItem(TaskInventoryItem item)
|
public void AddInventoryItem(TaskInventoryItem item)
|
||||||
{
|
{
|
||||||
item.ParentID = UUID;
|
item.ParentID = UUID;
|
||||||
item.CreationDate = 1000;
|
|
||||||
item.ParentPartID = UUID;
|
item.ParentPartID = UUID;
|
||||||
|
|
||||||
string name=FindAvailableInventoryName(item.Name);
|
string name=FindAvailableInventoryName(item.Name);
|
||||||
|
@ -369,6 +368,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
if (m_taskInventory.ContainsKey(item.ItemID))
|
if (m_taskInventory.ContainsKey(item.ItemID))
|
||||||
{
|
{
|
||||||
|
item.ParentID = UUID;
|
||||||
|
item.ParentPartID = UUID;
|
||||||
|
item.Flags=m_taskInventory[item.ItemID].Flags;
|
||||||
|
|
||||||
m_taskInventory[item.ItemID] = item;
|
m_taskInventory[item.ItemID] = item;
|
||||||
m_inventorySerial++;
|
m_inventorySerial++;
|
||||||
TriggerScriptChangedEvent(Changed.INVENTORY);
|
TriggerScriptChangedEvent(Changed.INVENTORY);
|
||||||
|
|
Loading…
Reference in New Issue