Beispiel #1
0
	def encode(self):
		packet = Packet()
		packet.write_u8(self.__channel)
		packet.write_u32(self.__uid)
		packet.write_string(self.__uname)
		packet.write_string(self.__content)
		return packet.encode(msg.P_ACK_CHAT_SEND_OK)
Beispiel #2
0
	def encode(self):
		packet = Packet()
		packet.write_bytes(self.__scene_rot_pos.get_bytes())
		packet.write_bytes(self.__forward.get_bytes())
		packet.write_string(self.__ani_name)
		packet.write_i16(self.__x_axis)
		return packet.encode(msg.P_REQ_SCENE_MOVE)
Beispiel #3
0
 def encode(self):
     packet = Packet()
     packet.write_i16(self.__rot_x)
     packet.write_i16(self.__rot_y)
     packet.write_i16(self.__rot_z)
     packet.write_i16(self.__pos_x)
     packet.write_i16(self.__pos_y)
     packet.write_i16(self.__pos_z)
     return packet.read_bytes()
Beispiel #4
0
	def encode(self):
		packet = Packet()
		packet.write_i16(self.__rot_x)
		packet.write_i16(self.__rot_y)
		packet.write_i16(self.__rot_z)
		packet.write_i16(self.__pos_x)
		packet.write_i16(self.__pos_y)
		packet.write_i16(self.__pos_z)
		return packet.read_bytes()
Beispiel #5
0
 def encode(self):
     packet = Packet()
     players_count = len(self.__players)
     packet.write_u16(players_count)
     for i in range(players_count):
         packet.write_bytes(self.__players[i].get_bytes())
     return packet.encode(msg.P_ACK_SCENE_PLAYERS)
Beispiel #6
0
	def encode(self):
		packet = Packet()
		players_count = len(self.__players)
		packet.write_u16(players_count)
		for i in range(players_count):
			packet.write_bytes(self.__players[i].get_bytes())
		return packet.encode(msg.P_ACK_SCENE_PLAYERS)
Beispiel #7
0
 def encode(self):
     packet = Packet()
     return packet.encode(msg.P_REQ_SCENE_REQ_PLAYERS)
Beispiel #8
0
 def encode(self):
     packet = Packet()
     packet.write_u32(self.__door_id)
     return packet.encode(msg.P_REQ_SCENE_ENTER)
Beispiel #9
0
 def encode(self):
     packet = Packet()
     packet.write_u32(self.__uid)
     packet.write_u32(self.__uuid)
     packet.write_u16(self.__sid)
     packet.write_u16(self.__cid)
     packet.write_string(self.__os)
     packet.write_string(self.__version)
     packet.write_string(self.__uname)
     packet.write_string(self.__source)
     packet.write_string(self.__source_sub)
     packet.write_u32(self.__login_time)
     return packet.encode(msg.P_REQ_ROLE_CREATE)
Beispiel #10
0
 def encode(self):
     packet = Packet()
     packet.write_u8(self.__id_u8)
     packet.write_bytes(self.__role_base.get_bytes())
     id_f32_count = len(self.__id_f32)
     packet.write_u16(id_f32_count)
     for i in range(id_f32_count):
         packet.write_f32(self.__id_f32[i])
     packet.write_u8(self.__id_op_u8_flag)
     if self.__id_op_u8_flag:
         packet.write_u8(self.__id_op_u8)
     packet.write_u8(self.__op_role_base_flag)
     if self.__op_role_base_flag:
         packet.write_bytes(self.__op_role_base.get_bytes())
     return packet.encode(msg.P_REQ_TEST_SEND)
Beispiel #11
0
 def encode(self):
     packet = Packet()
     return packet.encode(msg.P_ACK_ROLE_LOGIN_OK_NO_ROLE)
Beispiel #12
0
	def encode(self):
		packet = Packet()
		packet.write_u32(self.__uid)
		packet.write_u32(self.__uuid)
		packet.write_u16(self.__sid)
		packet.write_u16(self.__cid)
		packet.write_string(self.__os)
		packet.write_string(self.__version)
		packet.write_string(self.__uname)
		packet.write_string(self.__source)
		packet.write_string(self.__source_sub)
		packet.write_u32(self.__login_time)
		return packet.encode(msg.P_REQ_ROLE_CREATE)
Beispiel #13
0
	def encode(self):
		packet = Packet()
		return packet.encode(msg.P_REQ_ROLE_RAND_NAME)
Beispiel #14
0
	def encode(self):
		packet = Packet()
		packet.write_u16(self.__u16)
		return packet.read_bytes()
Beispiel #15
0
	def encode(self):
		packet = Packet()
		packet.write_u8(self.__channel)
		packet.write_u32(self.__dest_uid)
		packet.write_string(self.__content)
		return packet.encode(msg.P_REQ_CHAT_SEND)
