mantis 8260 fix script count on delete and remove redundantTriggerRemoveScript in 2 points

0.9.0.1-postfixes
UbitUmarov 2017-11-08 09:10:56 +00:00
parent 8eb9bc8b19
commit fcb8b2a3c3
2 changed files with 5 additions and 5 deletions

View File

@ -1209,10 +1209,10 @@ namespace OpenSim.Region.Framework.Scenes
if (group.GetInventoryItem(localID, itemID) != null)
{
if (item.Type == 10)
if (item.Type == (int)InventoryType.LSL)
{
part.RemoveScriptEvents(itemID);
EventManager.TriggerRemoveScript(localID, itemID);
part.ParentGroup.AddActiveScriptCount(-1);
}
group.RemoveInventoryItem(localID, itemID);
@ -1317,7 +1317,7 @@ namespace OpenSim.Region.Framework.Scenes
if (taskItem.Type == (int)AssetType.LSLText)
{
part.RemoveScriptEvents(itemId);
EventManager.TriggerRemoveScript(part.LocalId, itemId);
part.ParentGroup.AddActiveScriptCount(-1);
}
part.Inventory.RemoveInventoryItem(itemId);

View File

@ -1081,7 +1081,7 @@ namespace OpenSim.Region.Framework.Scenes
{
int type = m_items[itemID].InvType;
m_items.LockItemsForRead(false);
if (type == 10) // Script
if (type == (int)InventoryType.LSL) // Script
{
m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemID);
}
@ -1101,7 +1101,7 @@ namespace OpenSim.Region.Framework.Scenes
m_items.LockItemsForRead(true);
foreach (TaskInventoryItem item in m_items.Values)
{
if (item.Type == 10)
if (item.Type == (int)InventoryType.LSL)
{
scriptcount++;
}