aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs14
1 files changed, 6 insertions, 8 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 4458a4d..4b30a80 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -233,6 +233,7 @@ namespace OpenSim.Region.Environment.Scenes
233 public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID) 233 public void RezScript(IClientAPI remoteClient, LLUUID itemID, uint localID)
234 { 234 {
235 CachedUserInfo userInfo = commsManager.UserProfiles.GetUserDetails(remoteClient.AgentId); 235 CachedUserInfo userInfo = commsManager.UserProfiles.GetUserDetails(remoteClient.AgentId);
236 LLUUID copyID = LLUUID.Random();
236 if (userInfo != null) 237 if (userInfo != null)
237 { 238 {
238 if (userInfo.RootFolder != null) 239 if (userInfo.RootFolder != null)
@@ -251,7 +252,7 @@ namespace OpenSim.Region.Environment.Scenes
251 { 252 {
252 string script = Util.FieldToString(rezAsset.Data); 253 string script = Util.FieldToString(rezAsset.Data);
253 //Console.WriteLine("rez script "+script); 254 //Console.WriteLine("rez script "+script);
254 this.EventManager.TriggerRezScript(localID, itemID, script); 255 this.EventManager.TriggerRezScript(localID, copyID, script);
255 rezzed = true; 256 rezzed = true;
256 } 257 }
257 else 258 else
@@ -262,7 +263,7 @@ namespace OpenSim.Region.Environment.Scenes
262 { 263 {
263 string script = Util.FieldToString(rezAsset.Data); 264 string script = Util.FieldToString(rezAsset.Data);
264 // Console.WriteLine("rez script " + script); 265 // Console.WriteLine("rez script " + script);
265 this.EventManager.TriggerRezScript(localID, itemID, script); 266 this.EventManager.TriggerRezScript(localID, copyID, script);
266 rezzed = true; 267 rezzed = true;
267 } 268 }
268 } 269 }
@@ -277,13 +278,10 @@ namespace OpenSim.Region.Environment.Scenes
277 hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID); 278 hasPrim = ((SceneObjectGroup)ent).HasChildPrim(localID);
278 if (hasPrim != false) 279 if (hasPrim != false)
279 { 280 {
280 bool added = ((SceneObjectGroup)ent).AddInventoryItem(remoteClient, localID, item); 281
282 bool added = ((SceneObjectGroup)ent).AddInventoryItem(remoteClient, localID, item, copyID);
281 ((SceneObjectGroup)ent).GetProperites(remoteClient); 283 ((SceneObjectGroup)ent).GetProperites(remoteClient);
282 if (added) 284
283 {
284 userInfo.DeleteItem(remoteClient.AgentId, item);
285 remoteClient.SendRemoveInventoryItem(itemID);
286 }
287 } 285 }
288 } 286 }
289 } 287 }