Aura.Msgr.Network.Send.NoteListRequestR C# (CSharp) Method

NoteListRequestR() public static method

Sends note list to client.
public static NoteListRequestR ( MsgrClient client, List notes ) : void
client MsgrClient
notes List Set to null for negative response.
return void
		public static void NoteListRequestR(MsgrClient client, List<Note> notes)
		{
			var packet = new Packet(Op.Msgr.NoteListRequestR, 0);

			packet.PutByte(notes != null);
			if (notes != null)
			{
				packet.PutInt(notes.Count);
				foreach (var note in notes)
				{
					packet.PutLong(note.Id);
					packet.PutString(note.Sender);
					packet.PutString(note.Message);
					packet.PutLong(note.GetLongTime());
					packet.PutByte(note.Read);
					packet.PutByte(0); // Hidden if 1?
				}
			}

			client.Send(packet);
		}

Usage Example

Ejemplo n.º 1
0
        public void NoteListRequest(MsgrClient client, Packet packet)
        {
            var unkLong = packet.GetLong();

            var notes = MsgrServer.Instance.Database.GetNotes(client.User);

            Send.NoteListRequestR(client, notes);
        }