Code:
public Entity(string Name)
: base(8 + 160 +
Name.Length)
{
WORD((ushort)(ToArray().Length - 8), 0);
WORD(10014, 2);
Packet[71] = 1;
this.Name = Name;
}
#region Accessors
public string Mate
{
get { return this.mate; }
set
{
Update(StringPacket.Spouse, value, false);
UpdateDatabase("mate", value);
this.mate = value;
}
}
public byte Class
{
get { return this.m_Proffesion; }
set {
Update(UpdatePacket.Class, value, false);
UpdateDatabase("profession", value);
this.m_Proffesion = value;
}
}
public byte Metempsychosis
{
get { return this.m_metompsychosis; }
set {
Update(UpdatePacket.Reborn, value, false);
UpdateDatabase("metempsychosis", value);
this.m_metompsychosis = value;
}
}
public ushort AdditionalPoints
{
get { return this.m_rbpoints; }
set {
Update(UpdatePacket.OtherBonus, value, false);
UpdateDatabase("additional_point", value);
this.m_rbpoints = value;
}
}
public ushort Strength
{
get { return this.m_str; }
set
{
UpdateDatabase("strength", value);
Update(UpdatePacket.Strength, value, false);
this.m_str = value;
}
}
public ushort Vitality
{
get { return this.m_vit; }
set
{
UpdateDatabase("health", value);
Update(UpdatePacket.Vitality, value, false);
this.m_vit = value;
}
}
public ushort Mana
{
get { return this.m_Mana; }
set
{
this.m_Mana = value;
Update(UpdatePacket.Mana, value, false);
UpdateDatabase("mana", value);
}
}
public uint PKPoints
{
get { return this.m_pk; }
set
{
this.m_pk = (ushort)value;
Update(UpdatePacket.PKPoints, value, false);
UpdateDatabase("pk", value);
}
}
public ulong Exp
{
get { return this.m_exp; }
set
{
this.m_exp = value;
UpdateDatabase("experience", value);
Update(UpdatePacket.Experience, value, false);
}
}
public ushort Agility
{
get { return this.m_agi; }
set
{
UpdateDatabase("Speed", value);
Update(UpdatePacket.Agility, value, false);
this.m_agi = value;
}
}
public ushort Spirit
{
get { return this.m_spi; }
set
{
UpdateDatabase("soul", value);
Update(UpdatePacket.Spirit, value, false);
this.m_spi = value;
}
}
public uint Money
{
get { return this.m_Money; }
set
{
this.m_Money = value;
UpdateDatabase("money", value);
Update(UpdatePacket.Money, value, false);
}
}
public uint ConquerPoints
{
get { return this.m_CPs; }
set
{
this.m_CPs = value;
UpdateDatabase("emoney", value);
Update(UpdatePacket.ConquerPoints, value, false);
}
}
public RecognizitionType Flag
{
get { return this.m_Flag; }
set { this.m_Flag = value; }
}
public ushort Defence
{
get { return this.m_Defence; }
set { this.m_Defence = value; }
}
public uint MinimumAttack
{
get { return this.m_MinimumAttack; }
set { this.m_MinimumAttack = value; }
}
public uint MaximumAttack
{
get { return this.m_MaximumAttack; }
set { this.m_MaximumAttack = value; }
}
public ushort MapID
{
get { return this.m_Map; }
set { UpdateDatabase("recordmap_id", value); this.m_Map = value; }
}
public ushort MagicalDefense
{
get { return this.m_MagicalDefense; }
set { this.m_MagicalDefense = value; }
}
public object Owner
{
get { return this.m_Owner; }
set {
this.Equipment = new Equipment(value as SocketClient);
this.Inventory = new Inventory(value as SocketClient);
this.m_Owner = value; }
}
public uint Mesh
{
get { return BitConverter.ToUInt32(Packet, 4); }
set { Update(UpdatePacket.Mesh, value, true); DWORD32(value, 4); }
}
public uint UID
{
get { return BitConverter.ToUInt32(Packet, 8); }
set {
this.m_UID = value;
DWORD32(value, 8); }
}
public ulong StatusFlag
{
get { return BitConverter.ToUInt64(Packet, 24); }
set { Update(UpdatePacket.StatusFlag, value, true); DWORD(value, 24); }
}
public uint HitPoints
{
get { return this.m_HitPoints; }
set
{
this.m_HitPoints = value;
UpdateDatabase("life", value);
Update(UpdatePacket.Hitpoints, value, false);
WORD((ushort)value, 58);
}
}
public uint MaximumHitPoint
{
get { return this.m_MaximumHitPoints; }
set { Update(UpdatePacket.MaxHitpoints, value, false);
this.m_MaximumHitPoints = value; }
}
public ConquerAngle Facing
{
get { return (ConquerAngle)Packet[62]; }
set { Packet[68] = (byte)value; }
}
public ConquerAction Action
{
get { return (ConquerAction)Packet[63]; }
set { Packet[69] = (byte)value; }
}
public ushort HairStyle
{
get { return BitConverter.ToUInt16(Packet, 62); }
set { UpdateDatabase("hair", value);
Update(UpdatePacket.HairStyle, value, true);
WORD(value, 62); }
}
public ushort X
{
get { return this.m_X; }
set
{
this.m_X = value;
UpdateDatabase("recordx", value);
WORD(value, 64);
}
}
public ushort Y
{
get { return this.m_Y; }
set
{
this.m_Y = value;
UpdateDatabase("recordy", value);
WORD(value, 66);
}
}
public ushort PreviousMapID
{
get { return this.m_previousmapid; }
set { this.m_previousmapid = value; }
}
public uint HeavenBlessing
{
get { return this.m_HBless; }
set
{
uint oldVal = HeavenBlessing;
this.m_HBless = value;
if (Online)
{
if (value > 0)
{
AddFlag(ExodusBinaries.UpdatePacket.Flags.HeavenBlessing);
Update(ExodusBinaries.UpdatePacket.HeavensBlessing, HeavenBlessing, false);
Update(ExodusBinaries.StringPacket.Effect, "bless", true);
}
}
}
}
public uint LastLogout
{
get { return this.m_LastLogout; }
set { this.m_LastLogout = value; }
}
public ushort AutoExercise
{
get { return this.m_AutoExer; }
set
{
this.m_AutoExer = value;
}
}
public byte Away
{
get { return Packet[102]; }
set
{
Packet[102] = value;
}
}
public byte Level
{
get { return this.m_Level; }
set
{
this.m_Level = value;
Update(UpdatePacket.Level, value, false);
UpdateDatabase("level", value);
Packet[75] = value;
}
}
public uint QuizPoints
{
get { return BitConverter.ToUInt32(Packet, 104); }
set { Update(UpdatePacket.QuizPoints, value, false);
DWORD32(value, 104); }
}
public byte StringCount
{
get { return Packet[155]; }
set { WORD(value, 155); }
}
public string Name
{
get { return Encoding.ASCII.GetString(ToArray(), 157, ToArray()[156]); }
set
{
Packet[156] = (byte)value.Length;
Byte(value, 157, Packet);
}
}