use std::collections::HashMap;

use trigger_logic::scene::ELocalPlayType;

use super::ScenePerform;

pub struct RallyScene {
    pub scene_id: u32,
    pub perform: ScenePerform,
}

impl RallyScene {
    pub fn get_protocol_scene_data(&self) -> trigger_protocol::SceneData {
        use trigger_protocol::*;

        SceneData {
            scene_type: 7,
            local_play_type: ELocalPlayType::RallyLongFight.into(),
            scene_id: self.scene_id,
            rally_scene_info: Some(RallySceneInfo {
                level_perform_info: Some(LevelPerformInfo {
                    time: self.perform.time.clone(),
                    weather: self.perform.weather.clone(),
                }),
                level_reward_info: Some(LevelRewardInfo::default()),
                cur_check_point: Some(HollowCheckPoint {
                    quest_cond_progress: Some(QuestCondProgress {
                        public_variables: HashMap::new(),
                    }),
                }),
            }),
            ..Default::default()
        }
    }
}