Beispiel #16
0
	def encode(self):
		packet = Packet()
		packet.write_u64(self.__u64)
		packet.write_string(self.__strxx)
		packet.write_bytes(self.__msg_req.get_bytes())
		packet.write_u8(self.__msg_opt_flag)
		if self.__msg_opt_flag:
			packet.write_bytes(self.__msg_opt.get_bytes())
		msg_rep_count = len(self.__msg_rep)
		packet.write_u16(msg_rep_count)
		for i in range(msg_rep_count):
			packet.write_bytes(self.__msg_rep[i].get_bytes())
		return packet.encode(msg.P_REQ_TEST_PHP)
Beispiel #17
0
	def encode(self):
		packet = Packet()
		packet.write_u32(self.__uid)
		packet.write_u32(self.__uuid)
		packet.write_u16(self.__sid)
		packet.write_u16(self.__cid)
		packet.write_u32(self.__login_time)
		packet.write_string(self.__pwd)
		packet.write_u8(self.__relink)
		packet.write_u8(self.__debug)
		packet.write_string(self.__os)
		packet.write_string(self.__version)
		return packet.encode(msg.P_REQ_ROLE_LOGIN)
Beispiel #18
0
	def encode(self):
		packet = Packet()
		packet.write_u8(self.__id_u8)
		packet.write_u16(self.__id_u16)
		packet.write_u32(self.__id_u32)
		repeat_id_u8_count = len(self.__repeat_id_u8)
		packet.write_u16(repeat_id_u8_count)
		for i in range(repeat_id_u8_count):
			packet.write_u8(self.__repeat_id_u8[i])
		packet.write_u8(self.__optional_id_u8_flag)
		if self.__optional_id_u8_flag:
			packet.write_u8(self.__optional_id_u8)
		return packet.encode(msg.P_REQ_TEST_X_X)
Beispiel #19
0
	def encode(self):
		packet = Packet()
		packet.write_bytes(self.__player.get_bytes())
		return packet.encode(msg.P_ACK_SCENE_ENTER)
Beispiel #20
0
	def encode(self):
		packet = Packet()
		packet.write_u32(self.__door_id)
		return packet.encode(msg.P_REQ_SCENE_ENTER)
Beispiel #21
0
 def encode(self):
     packet = Packet()
     packet.write_i16(self.__x)
     packet.write_i16(self.__y)
     packet.write_i16(self.__z)
     return packet.read_bytes()
Beispiel #22
0
 def encode(self):
     packet = Packet()
     packet.write_u8(self.__channel)
     packet.write_u32(self.__uid)
     packet.write_string(self.__uname)
     packet.write_string(self.__content)
     return packet.encode(msg.P_ACK_CHAT_SEND_OK)
Beispiel #23
0
	def encode(self):
		packet = Packet()
		return packet.encode(msg.P_ACK_ROLE_LOGIN_OK_NO_ROLE)
Beispiel #24
0
 def encode(self):
     packet = Packet()
     packet.write_u32(self.__uid)
     packet.write_u32(self.__uuid)
     packet.write_u16(self.__sid)
     packet.write_u16(self.__cid)
     packet.write_u32(self.__login_time)
     packet.write_string(self.__pwd)
     packet.write_u8(self.__relink)
     packet.write_u8(self.__debug)
     packet.write_string(self.__os)
     packet.write_string(self.__version)
     return packet.encode(msg.P_REQ_ROLE_LOGIN)
Beispiel #25
0
 def encode(self):
     packet = Packet()
     packet.write_bytes(self.__player.get_bytes())
     return packet.encode(msg.P_ACK_SCENE_ENTER)
Beispiel #26
0
 def encode(self):
     packet = Packet()
     packet.write_u16(self.__u16)
     return packet.read_bytes()
Beispiel #27
0
 def encode(self):
     packet = Packet()
     packet.write_u32(self.__uid)
     return packet.encode(msg.P_ACK_SCENE_EXIT)
Beispiel #28
0
	def encode(self):
		packet = Packet()
		packet.write_u32(self.__uid)
		return packet.encode(msg.P_ACK_SCENE_EXIT)
Beispiel #29
0
 def encode(self):
     packet = Packet()
     packet.write_u8(self.__id_u8)
     packet.write_u16(self.__id_u16)
     packet.write_u32(self.__id_u32)
     repeat_id_u8_count = len(self.__repeat_id_u8)
     packet.write_u16(repeat_id_u8_count)
     for i in range(repeat_id_u8_count):
         packet.write_u8(self.__repeat_id_u8[i])
     packet.write_u8(self.__optional_id_u8_flag)
     if self.__optional_id_u8_flag:
         packet.write_u8(self.__optional_id_u8)
     return packet.encode(msg.P_REQ_TEST_X_X)
Beispiel #30
0
	def encode(self):
		packet = Packet()
		return packet.encode(msg.P_REQ_SCENE_REQ_PLAYERS)
