2008-08-16 02:04:20 +00:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Net;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using OpenMetaverse;
|
|
|
|
|
using OpenMetaverse.Packets;
|
|
|
|
|
|
|
|
|
|
namespace Simian
|
|
|
|
|
{
|
2008-08-28 22:11:47 +00:00
|
|
|
public class Agent
|
2008-08-16 02:04:20 +00:00
|
|
|
{
|
2008-09-24 14:55:52 +00:00
|
|
|
// Account
|
2008-08-16 02:04:20 +00:00
|
|
|
public UUID AgentID;
|
2008-08-18 04:40:05 +00:00
|
|
|
public string FirstName;
|
|
|
|
|
public string LastName;
|
2008-09-24 14:55:52 +00:00
|
|
|
public string PasswordHash;
|
|
|
|
|
public uint CreationTime;
|
|
|
|
|
public uint LastLoginTime;
|
|
|
|
|
public string AccessLevel;
|
|
|
|
|
public int GodLevel;
|
2008-08-19 08:23:25 +00:00
|
|
|
public int Balance;
|
2008-09-24 14:55:52 +00:00
|
|
|
|
|
|
|
|
// Inventory
|
|
|
|
|
public UUID InventoryRoot;
|
|
|
|
|
public UUID InventoryLibraryRoot;
|
|
|
|
|
public UUID InventoryLibraryOwner;
|
|
|
|
|
|
|
|
|
|
// Location
|
|
|
|
|
public ulong HomeRegionHandle;
|
|
|
|
|
public Vector3 HomePosition;
|
|
|
|
|
public Vector3 HomeLookAt;
|
|
|
|
|
public ulong CurrentRegionHandle;
|
|
|
|
|
public Vector3 CurrentPosition;
|
|
|
|
|
public Vector3 CurrentLookAt;
|
|
|
|
|
|
|
|
|
|
// Profile
|
|
|
|
|
public UUID PartnerID;
|
|
|
|
|
public int ProfileCanDo;
|
|
|
|
|
public int ProfileWantDo;
|
|
|
|
|
public string ProfileAboutText;
|
|
|
|
|
public string ProfileFirstText;
|
2008-10-01 00:12:59 +00:00
|
|
|
public string ProfileBornOn;
|
|
|
|
|
public string ProfileURL;
|
2008-09-24 14:55:52 +00:00
|
|
|
public UUID ProfileImage;
|
|
|
|
|
public UUID ProfileFirstImage;
|
2008-10-01 00:12:59 +00:00
|
|
|
public ProfileFlags ProfileFlags;
|
2008-09-24 14:55:52 +00:00
|
|
|
|
|
|
|
|
// Appearance
|
|
|
|
|
public byte[] VisualParams;
|
2008-10-01 00:12:59 +00:00
|
|
|
//public byte[] Texture;
|
2008-09-24 14:55:52 +00:00
|
|
|
public float Height;
|
|
|
|
|
public UUID ShapeItem;
|
|
|
|
|
public UUID SkinItem;
|
|
|
|
|
public UUID HairItem;
|
|
|
|
|
public UUID EyesItem;
|
|
|
|
|
public UUID ShirtItem;
|
|
|
|
|
public UUID PantsItem;
|
|
|
|
|
public UUID ShoesItem;
|
|
|
|
|
public UUID SocksItem;
|
|
|
|
|
public UUID JacketItem;
|
|
|
|
|
public UUID GlovesItem;
|
|
|
|
|
public UUID UndershirtItem;
|
|
|
|
|
public UUID UnderpantsItem;
|
|
|
|
|
public UUID SkirtItem;
|
|
|
|
|
|
|
|
|
|
// Temporary
|
|
|
|
|
[NonSerialized]
|
|
|
|
|
public Avatar Avatar = new Avatar();
|
|
|
|
|
[NonSerialized]
|
|
|
|
|
public UUID SessionID;
|
|
|
|
|
[NonSerialized]
|
|
|
|
|
public UUID SecureSessionID;
|
|
|
|
|
[NonSerialized]
|
|
|
|
|
public uint CircuitCode;
|
|
|
|
|
[NonSerialized]
|
2008-08-20 03:46:11 +00:00
|
|
|
public bool Running;
|
2008-09-24 14:55:52 +00:00
|
|
|
[NonSerialized]
|
2008-08-24 22:42:14 +00:00
|
|
|
public int TickFall;
|
2008-09-24 14:55:52 +00:00
|
|
|
[NonSerialized]
|
2008-08-24 22:42:14 +00:00
|
|
|
public int TickJump;
|
2008-09-24 14:55:52 +00:00
|
|
|
[NonSerialized]
|
2008-08-30 18:23:15 +00:00
|
|
|
public int TickLastPacketReceived;
|
2008-09-24 14:55:52 +00:00
|
|
|
[NonSerialized]
|
2008-08-18 05:11:13 +00:00
|
|
|
public AgentManager.ControlFlags ControlFlags = AgentManager.ControlFlags.NONE;
|
2008-09-24 14:55:52 +00:00
|
|
|
[NonSerialized]
|
2008-08-22 19:20:02 +00:00
|
|
|
public AnimationSet Animations = new AnimationSet();
|
2008-08-21 05:14:16 +00:00
|
|
|
// TODO: Replace byte with enum
|
2008-09-24 14:55:52 +00:00
|
|
|
[NonSerialized]
|
2008-08-21 05:14:16 +00:00
|
|
|
public byte State;
|
2008-09-24 14:55:52 +00:00
|
|
|
[NonSerialized]
|
2008-08-24 05:06:51 +00:00
|
|
|
public PrimFlags Flags;
|
2008-09-24 14:55:52 +00:00
|
|
|
|
|
|
|
|
public string FullName
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
bool hasFirst = !String.IsNullOrEmpty(FirstName);
|
|
|
|
|
bool hasLast = !String.IsNullOrEmpty(LastName);
|
|
|
|
|
|
|
|
|
|
if (hasFirst && hasLast)
|
|
|
|
|
return String.Format("{0} {1}", FirstName, LastName);
|
|
|
|
|
else if (hasFirst)
|
|
|
|
|
return FirstName;
|
|
|
|
|
else if (hasLast)
|
|
|
|
|
return LastName;
|
|
|
|
|
else
|
|
|
|
|
return String.Empty;
|
|
|
|
|
}
|
|
|
|
|
}
|
2008-08-16 02:04:20 +00:00
|
|
|
}
|
|
|
|
|
}
|