PSO2SERVER/Server/Json/QuestJson.cs

47 lines
1.4 KiB
C#
Raw Permalink Normal View History

2024-12-08 11:33:06 +08:00
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();
2024-12-08 11:33:06 +08:00
[JsonProperty("difficulties")]
public QuestDiff Difficulty { get; set; } = new QuestDiff();
2024-12-08 11:33:06 +08:00
[JsonProperty("map")]
public MapData Mapdata { get; set; } = new MapData();
2024-12-08 11:33:06 +08:00
[JsonProperty("enemies")]
public List<EnemyData> Enemies { get; set; } = new List<EnemyData>();
2024-12-08 11:33:06 +08:00
[JsonProperty("immediate_move")]
public bool ImmediateMove { get; set; } = false;
2024-12-08 11:33:06 +08:00
public QuestData()
{
QuestDefiniton = new QuestDef();
Difficulty = new QuestDiff();
2024-12-08 11:33:06 +08:00
Mapdata = new MapData();
Enemies = new List<EnemyData>();
ImmediateMove = false;
}
}
public class EnemyData
{
[JsonProperty("difficulty")]
public ushort Difficulty { get; set; } = 0;
2024-12-08 11:33:06 +08:00
[JsonProperty("mapid")]
public uint mapid { get; set; } = 0;
2024-12-08 11:33:06 +08:00
[JsonProperty("data")]
public EnemySpawnPacket data { get; set; } = new EnemySpawnPacket();
2024-12-08 11:33:06 +08:00
[JsonProperty("lua_data")]
public string lua_data { get; set; } = string.Empty;
2024-12-08 11:33:06 +08:00
}
}