int DragonBuildingInfo::deserialize(Block_Buffer &buffer) { buffer.read_uint32(id); buffer.read_uint8(type); buffer.read_uint16(level); buffer.read_uint8(status); buffer.read_uint32(production); buffer.read_bool(is_gain); uint64_t temp_begin_upgrade_time_sec = 0; uint64_t temp_last_output_production_time_sec = 0; buffer.read_uint64(temp_begin_upgrade_time_sec); buffer.read_uint64(temp_last_output_production_time_sec); begin_upgrade_time.sec((long)temp_begin_upgrade_time_sec); last_output_production_time.sec((long)temp_last_output_production_time_sec); buffer.read_uint8(order); buffer.read_uint8(consume_type); return 0; }
int Dragon_Vale_Detail::deserialize(Block_Buffer &buffer) { buffer.read_int64(role_id); buffer.read_int64(target_player_id); buffer.read_bool(is_rob_enter_dragon_vale); buffer.read_int64(uuid); buffer.read_bool(is_gold_mine_max_storage); buffer.read_bool(is_moon_well_max_storage); buffer.read_bool(is_totem_max_storage); buffer.read_uint8(build_gold_mine_num); buffer.read_uint8(build_moon_well_num); buffer.read_uint8(build_totem_num); buffer.read_uint8(build_queue_num); buffer.read_uint8(all_open_build_queue_num); uint8_t size = 0; buffer.read_uint8(size); dragon_building_info_map.clear(); uint64_t key = 0; DragonBuildingInfo building_info; for(uint8_t i = 0; i < size; ++i) { building_info.reset(); building_info.deserialize(buffer); key = create_key_of_Dragon_Building_Info(building_info.id, building_info.type); dragon_building_info_map.insert(std::make_pair(key, building_info)); } buffer.read_bool(is_dragon_born); uint64_t temp_begin_born_time_sec = 0; buffer.read_uint64(temp_begin_born_time_sec); begin_born_time.sec((long)temp_begin_born_time_sec); dragon_info.deserialize(buffer); uint64_t temp_begin_play_dragon_interval_time_sec = 0; buffer.read_uint64(temp_begin_play_dragon_interval_time_sec); begin_play_dragon_interval_time.sec((long)temp_begin_play_dragon_interval_time_sec); uint64_t temp_begin_down_feeling_time_sec = 0; buffer.read_uint64(temp_begin_down_feeling_time_sec); begin_down_feeling_time.sec((long)temp_begin_down_feeling_time_sec); buffer.read_bool(is_vip_down_to_zero); buffer.read_uint32(matched_num); buffer.read_uint8(size); for(uint8_t i = 0; i < size; ++i) { int64_t key = 0; int64_t value = 0; buffer.read_int64(key); buffer.read_int64(value); thief_id_quality_map.insert(std::make_pair(key, value)); } uint64_t temp_begin_refresh_thief_time = 0; buffer.read_uint64(temp_begin_refresh_thief_time); begin_refresh_thief_time.sec((long)temp_begin_refresh_thief_time); buffer.read_uint8(star_num); buffer.read_uint8(award_foot_num); buffer.read_bool(is_special); buffer.read_uint8(size); for(uint8_t i = 0; i < size; ++i) { int64_t key = 0; buffer.read_int64(key); Foot_Info foot_info; foot_info.reset(); buffer.read_uint8(foot_info.sex); buffer.read_string(foot_info.name); foot_info_map.insert(std::make_pair(key, foot_info)); } uint32_t size_32 = 0; buffer.read_uint32(size_32); for(uint32_t i = 0; i < size_32; ++i) { int64_t role_id = 0; buffer.read_int64(role_id); foot_id_set.insert(role_id); } buffer.read_bool(is_yesterday_login); buffer.read_uint8(dragon_heart_num); buffer.read_uint8(size); Notice_Board notice_board; for(uint8_t i = 0; i < size; ++i) { notice_board.reset(); notice_board.deserialize(buffer); notice_board_list.push_back(notice_board); } buffer.read_bool(is_rob_protect); uint64_t temp_begin_rob_protect_time = 0; buffer.read_uint64(temp_begin_rob_protect_time); begin_rob_protect_time.sec((long)temp_begin_rob_protect_time); buffer.read_bool(is_first_enter_after_robbed); buffer.read_bool(is_in_robbed_dragon_vale); uint64_t temp_begin_in_robbed_dragon_vale_time = 0; buffer.read_uint64(temp_begin_in_robbed_dragon_vale_time); begin_in_robbed_dragon_vale_time.sec((long)temp_begin_in_robbed_dragon_vale_time); buffer.read_uint8(size); for(uint8_t i = 0; i < size; ++i) { uint8_t order = 0; buffer.read_uint8(order); cancel_create_building_set.insert(order); } buffer.read_bool(is_dragon_vale_open); uint64_t temp_begin_no_enter_time = 0; buffer.read_uint64(temp_begin_no_enter_time); begin_no_enter_time.sec((long)temp_begin_no_enter_time); buffer.read_uint32(left_time); buffer.read_uint32(play_dragon_num); buffer.read_uint32(drive_thief_num); return 0; }