public override void Deserialize(IDataReader reader) { base.Deserialize(reader); m_status = ProtocolTypeManager.GetInstance <PlayerStatus>((short)reader.ReadUShort()); m_status.Deserialize(reader); int companionsCount = reader.ReadUShort(); int companionsIndex; m_companions = new System.Collections.Generic.List <PartyCompanionMemberInformations>(); for (companionsIndex = 0; (companionsIndex < companionsCount); companionsIndex = (companionsIndex + 1)) { PartyCompanionMemberInformations objectToAdd = new PartyCompanionMemberInformations(); objectToAdd.Deserialize(reader); m_companions.Add(objectToAdd); } m_lifePoints = reader.ReadVarUhInt(); m_maxLifePoints = reader.ReadVarUhInt(); m_prospecting = reader.ReadVarUhShort(); m_regenRate = reader.ReadSByte(); m_initiative = reader.ReadVarUhShort(); m_alignmentSide = reader.ReadByte(); m_worldX = reader.ReadShort(); m_worldY = reader.ReadShort(); m_mapId = reader.ReadInt(); m_subAreaId = reader.ReadVarUhShort(); }
public override void Deserialize(IDataReader reader) { base.Deserialize(reader); LifePoints = reader.ReadVarUhInt(); MaxLifePoints = reader.ReadVarUhInt(); Prospecting = reader.ReadVarUhShort(); RegenRate = reader.ReadByte(); Initiative = reader.ReadVarUhShort(); AlignmentSide = reader.ReadSByte(); WorldX = reader.ReadShort(); WorldY = reader.ReadShort(); MapId = reader.ReadInt(); SubAreaId = reader.ReadVarUhShort(); Status = ProtocolTypeManager.GetInstance <PlayerStatus>(reader.ReadUShort()); Status.Deserialize(reader); var companionsCount = reader.ReadUShort(); Companions = new List <PartyCompanionMemberInformations>(); for (var companionsIndex = 0; companionsIndex < companionsCount; companionsIndex++) { var objectToAdd = new PartyCompanionMemberInformations(); objectToAdd.Deserialize(reader); Companions.Add(objectToAdd); } }
public PartyGuestInformations GetPartyGuestInformations() { var c = this.Character; PartyCompanionMemberInformations[] memberInformationsArray = new PartyCompanionMemberInformations[0]; return(new PartyGuestInformations(c.Id, this.Party.Id, c.Record.Name, c.Look.ToEntityLook(), c.Record.Breed, c.Record.Sex, new PlayerStatus((sbyte)0), (IEnumerable <PartyCompanionMemberInformations>)memberInformationsArray)); }
public PartyInvitationMemberInformations GetPartyInvitationMemberInformations() { CharacterRecord record = this.Character.Record; StatsRecord stats = this.Character.StatsRecord; BasicStats current = this.Character.CurrentStats; int id = record.Id; int level = (int)record.Level; string name = record.Name; EntityLook entityLook = this.Character.Look.ToEntityLook(); int breed = (int)(sbyte)record.Breed; bool sex = record.Sex; int mapid = (int)(short)record.MapId; PartyCompanionMemberInformations[] memberInformationsArray = new PartyCompanionMemberInformations[0]; return(new PartyInvitationMemberInformations((uint)id, (byte)level, name, entityLook, (sbyte)breed, sex, (short)this.Character.Map.Position.x, (short)this.Character.Map.Position.y, this.Character.Map.Id, (ushort)this.Character.SubAreaId, memberInformationsArray)); }
public PartyMemberInformations GetPartyMemberInformations() { CharacterRecord record = this.Character.Record; StatsRecord stats = this.Character.StatsRecord; BasicStats current = this.Character.CurrentStats; int id = record.Id; int level = (int)record.Level; string name = record.Name; EntityLook entityLook = this.Character.Look.ToEntityLook(); int breed = (int)(sbyte)record.Breed; bool sex = record.Sex; int hp = (int)this.Character.CurrentStats.LifePoints; int maxhp = stats.LifePoints; int regen = (int)1; int align = (int)(sbyte)record.AlignmentSide; int mapid = (int)(short)record.MapId; PlayerStatus status = this.Character.PlayerStatus; PartyCompanionMemberInformations[] memberInformationsArray = new PartyCompanionMemberInformations[0]; return(new PartyMemberInformations((uint)id, (byte)level, name, entityLook, (sbyte)breed, sex, (uint)hp, (uint)maxhp, (ushort)stats.Prospecting, (byte)regen, (ushort)this.Character.Initiative, (sbyte)align, (short)this.Character.Map.Position.x, (short)this.Character.Map.Position.y, this.Character.Map.Id, (ushort)this.Character.SubAreaId, status, (IEnumerable <PartyCompanionMemberInformations>)memberInformationsArray)); }
public override void Serialize(IDataWriter writer) { base.Serialize(writer); writer.WriteUShort(((ushort)(m_status.TypeID))); m_status.Serialize(writer); writer.WriteShort(((short)(m_companions.Count))); int companionsIndex; for (companionsIndex = 0; (companionsIndex < m_companions.Count); companionsIndex = (companionsIndex + 1)) { PartyCompanionMemberInformations objectToSend = m_companions[companionsIndex]; objectToSend.Serialize(writer); } writer.WriteVarUhInt(m_lifePoints); writer.WriteVarUhInt(m_maxLifePoints); writer.WriteVarUhShort(m_prospecting); writer.WriteSByte(m_regenRate); writer.WriteVarUhShort(m_initiative); writer.WriteByte(m_alignmentSide); writer.WriteShort(m_worldX); writer.WriteShort(m_worldY); writer.WriteInt(m_mapId); writer.WriteVarUhShort(m_subAreaId); }