Esempio n. 1
0
 public byte[] encode() {
   Packet packet = new Packet();
   packet.writeByte(id_u8);
   packet.writeShort(id_u16);
   packet.writeInt(id_u32);
   int repeat_id_u8_count = repeat_id_u8.size();
   packet.writeShort((short) repeat_id_u8_count);
   for (int i = 0; i < repeat_id_u8_count; i++) {
     packet.writeByte((byte) repeat_id_u8.get(i));
   }
   packet.writeByte(optional_id_u8_flag);
   if (optional_id_u8_flag == 1) {
     packet.writeByte(optional_id_u8);
   }
   return packet.encode((short) Msg.P_ACK_TEST_X_X);
 }
Esempio n. 2
0
 public byte[] encode() {
   Packet packet = new Packet();
   packet.writeString(uname);
   return packet.encode((short) Msg.P_ACK_ROLE_RAND_NAME_OK);
 }
Esempio n. 3
0
 public ReqSceneEnterFly(Packet packet) {
   map_id = packet.readInt();
 }