Beispiel #31
0
 def encode(self):
     packet = Packet()
     packet.write_u64(self.__u64)
     packet.write_string(self.__strxx)
     packet.write_bytes(self.__msg_req.get_bytes())
     packet.write_u8(self.__msg_opt_flag)
     if self.__msg_opt_flag:
         packet.write_bytes(self.__msg_opt.get_bytes())
     msg_rep_count = len(self.__msg_rep)
     packet.write_u16(msg_rep_count)
     for i in range(msg_rep_count):
         packet.write_bytes(self.__msg_rep[i].get_bytes())
     return packet.encode(msg.P_REQ_TEST_PHP)
Beispiel #32
0
	def encode(self):
		packet = Packet()
		packet.write_u32(self.__uid)
		packet.write_string(self.__uname)
		return packet.read_bytes()
Beispiel #33
0
 def encode(self):
     packet = Packet()
     packet.write_u8(self.__channel)
     packet.write_u32(self.__dest_uid)
     packet.write_string(self.__content)
     return packet.encode(msg.P_REQ_CHAT_SEND)
Beispiel #34
0
	def encode(self):
		packet = Packet()
		packet.write_u32(self.__uid)
		packet.write_bytes(self.__scene_rot_pos.get_bytes())
		return packet.read_bytes()
Beispiel #35
0
 def encode(self):
     packet = Packet()
     return packet.encode(msg.P_REQ_ROLE_RAND_NAME)
Beispiel #36
0
	def encode(self):
		packet = Packet()
		packet.write_i16(self.__x)
		packet.write_i16(self.__y)
		packet.write_i16(self.__z)
		return packet.read_bytes()
Beispiel #37
0
 def encode(self):
     packet = Packet()
     packet.write_bytes(self.__scene_rot_pos.get_bytes())
     packet.write_bytes(self.__forward.get_bytes())
     packet.write_string(self.__ani_name)
     packet.write_i16(self.__x_axis)
     return packet.encode(msg.P_REQ_SCENE_MOVE)
Beispiel #38
0
	def encode(self):
		packet = Packet()
		packet.write_u8(self.__id_u8)
		id_f32_count = len(self.__id_f32)
		packet.write_u16(id_f32_count)
		for i in range(id_f32_count):
			packet.write_f32(self.__id_f32[i])
		packet.write_u8(self.__id_op_u8_flag)
		if self.__id_op_u8_flag:
			packet.write_u8(self.__id_op_u8)
		return packet.read_bytes()
Beispiel #39
0
 def encode(self):
     packet = Packet()
     packet.write_u32(self.__uid)
     packet.write_string(self.__uname)
     return packet.read_bytes()
Beispiel #40
0
	def encode(self):
		packet = Packet()
		packet.write_u8(self.__id_u8)
		packet.write_bytes(self.__role_base.get_bytes())
		id_f32_count = len(self.__id_f32)
		packet.write_u16(id_f32_count)
		for i in range(id_f32_count):
			packet.write_f32(self.__id_f32[i])
		packet.write_u8(self.__id_op_u8_flag)
		if self.__id_op_u8_flag:
			packet.write_u8(self.__id_op_u8)
		packet.write_u8(self.__op_role_base_flag)
		if self.__op_role_base_flag:
			packet.write_bytes(self.__op_role_base.get_bytes())
		return packet.encode(msg.P_REQ_TEST_SEND)
Beispiel #41
0
 def encode(self):
     packet = Packet()
     packet.write_u32(self.__uid)
     packet.write_bytes(self.__scene_rot_pos.get_bytes())
     return packet.read_bytes()
Beispiel #42
0
	def encode(self):
		packet = Packet()
		packet.write_string(self.__content)
		return packet.encode(msg.P_REQ_CHAT_GM)
Beispiel #43
0
 def encode(self):
     packet = Packet()
     packet.write_u8(self.__id_u8)
     id_f32_count = len(self.__id_f32)
     packet.write_u16(id_f32_count)
     for i in range(id_f32_count):
         packet.write_f32(self.__id_f32[i])
     packet.write_u8(self.__id_op_u8_flag)
     if self.__id_op_u8_flag:
         packet.write_u8(self.__id_op_u8)
     return packet.read_bytes()
Beispiel #44
0
 def encode(self):
     packet = Packet()
     packet.write_string(self.__uname)
     return packet.encode(msg.P_ACK_ROLE_LOGIN_OK)
Beispiel #45
0
 def encode(self):
     packet = Packet()
     packet.write_string(self.__content)
     return packet.encode(msg.P_REQ_CHAT_GM)
Beispiel #46
0
	def encode(self):
		packet = Packet()
		packet.write_string(self.__uname)
		return packet.encode(msg.P_ACK_ROLE_LOGIN_OK)