diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 47cb2fd..8d4dc56 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | |||
@@ -366,15 +366,29 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
366 | 366 | ||
367 | #region Internal functions to keep track of script | 367 | #region Internal functions to keep track of script |
368 | 368 | ||
369 | public Dictionary<UUID, IScript>.KeyCollection GetScriptKeys(uint localID) | 369 | public List<UUID> GetScriptKeys(uint localID) |
370 | { | 370 | { |
371 | if (localID == 0) // Find it | ||
372 | { | ||
373 | List<UUID> keylist = new List<UUID>(); | ||
374 | |||
375 | foreach (Dictionary<UUID, IScript> d in Scripts.Values) | ||
376 | { | ||
377 | foreach (UUID id in d.Keys) | ||
378 | { | ||
379 | if (!keylist.Contains(id)) | ||
380 | keylist.Add(id); | ||
381 | } | ||
382 | } | ||
383 | } | ||
384 | |||
371 | if (Scripts.ContainsKey(localID) == false) | 385 | if (Scripts.ContainsKey(localID) == false) |
372 | return null; | 386 | return null; |
373 | 387 | ||
374 | Dictionary<UUID, IScript> Obj; | 388 | Dictionary<UUID, IScript> Obj; |
375 | Scripts.TryGetValue(localID, out Obj); | 389 | Scripts.TryGetValue(localID, out Obj); |
376 | 390 | ||
377 | return Obj.Keys; | 391 | return new List<UUID>(Obj.Keys); |
378 | } | 392 | } |
379 | 393 | ||
380 | public IScript GetScript(uint localID, UUID itemID) | 394 | public IScript GetScript(uint localID, UUID itemID) |