change last patch a bit
parent
0bb959d8fd
commit
9dd820765e
|
@ -13765,23 +13765,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
ret.Add(new LSL_Vector(Vector3.Zero));
|
ret.Add(new LSL_Vector(Vector3.Zero));
|
||||||
break;
|
break;
|
||||||
case ScriptBaseClass.OBJECT_PRIM_COUNT:
|
case ScriptBaseClass.OBJECT_PRIM_COUNT:
|
||||||
LSL_List AttachmentsPrimList = new LSL_List();
|
List<SceneObjectGroup> Attachments = av.GetAttachments();
|
||||||
List<SceneObjectGroup> Attachments;
|
int count = 0;
|
||||||
Attachments = av.GetAttachments();
|
try
|
||||||
foreach (SceneObjectGroup Attachment in Attachments)
|
{
|
||||||
AttachmentsPrimList.Add(new LSL_Integer(Attachment.PrimCount));
|
foreach (SceneObjectGroup Attachment in Attachments)
|
||||||
ret.Add(new LSL_Integer(AttachmentsPrimList.Sum()));
|
count += Attachment.PrimCount;
|
||||||
|
} catch { };
|
||||||
|
ret.Add(new LSL_Integer(count));
|
||||||
break;
|
break;
|
||||||
case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT:
|
case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT:
|
||||||
LSL_List AttachmentsPrimsInventoryList = new LSL_List();
|
List<SceneObjectGroup> invAttachments = av.GetAttachments();
|
||||||
foreach (SceneObjectGroup Attachment in av.GetAttachments())
|
int invcount = 0;
|
||||||
|
try
|
||||||
{
|
{
|
||||||
Attachment.ForEachPart(delegate(SceneObjectPart part)
|
foreach (SceneObjectGroup Attachment in invAttachments)
|
||||||
{
|
{
|
||||||
AttachmentsPrimsInventoryList.Add(new LSL_Integer(part.Inventory.Count));
|
SceneObjectPart[] parts = Attachment.Parts;
|
||||||
});
|
int nparts = parts.Count();
|
||||||
}
|
for(int i = 0; i < nparts; i++)
|
||||||
ret.Add(new LSL_Integer(AttachmentsPrimsInventoryList.Sum()));
|
invcount += parts[i].Inventory.Count;
|
||||||
|
}
|
||||||
|
} catch { };
|
||||||
|
ret.Add(new LSL_Integer(invcount));
|
||||||
break;
|
break;
|
||||||
case ScriptBaseClass.OBJECT_GROUP_TAG:
|
case ScriptBaseClass.OBJECT_GROUP_TAG:
|
||||||
ret.Add(new LSL_String(av.Grouptitle));
|
ret.Add(new LSL_String(av.Grouptitle));
|
||||||
|
@ -13968,12 +13974,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
ret.Add(new LSL_Integer(obj.ParentGroup.PrimCount));
|
ret.Add(new LSL_Integer(obj.ParentGroup.PrimCount));
|
||||||
break;
|
break;
|
||||||
case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT:
|
case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT:
|
||||||
LSL_List ObjectPrimsInventoryList = new LSL_List();
|
SceneObjectPart[] parts = obj.ParentGroup.Parts;
|
||||||
obj.ParentGroup.ForEachPart(delegate(SceneObjectPart part)
|
int nparts = parts.Count();
|
||||||
{
|
int count = 0;
|
||||||
ObjectPrimsInventoryList.Add(new LSL_Integer(part.Inventory.Count));
|
for(int i = 0; i < nparts; i++)
|
||||||
});
|
count += parts[i].Inventory.Count;
|
||||||
ret.Add(ObjectPrimsInventoryList.Sum());
|
ret.Add(new LSL_Integer(count));
|
||||||
break;
|
break;
|
||||||
case ScriptBaseClass.OBJECT_GROUP_TAG:
|
case ScriptBaseClass.OBJECT_GROUP_TAG:
|
||||||
ret.Add(new LSL_String(String.Empty));
|
ret.Add(new LSL_String(String.Empty));
|
||||||
|
|
Loading…
Reference in New Issue