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.cs56
1 files changed, 15 insertions, 41 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index f3673fc..bfde643 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -559,57 +559,31 @@ namespace OpenSim.Region.Environment.Scenes
559 InventoryItemBase item = userInfo.RootFolder.HasItem(itemID); 559 InventoryItemBase item = userInfo.RootFolder.HasItem(itemID);
560 if (item != null) 560 if (item != null)
561 { 561 {
562 bool isTexture = false; 562 SceneObjectGroup group = GetGroupByPrim(localID);
563 bool rezzed = false; 563 if (group != null)
564 if (item.invType == 0)
565 { 564 {
566 isTexture = true; 565 // TODO: do we care about the value of this bool?
567 } 566 group.AddInventoryItem(remoteClient, localID, item, copyID);
568 567 group.StartScript(localID, copyID);
569 AssetBase rezAsset = AssetCache.GetAsset(item.assetID, isTexture); 568 group.GetProperites(remoteClient);
570
571 if (rezAsset != null)
572 {
573 string script = Helpers.FieldToUTF8String(rezAsset.Data);
574 EventManager.TriggerRezScript(localID, copyID, script);
575 rezzed = true;
576 }
577 569
578 if (rezzed) 570 MainLog.Instance.Verbose(
579 { 571 "PRIMINVENTORY",
580 SceneObjectGroup group = GetGroupByPrim(localID); 572 "Rezzed script {0} into prim local ID {1} for user {2}",
581 if (group != null) 573 item.inventoryName, localID, remoteClient.Name);
582 {
583 // TODO: do we care about the value of this bool?
584 group.AddInventoryItem(remoteClient, localID, item, copyID);
585 group.GetProperites(remoteClient);
586
587 MainLog.Instance.Verbose(
588 "PRIMINVENTORY",
589 "Rezzed script {0} (asset {1}) into prim {2} for user {3}",
590 item.inventoryName, rezAsset.FullID, localID, remoteClient.Name);
591 }
592 else
593 {
594 MainLog.Instance.Warn(
595 "PRIMINVENTORY",
596 "Could not rez script {0} into prim {1} for user {2}"
597 + " because the prim could not be found in the region!",
598 item.inventoryName, localID, remoteClient.Name);
599 }
600 } 574 }
601 else 575 else
602 { 576 {
603 MainLog.Instance.Warn( 577 MainLog.Instance.Error(
604 "PRIMINVENTORY", 578 "PRIMINVENTORY",
605 "Could not rez script {0} into prim {1} for user {2}" 579 "Could not rez script {0} into prim local ID {1} for user {2}"
606 + " because the item asset {3} could not be found!", 580 + " because the prim could not be found in the region!",
607 item.inventoryName, localID, item.assetID, remoteClient.Name); 581 item.inventoryName, localID, remoteClient.Name);
608 } 582 }
609 } 583 }
610 else 584 else
611 { 585 {
612 MainLog.Instance.Warn( 586 MainLog.Instance.Error(
613 "PRIMINVENTORY", "Could not find script inventory item {0} to rez for {1}!", 587 "PRIMINVENTORY", "Could not find script inventory item {0} to rez for {1}!",
614 itemID, remoteClient.Name); 588 itemID, remoteClient.Name);
615 } 589 }