Enables support for UUIDs to be returned in lists from

modInvoke commands.

Thanks SignpostMarv!!!
0.7.4.1
Mic Bowman 2012-07-20 10:48:51 -07:00
parent 644fb6b013
commit a4281ca014
1 changed files with 13 additions and 3 deletions

View File

@ -200,24 +200,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
for (int i = 0; i < result.Length; i++)
{
if (result[i] is string)
{
llist[i] = new LSL_String((string)result[i]);
}
else if (result[i] is int)
{
llist[i] = new LSL_Integer((int)result[i]);
}
else if (result[i] is float)
{
llist[i] = new LSL_Float((float)result[i]);
}
else if (result[i] is UUID)
{
llist[i] = new LSL_Key(result[i].ToString());
}
else if (result[i] is OpenMetaverse.Vector3)
{
OpenMetaverse.Vector3 vresult = (OpenMetaverse.Vector3)result[i];
llist[i] = new LSL_Vector(vresult.X,vresult.Y,vresult.Z);
llist[i] = new LSL_Vector(vresult.X, vresult.Y, vresult.Z);
}
else if (result[i] is OpenMetaverse.Quaternion)
{
OpenMetaverse.Quaternion qresult = (OpenMetaverse.Quaternion)result[i];
llist[i] = new LSL_Rotation(qresult.X,qresult.Y,qresult.Z,qresult.W);
llist[i] = new LSL_Rotation(qresult.X, qresult.Y, qresult.Z, qresult.W);
}
else
{
MODError(String.Format("unknown list element returned by {0}",fname));
MODError(String.Format("unknown list element {1} returned by {0}", fname, result[i].GetType().Name));
}
}