mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
mantis 8260 fix script count on delete and remove redundantTriggerRemoveScript in 2 points
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user