aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2017-11-08 09:10:56 +0000
committerUbitUmarov2017-11-08 09:10:56 +0000
commitfcb8b2a3c319d2408014eeb11fd53015a71b5ff0 (patch)
treeda69019add63757764772a9e68c6eb0a88103f88 /OpenSim/Region/Framework
parentmantis 8263: recover the ignore of texture changes if only materialID changed... (diff)
downloadopensim-SC-fcb8b2a3c319d2408014eeb11fd53015a71b5ff0.zip
opensim-SC-fcb8b2a3c319d2408014eeb11fd53015a71b5ff0.tar.gz
opensim-SC-fcb8b2a3c319d2408014eeb11fd53015a71b5ff0.tar.bz2
opensim-SC-fcb8b2a3c319d2408014eeb11fd53015a71b5ff0.tar.xz
mantis 8260 fix script count on delete and remove redundantTriggerRemoveScript in 2 points
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs4
2 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index 057ca17..f29cdf4 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -1209,10 +1209,10 @@ namespace OpenSim.Region.Framework.Scenes
1209 1209
1210 if (group.GetInventoryItem(localID, itemID) != null) 1210 if (group.GetInventoryItem(localID, itemID) != null)
1211 { 1211 {
1212 if (item.Type == 10) 1212 if (item.Type == (int)InventoryType.LSL)
1213 { 1213 {
1214 part.RemoveScriptEvents(itemID); 1214 part.RemoveScriptEvents(itemID);
1215 EventManager.TriggerRemoveScript(localID, itemID); 1215 part.ParentGroup.AddActiveScriptCount(-1);
1216 } 1216 }
1217 1217
1218 group.RemoveInventoryItem(localID, itemID); 1218 group.RemoveInventoryItem(localID, itemID);
@@ -1317,7 +1317,7 @@ namespace OpenSim.Region.Framework.Scenes
1317 if (taskItem.Type == (int)AssetType.LSLText) 1317 if (taskItem.Type == (int)AssetType.LSLText)
1318 { 1318 {
1319 part.RemoveScriptEvents(itemId); 1319 part.RemoveScriptEvents(itemId);
1320 EventManager.TriggerRemoveScript(part.LocalId, itemId); 1320 part.ParentGroup.AddActiveScriptCount(-1);
1321 } 1321 }
1322 1322
1323 part.Inventory.RemoveInventoryItem(itemId); 1323 part.Inventory.RemoveInventoryItem(itemId);
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
index 3fd6e13..de9d986 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
@@ -1081,7 +1081,7 @@ namespace OpenSim.Region.Framework.Scenes
1081 { 1081 {
1082 int type = m_items[itemID].InvType; 1082 int type = m_items[itemID].InvType;
1083 m_items.LockItemsForRead(false); 1083 m_items.LockItemsForRead(false);
1084 if (type == 10) // Script 1084 if (type == (int)InventoryType.LSL) // Script
1085 { 1085 {
1086 m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemID); 1086 m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemID);
1087 } 1087 }
@@ -1101,7 +1101,7 @@ namespace OpenSim.Region.Framework.Scenes
1101 m_items.LockItemsForRead(true); 1101 m_items.LockItemsForRead(true);
1102 foreach (TaskInventoryItem item in m_items.Values) 1102 foreach (TaskInventoryItem item in m_items.Values)
1103 { 1103 {
1104 if (item.Type == 10) 1104 if (item.Type == (int)InventoryType.LSL)
1105 { 1105 {
1106 scriptcount++; 1106 scriptcount++;
1107 } 1107 }