Example #1
0
func PKT_user_login_info(reader *packet.Packet) (tbl user_login_info, err error) {
	tbl.F_mac_addr, err = reader.ReadString()
	checkErr(err)
	tbl.F_client_version, err = reader.ReadS32()
	checkErr(err)
	tbl.F_new_user, err = reader.ReadByte()
	checkErr(err)
	tbl.F_user_name, err = reader.ReadString()
	checkErr(err)
	return
}
Example #2
0
func PKT_INFO(reader *packet.Packet) (tbl INFO, err error) {
	tbl.F_flag, err = reader.ReadBool()
	checkErr(err)

	tbl.F_id, err = reader.ReadS32()
	checkErr(err)

	tbl.F_state, err = reader.ReadByte()
	checkErr(err)

	tbl.F_score, err = reader.ReadS32()
	checkErr(err)

	tbl.F_protecttime, err = reader.ReadS64()
	checkErr(err)

	return
}