public WakfuServerMessage(WakfuOPCode opcode) { this.OPCode = opcode; this.Writer = new IO.BigEndianWriter(); this.Writer.WriteShort(0);//Placeholder this.Writer.WriteShort((short)this.OPCode); }
public WakfuClientMessage(byte[] data) { this.Reader = new IO.BigEndianReader(data); var size = this.Reader.ReadUShort(); var type = this.Reader.ReadByte(); var opcode = (WakfuOPCode)this.Reader.ReadUShort(); this.Size = size; this.Type = type; this.OPCode = opcode; }