a few changes on LlGetObjectDetails
parent
ab335b5926
commit
656ea163cc
|
@ -14511,19 +14511,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
ret.Add(new LSL_Integer(count));
|
||||
break;
|
||||
case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT:
|
||||
List<SceneObjectGroup> invAttachments = av.GetAttachments();
|
||||
int invcount = 0;
|
||||
if (Attachments == null)
|
||||
Attachments = av.GetAttachments();
|
||||
count = 0;
|
||||
try
|
||||
{
|
||||
foreach (SceneObjectGroup Attachment in invAttachments)
|
||||
foreach (SceneObjectGroup Attachment in Attachments)
|
||||
{
|
||||
SceneObjectPart[] parts = Attachment.Parts;
|
||||
int nparts = parts.Count();
|
||||
for(int i = 0; i < nparts; i++)
|
||||
invcount += parts[i].Inventory.Count;
|
||||
count += parts[i].Inventory.Count;
|
||||
}
|
||||
} catch { };
|
||||
ret.Add(new LSL_Integer(invcount));
|
||||
ret.Add(new LSL_Integer(count));
|
||||
break;
|
||||
case ScriptBaseClass.OBJECT_REZZER_KEY:
|
||||
ret.Add(new LSL_Key((string)id));
|
||||
|
@ -14534,14 +14535,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
case ScriptBaseClass.OBJECT_TEMP_ATTACHED:
|
||||
ret.Add(new LSL_Integer(0));
|
||||
break;
|
||||
case ScriptBaseClass.OBJECT_ATTACHED_SLOTS_AVAILABLE:
|
||||
if (Attachments == null)
|
||||
Attachments = av.GetAttachments();
|
||||
ret.Add(new LSL_Integer(38 - Attachments.Count));
|
||||
break;
|
||||
case ScriptBaseClass.OBJECT_CREATION_TIME:
|
||||
ret.Add(new LSL_String(""));
|
||||
break;
|
||||
case ScriptBaseClass.OBJECT_SELECT_COUNT:
|
||||
ret.Add(new LSL_String(""));
|
||||
ret.Add(new LSL_Integer(0));
|
||||
break;
|
||||
case ScriptBaseClass.OBJECT_SIT_COUNT:
|
||||
ret.Add(new LSL_String(""));
|
||||
ret.Add(new LSL_Integer(0));
|
||||
break;
|
||||
case ScriptBaseClass.OBJECT_ANIMATED_COUNT:
|
||||
count = 0;
|
||||
|
@ -14773,9 +14779,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
break;
|
||||
case ScriptBaseClass.OBJECT_TOTAL_INVENTORY_COUNT:
|
||||
SceneObjectPart[] parts = obj.ParentGroup.Parts;
|
||||
int nparts = parts.Count();
|
||||
count = 0;
|
||||
for(int i = 0; i < nparts; i++)
|
||||
for(int i = 0; i < parts.Count(); i++)
|
||||
count += parts[i].Inventory.Count;
|
||||
ret.Add(new LSL_Integer(count));
|
||||
break;
|
||||
|
@ -14795,6 +14800,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
ret.Add(new LSL_Integer(0));
|
||||
}
|
||||
break;
|
||||
case ScriptBaseClass.OBJECT_ATTACHED_SLOTS_AVAILABLE:
|
||||
ret.Add(new LSL_Integer(0));
|
||||
break;
|
||||
case ScriptBaseClass.OBJECT_CREATION_TIME:
|
||||
DateTime date = Util.ToDateTime(m_host.ParentGroup.RootPart.CreationDate);
|
||||
ret.Add(new LSL_String(date.ToString("yyyy-MM-ddTHH:mm:ssZ", CultureInfo.InvariantCulture)));
|
||||
|
|
Loading…
Reference in New Issue