minor: use constants instead of magic numbers in llRequestAgentData() where possible
parent
de0ab04d00
commit
7c148d9b2f
|
@ -4283,27 +4283,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
switch (data)
|
switch (data)
|
||||||
{
|
{
|
||||||
case 1: // DATA_ONLINE (0|1)
|
case ScriptBaseClass.DATA_ONLINE:
|
||||||
if (pinfo != null && pinfo.RegionID != UUID.Zero)
|
if (pinfo != null && pinfo.RegionID != UUID.Zero)
|
||||||
reply = "1";
|
reply = "1";
|
||||||
else
|
else
|
||||||
reply = "0";
|
reply = "0";
|
||||||
break;
|
break;
|
||||||
case 2: // DATA_NAME (First Last)
|
case ScriptBaseClass.DATA_NAME: // (First Last)
|
||||||
reply = account.FirstName + " " + account.LastName;
|
reply = account.FirstName + " " + account.LastName;
|
||||||
break;
|
break;
|
||||||
case 3: // DATA_BORN (YYYY-MM-DD)
|
case ScriptBaseClass.DATA_BORN: // (YYYY-MM-DD)
|
||||||
DateTime born = new DateTime(1970, 1, 1, 0, 0, 0, 0);
|
DateTime born = new DateTime(1970, 1, 1, 0, 0, 0, 0);
|
||||||
born = born.AddSeconds(account.Created);
|
born = born.AddSeconds(account.Created);
|
||||||
reply = born.ToString("yyyy-MM-dd");
|
reply = born.ToString("yyyy-MM-dd");
|
||||||
break;
|
break;
|
||||||
case 4: // DATA_RATING (0,0,0,0,0,0)
|
case ScriptBaseClass.DATA_RATING: // (0,0,0,0,0,0)
|
||||||
reply = "0,0,0,0,0,0";
|
reply = "0,0,0,0,0,0";
|
||||||
break;
|
break;
|
||||||
case 7: // DATA_USERLEVEL (integer)
|
case 7: // DATA_USERLEVEL (integer). This is not available in LL and so has no constant.
|
||||||
reply = account.UserLevel.ToString();
|
reply = account.UserLevel.ToString();
|
||||||
break;
|
break;
|
||||||
case 8: // DATA_PAYINFO (0|1|2|3)
|
case ScriptBaseClass.DATA_PAYINFO: // (0|1|2|3)
|
||||||
reply = "0";
|
reply = "0";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue