public ClientPartyRequestEventArgs(PartyRequestInfo i)
 {
     info = i;
 }
        public static byte[] SendPartyLeader(PartyRequestInfo i)
        {
            Packet p = new Packet(20);
            p.WriteInt(i.AskerID); // partyID
            p.WriteInt(i.AskerID);
            p.WriteByte((byte)i.Type);

            return p.GetWrittenBuffer(PacketIds.SendPartyLeader);
        }
        public static PartyRequestInfo RecvPartyRequest(Packet p)
        {
            p.Skip(2);
            int asker = p.ReadInt();
            int target = p.ReadInt();
            PartyError error = (PartyError)p.ReadByte();
            PartyType type = (PartyType)p.ReadByte();

            PartyRequestInfo i = new PartyRequestInfo
            {
                AskerID = asker,
                TargetID = target,
                Error = error,
                Type = type
            };

            return i;
        }
        public static byte[] SendPartyAnswer(PartyRequestInfo i)
        {
            Packet p = new Packet(20);
            p.WriteInt(i.AskerID);
            p.WriteInt(i.TargetID);
            p.WriteByte((byte)i.Error);
            p.WriteByte((byte)i.Type);

            return p.GetWrittenBuffer(PacketIds.SendPartyAnswer);
        }