aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorTom2010-08-06 11:39:10 -0700
committerTom2010-08-06 11:39:10 -0700
commit330343505ca2d6d109e89b4767f4351ab9bec91d (patch)
treef4aea7182e3ca13f23a94b4b47499937bb473cbb /OpenSim/Region
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
downloadopensim-SC_OLD-330343505ca2d6d109e89b4767f4351ab9bec91d.zip
opensim-SC_OLD-330343505ca2d6d109e89b4767f4351ab9bec91d.tar.gz
opensim-SC_OLD-330343505ca2d6d109e89b4767f4351ab9bec91d.tar.bz2
opensim-SC_OLD-330343505ca2d6d109e89b4767f4351ab9bec91d.tar.xz
Implement CreateNewOutfitAttachments. This addresses mantis #199.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs33
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs20
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs1
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs2
6 files changed, 57 insertions, 2 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 0b8b95b..cd7c11b 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -154,6 +154,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
154 public event RequestTaskInventory OnRequestTaskInventory; 154 public event RequestTaskInventory OnRequestTaskInventory;
155 public event UpdateInventoryItem OnUpdateInventoryItem; 155 public event UpdateInventoryItem OnUpdateInventoryItem;
156 public event CopyInventoryItem OnCopyInventoryItem; 156 public event CopyInventoryItem OnCopyInventoryItem;
157 public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
157 public event MoveInventoryItem OnMoveInventoryItem; 158 public event MoveInventoryItem OnMoveInventoryItem;
158 public event RemoveInventoryItem OnRemoveInventoryItem; 159 public event RemoveInventoryItem OnRemoveInventoryItem;
159 public event RemoveInventoryFolder OnRemoveInventoryFolder; 160 public event RemoveInventoryFolder OnRemoveInventoryFolder;
@@ -4840,6 +4841,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4840 AddLocalPacketHandler(PacketType.TransferAbort, HandleTransferAbort, false); 4841 AddLocalPacketHandler(PacketType.TransferAbort, HandleTransferAbort, false);
4841 AddLocalPacketHandler(PacketType.MuteListRequest, HandleMuteListRequest, false); 4842 AddLocalPacketHandler(PacketType.MuteListRequest, HandleMuteListRequest, false);
4842 AddLocalPacketHandler(PacketType.UseCircuitCode, HandleUseCircuitCode); 4843 AddLocalPacketHandler(PacketType.UseCircuitCode, HandleUseCircuitCode);
4844 AddLocalPacketHandler(PacketType.CreateNewOutfitAttachments, HandleCreateNewOutfitAttachments);
4843 AddLocalPacketHandler(PacketType.AgentHeightWidth, HandleAgentHeightWidth, false); 4845 AddLocalPacketHandler(PacketType.AgentHeightWidth, HandleAgentHeightWidth, false);
4844 AddLocalPacketHandler(PacketType.InventoryDescendents, HandleInventoryDescendents); 4846 AddLocalPacketHandler(PacketType.InventoryDescendents, HandleInventoryDescendents);
4845 AddLocalPacketHandler(PacketType.DirPlacesQuery, HandleDirPlacesQuery); 4847 AddLocalPacketHandler(PacketType.DirPlacesQuery, HandleDirPlacesQuery);
@@ -9349,6 +9351,37 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9349 { 9351 {
9350 return true; 9352 return true;
9351 } 9353 }
9354
9355 private bool HandleCreateNewOutfitAttachments(IClientAPI sender, Packet Pack)
9356 {
9357 CreateNewOutfitAttachmentsPacket packet = (CreateNewOutfitAttachmentsPacket)Pack;
9358
9359 #region Packet Session and User Check
9360 if (m_checkPackets)
9361 {
9362 if (packet.AgentData.SessionID != SessionId ||
9363 packet.AgentData.AgentID != AgentId)
9364 return true;
9365 }
9366 #endregion
9367 MoveItemsAndLeaveCopy handlerMoveItemsAndLeaveCopy = null;
9368 List<InventoryItemBase> items = new List<InventoryItemBase>();
9369 foreach (CreateNewOutfitAttachmentsPacket.ObjectDataBlock n in packet.ObjectData)
9370 {
9371 InventoryItemBase b = new InventoryItemBase();
9372 b.ID = n.OldItemID;
9373 b.Folder = n.OldFolderID;
9374 items.Add(b);
9375 }
9376
9377 handlerMoveItemsAndLeaveCopy = OnMoveItemsAndLeaveCopy;
9378 if (handlerMoveItemsAndLeaveCopy != null)
9379 {
9380 handlerMoveItemsAndLeaveCopy(this, items, packet.HeaderData.NewFolderID);
9381 }
9382
9383 return true;
9384 }
9352 9385
9353 private bool HandleAgentHeightWidth(IClientAPI sender, Packet Pack) 9386 private bool HandleAgentHeightWidth(IClientAPI sender, Packet Pack)
9354 { 9387 {
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 4db8f9e..cdc56a2 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -79,7 +79,7 @@ namespace OpenSim.Region.Examples.SimpleModule
79 public event DisconnectUser OnDisconnectUser; 79 public event DisconnectUser OnDisconnectUser;
80 public event RequestAvatarProperties OnRequestAvatarProperties; 80 public event RequestAvatarProperties OnRequestAvatarProperties;
81 public event SetAlwaysRun OnSetAlwaysRun; 81 public event SetAlwaysRun OnSetAlwaysRun;
82 82 public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
83 public event DeRezObject OnDeRezObject; 83 public event DeRezObject OnDeRezObject;
84 public event Action<IClientAPI> OnRegionHandShakeReply; 84 public event Action<IClientAPI> OnRegionHandShakeReply;
85 public event GenericCall2 OnRequestWearables; 85 public event GenericCall2 OnRequestWearables;
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 59731f7..17159b4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -648,6 +648,8 @@ namespace OpenSim.Region.Framework.Scenes
648 return; 648 return;
649 } 649 }
650 650
651 if (newName == null) newName = item.Name;
652
651 AssetBase asset = AssetService.Get(item.AssetID.ToString()); 653 AssetBase asset = AssetService.Get(item.AssetID.ToString());
652 654
653 if (asset != null) 655 if (asset != null)
@@ -695,6 +697,24 @@ namespace OpenSim.Region.Framework.Scenes
695 } 697 }
696 698
697 /// <summary> 699 /// <summary>
700 /// Move an item within the agent's inventory, and leave a copy (used in making a new outfit)
701 /// </summary>
702 public void MoveInventoryItemsLeaveCopy(IClientAPI remoteClient, List<InventoryItemBase> items, UUID destfolder)
703 {
704 List<InventoryItemBase> moveitems = new List<InventoryItemBase>();
705 foreach (InventoryItemBase b in items)
706 {
707 CopyInventoryItem(remoteClient, 0, remoteClient.AgentId, b.ID, b.Folder, null);
708 InventoryItemBase n = InventoryService.GetItem(b);
709 n.Folder = destfolder;
710 moveitems.Add(n);
711 remoteClient.SendInventoryItemCreateUpdate(n, 0);
712 }
713
714 MoveInventoryItem(remoteClient, moveitems);
715 }
716
717 /// <summary>
698 /// Move an item within the agent's inventory. 718 /// Move an item within the agent's inventory.
699 /// </summary> 719 /// </summary>
700 /// <param name="remoteClient"></param> 720 /// <param name="remoteClient"></param>
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 644fbb0..ea52ffb 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2922,6 +2922,7 @@ namespace OpenSim.Region.Framework.Scenes
2922 client.OnFetchInventory += HandleFetchInventory; 2922 client.OnFetchInventory += HandleFetchInventory;
2923 client.OnUpdateInventoryItem += UpdateInventoryItemAsset; 2923 client.OnUpdateInventoryItem += UpdateInventoryItemAsset;
2924 client.OnCopyInventoryItem += CopyInventoryItem; 2924 client.OnCopyInventoryItem += CopyInventoryItem;
2925 client.OnMoveItemsAndLeaveCopy += MoveInventoryItemsLeaveCopy;
2925 client.OnMoveInventoryItem += MoveInventoryItem; 2926 client.OnMoveInventoryItem += MoveInventoryItem;
2926 client.OnRemoveInventoryItem += RemoveInventoryItem; 2927 client.OnRemoveInventoryItem += RemoveInventoryItem;
2927 client.OnRemoveInventoryFolder += RemoveInventoryFolder; 2928 client.OnRemoveInventoryFolder += RemoveInventoryFolder;
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
index c7a9484..91cbee9 100644
--- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
+++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs
@@ -815,6 +815,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
815 public event ObjectOwner OnObjectOwner; 815 public event ObjectOwner OnObjectOwner;
816 public event DirPlacesQuery OnDirPlacesQuery; 816 public event DirPlacesQuery OnDirPlacesQuery;
817 public event DirFindQuery OnDirFindQuery; 817 public event DirFindQuery OnDirFindQuery;
818 public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
818 public event DirLandQuery OnDirLandQuery; 819 public event DirLandQuery OnDirLandQuery;
819 public event DirPopularQuery OnDirPopularQuery; 820 public event DirPopularQuery OnDirPopularQuery;
820 public event DirClassifiedQuery OnDirClassifiedQuery; 821 public event DirClassifiedQuery OnDirClassifiedQuery;
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 23255fb..d6f4d53 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -156,7 +156,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
156#pragma warning disable 67 156#pragma warning disable 67
157 public event Action<IClientAPI> OnLogout; 157 public event Action<IClientAPI> OnLogout;
158 public event ObjectPermissions OnObjectPermissions; 158 public event ObjectPermissions OnObjectPermissions;
159 159 public event MoveItemsAndLeaveCopy OnMoveItemsAndLeaveCopy;
160 public event MoneyTransferRequest OnMoneyTransferRequest; 160 public event MoneyTransferRequest OnMoneyTransferRequest;
161 public event ParcelBuy OnParcelBuy; 161 public event ParcelBuy OnParcelBuy;
162 public event Action<IClientAPI> OnConnectionClosed; 162 public event Action<IClientAPI> OnConnectionClosed;