public override void Deserialize(IDataReader reader) { base.Deserialize(reader); this.worldX = (int)reader.ReadShort(); if (this.worldX < -255 || this.worldX > (int)byte.MaxValue) { throw new Exception("Forbidden value (" + (object)this.worldX + ") on element of PartyInvitationMemberInformations.worldX."); } this.worldY = (int)reader.ReadShort(); if (this.worldY < -255 || this.worldY > (int)byte.MaxValue) { throw new Exception("Forbidden value (" + (object)this.worldY + ") on element of PartyInvitationMemberInformations.worldY."); } this.mapId = reader.ReadDouble(); if (this.mapId < 0.0 || this.mapId > 9.00719925474099E+15) { throw new Exception("Forbidden value (" + (object)this.mapId + ") on element of PartyInvitationMemberInformations.mapId."); } this.subAreaId = (uint)reader.ReadVarUhShort(); if (this.subAreaId < 0U) { throw new Exception("Forbidden value (" + (object)this.subAreaId + ") on element of PartyInvitationMemberInformations.subAreaId."); } uint num = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num; ++index) { PartyEntityBaseInformation entityBaseInformation = new PartyEntityBaseInformation(); entityBaseInformation.Deserialize(reader); this.entities.Add(entityBaseInformation); } }
public override void Deserialize(IDataReader reader) { base.Deserialize(reader); this.lifePoints = reader.ReadVarUhInt(); if (this.lifePoints < 0U) { throw new Exception("Forbidden value (" + (object)this.lifePoints + ") on element of PartyMemberInformations.lifePoints."); } this.maxLifePoints = reader.ReadVarUhInt(); if (this.maxLifePoints < 0U) { throw new Exception("Forbidden value (" + (object)this.maxLifePoints + ") on element of PartyMemberInformations.maxLifePoints."); } this.prospecting = (uint)reader.ReadVarUhShort(); if (this.prospecting < 0U) { throw new Exception("Forbidden value (" + (object)this.prospecting + ") on element of PartyMemberInformations.prospecting."); } this.regenRate = (uint)reader.ReadByte(); if (this.regenRate < 0U || this.regenRate > (uint)byte.MaxValue) { throw new Exception("Forbidden value (" + (object)this.regenRate + ") on element of PartyMemberInformations.regenRate."); } this.initiative = (uint)reader.ReadVarUhShort(); if (this.initiative < 0U) { throw new Exception("Forbidden value (" + (object)this.initiative + ") on element of PartyMemberInformations.initiative."); } this.alignmentSide = (int)reader.ReadByte(); this.worldX = (int)reader.ReadShort(); if (this.worldX < -255 || this.worldX > (int)byte.MaxValue) { throw new Exception("Forbidden value (" + (object)this.worldX + ") on element of PartyMemberInformations.worldX."); } this.worldY = (int)reader.ReadShort(); if (this.worldY < -255 || this.worldY > (int)byte.MaxValue) { throw new Exception("Forbidden value (" + (object)this.worldY + ") on element of PartyMemberInformations.worldY."); } this.mapId = reader.ReadDouble(); if (this.mapId < 0.0 || this.mapId > 9.00719925474099E+15) { throw new Exception("Forbidden value (" + (object)this.mapId + ") on element of PartyMemberInformations.mapId."); } this.subAreaId = (uint)reader.ReadVarUhShort(); if (this.subAreaId < 0U) { throw new Exception("Forbidden value (" + (object)this.subAreaId + ") on element of PartyMemberInformations.subAreaId."); } this.status = ProtocolTypeManager.GetInstance <PlayerStatus>((uint)reader.ReadUShort()); this.status.Deserialize(reader); uint num = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num; ++index) { PartyEntityBaseInformation instance = ProtocolTypeManager.GetInstance <PartyEntityBaseInformation>((uint)reader.ReadUShort()); instance.Deserialize(reader); this.entities.Add(instance); } }
public virtual void Deserialize(IDataReader reader) { this.guestId = (double)reader.ReadVarUhLong(); if (this.guestId < 0.0 || this.guestId > 9.00719925474099E+15) { throw new Exception("Forbidden value (" + (object)this.guestId + ") on element of PartyGuestInformations.guestId."); } this.hostId = (double)reader.ReadVarUhLong(); if (this.hostId < 0.0 || this.hostId > 9.00719925474099E+15) { throw new Exception("Forbidden value (" + (object)this.hostId + ") on element of PartyGuestInformations.hostId."); } this.name = reader.ReadUTF(); this.guestLook = new EntityLook(); this.guestLook.Deserialize(reader); this.breed = (int)reader.ReadByte(); this.sex = reader.ReadBoolean(); this.status = ProtocolTypeManager.GetInstance <PlayerStatus>((uint)reader.ReadUShort()); this.status.Deserialize(reader); uint num = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num; ++index) { PartyEntityBaseInformation entityBaseInformation = new PartyEntityBaseInformation(); entityBaseInformation.Deserialize(reader); this.entities.Add(entityBaseInformation); } }