diff options
author | UbitUmarov | 2016-11-28 05:58:05 +0000 |
---|---|---|
committer | UbitUmarov | 2016-11-28 05:58:05 +0000 |
commit | 9dd820765eaa51d7583abcf493e203f575036d5f (patch) | |
tree | 3e4b76d771df44704336441e1491c584d832ba95 /OpenSim/Region/ScriptEngine | |
parent | The implementation of new flags = parameters for llGetObjectDetails - Part II... (diff) | |
download | opensim-SC_OLD-9dd820765eaa51d7583abcf493e203f575036d5f.zip opensim-SC_OLD-9dd820765eaa51d7583abcf493e203f575036d5f.tar.gz opensim-SC_OLD-9dd820765eaa51d7583abcf493e203f575036d5f.tar.bz2 opensim-SC_OLD-9dd820765eaa51d7583abcf493e203f575036d5f.tar.xz |
change last patch a bit
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index d90d5dd..80bb461 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -13765,23 +13765,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13765 | ret.Add(new LSL_Vector(Vector3.Zero)); | 13765 | ret.Add(new LSL_Vector(Vector3.Zero)); |
13766 | break; | 13766 | break; |
13767 | case ScriptBaseClass.OBJECT_PRIM_COUNT: | 13767 | case ScriptBaseClass.OBJECT_PRIM_COUNT: |
13768 | LSL_List AttachmentsPrimList = new LSL_List(); | 13768 | List<SceneObjectGroup> Attachments = av.GetAttachments(); |
13769 | List<SceneObjectGroup> Attachments; | 13769 | int count = 0; |
13770 | Attachments = av.GetAttachments(); | 13770 | try |
13771 | foreach (SceneObjectGroup Attachment in Attachments) | 13771 | { |
13772 | AttachmentsPrimList.Add(new LSL_Integer(Attachment.PrimCount)); | 13772 | foreach (SceneObjectGroup Attachment in Attachments) |
13773 | ret.Add(new LSL_Integer(AttachmentsPrimList.Sum())); | 13773 | count += Attachment.PrimCount; |
13774 | } catch { }; | ||
13775 | ret.Add(new LSL_Integer(count)); | ||
13774 | break; | 13776 | break; |
13775 | case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT: | 13777 | case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT: |
13776 | LSL_List AttachmentsPrimsInventoryList = new LSL_List(); | 13778 | List<SceneObjectGroup> invAttachments = av.GetAttachments(); |
13777 | foreach (SceneObjectGroup Attachment in av.GetAttachments()) | 13779 | int invcount = 0; |
13780 | try | ||
13778 | { | 13781 | { |
13779 | Attachment.ForEachPart(delegate(SceneObjectPart part) | 13782 | foreach (SceneObjectGroup Attachment in invAttachments) |
13780 | { | 13783 | { |
13781 | AttachmentsPrimsInventoryList.Add(new LSL_Integer(part.Inventory.Count)); | 13784 | SceneObjectPart[] parts = Attachment.Parts; |
13782 | }); | 13785 | int nparts = parts.Count(); |
13783 | } | 13786 | for(int i = 0; i < nparts; i++) |
13784 | ret.Add(new LSL_Integer(AttachmentsPrimsInventoryList.Sum())); | 13787 | invcount += parts[i].Inventory.Count; |
13788 | } | ||
13789 | } catch { }; | ||
13790 | ret.Add(new LSL_Integer(invcount)); | ||
13785 | break; | 13791 | break; |
13786 | case ScriptBaseClass.OBJECT_GROUP_TAG: | 13792 | case ScriptBaseClass.OBJECT_GROUP_TAG: |
13787 | ret.Add(new LSL_String(av.Grouptitle)); | 13793 | ret.Add(new LSL_String(av.Grouptitle)); |
@@ -13968,12 +13974,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13968 | ret.Add(new LSL_Integer(obj.ParentGroup.PrimCount)); | 13974 | ret.Add(new LSL_Integer(obj.ParentGroup.PrimCount)); |
13969 | break; | 13975 | break; |
13970 | case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT: | 13976 | case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT: |
13971 | LSL_List ObjectPrimsInventoryList = new LSL_List(); | 13977 | SceneObjectPart[] parts = obj.ParentGroup.Parts; |
13972 | obj.ParentGroup.ForEachPart(delegate(SceneObjectPart part) | 13978 | int nparts = parts.Count(); |
13973 | { | 13979 | int count = 0; |
13974 | ObjectPrimsInventoryList.Add(new LSL_Integer(part.Inventory.Count)); | 13980 | for(int i = 0; i < nparts; i++) |
13975 | }); | 13981 | count += parts[i].Inventory.Count; |
13976 | ret.Add(ObjectPrimsInventoryList.Sum()); | 13982 | ret.Add(new LSL_Integer(count)); |
13977 | break; | 13983 | break; |
13978 | case ScriptBaseClass.OBJECT_GROUP_TAG: | 13984 | case ScriptBaseClass.OBJECT_GROUP_TAG: |
13979 | ret.Add(new LSL_String(String.Empty)); | 13985 | ret.Add(new LSL_String(String.Empty)); |