From 78c0028179923710949fea349baad2e6bebc49bd Mon Sep 17 00:00:00 2001 From: Talun Date: Mon, 9 Apr 2012 19:58:07 +0100 Subject: Mantis5502 implementation of some of the new constants Signed-off-by: Melanie --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a21c66f..8863df1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3418,6 +3418,44 @@ namespace OpenSim.Region.Framework.Scenes return m_attachments.Count > 0; } + /// + /// Returns the total count of scripts in all parts inventories. + /// + public int ScriptCount() + { + int count = 0; + lock (m_attachments) + { + foreach (SceneObjectGroup gobj in m_attachments) + { + if (gobj != null) + { + count += gobj.ScriptCount(); + } + } + } + return count; + } + + /// + /// Returns the total count of running scripts in all parts. + /// + public int RunningScriptCount() + { + int count = 0; + lock (m_attachments) + { + foreach (SceneObjectGroup gobj in m_attachments) + { + if (gobj != null) + { + count += gobj.RunningScriptCount(); + } + } + } + return count; + } + public bool HasScriptedAttachments() { lock (m_attachments) -- cgit v1.1