using Newtonsoft.Json;
using PSO2SERVER.Models;
using PSO2SERVER.Protocol.Packets;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PSO2SERVER.Json
{
    public class QuestData
    {
        [JsonProperty("definition")]
        public QuestDef QuestDefiniton { get; set; } = new QuestDef();
        [JsonProperty("difficulties")]
        public QuestDiff Difficulty { get; set; } = new QuestDiff();
        [JsonProperty("map")]
        public MapData Mapdata { get; set; } = new MapData();
        [JsonProperty("enemies")]
        public List<EnemyData> Enemies { get; set; } = new List<EnemyData>();
        [JsonProperty("immediate_move")]
        public bool ImmediateMove {  get; set; } = false;

        public QuestData()
        {
            QuestDefiniton = new QuestDef();
            Difficulty = new QuestDiff();
            Mapdata = new MapData();
            Enemies = new List<EnemyData>();
            ImmediateMove = false;
        }
    }

    public class EnemyData
    {
        [JsonProperty("difficulty")]
        public ushort Difficulty { get; set; } = 0;
        [JsonProperty("mapid")]
        public uint mapid { get; set; } = 0;
        [JsonProperty("data")]
        public EnemySpawnPacket data { get; set; } = new EnemySpawnPacket();
        [JsonProperty("lua_data")]
        public string lua_data { get; set; } = string.Empty;
    }
}
