Files
DanhengServer-OpenSource/Common/Data/Excel/MazePropExcel.cs
Somebody 87d228eb79 Feature:Asynchronous Operation & Formatting Code
- Now the async operation is enabled!
- Code formatted by Resharper plugin <3
2024-07-22 17:12:03 +08:00

42 lines
1.1 KiB
C#

using EggLink.DanhengServer.Enums.Scene;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace EggLink.DanhengServer.Data.Excel;
[ResourceEntity("MazeProp.json")]
public class MazePropExcel : ExcelResource
{
public bool IsDoor;
public bool IsHpRecover;
public bool IsMpRecover;
public int ID { get; set; }
public HashName PropName { get; set; } = new();
public string JsonPath { get; set; } = "";
[JsonConverter(typeof(StringEnumConverter))]
public PropTypeEnum PropType { get; set; }
[JsonProperty(ItemConverterType = typeof(StringEnumConverter))]
public List<PropStateEnum> PropStateList { get; set; } = [];
public override int GetId()
{
return ID;
}
public override void Loaded()
{
if (JsonPath != "")
{
if (JsonPath.Contains("MPBox") || JsonPath.Contains("MPRecover"))
IsMpRecover = true;
else if (JsonPath.Contains("HPBox") || JsonPath.Contains("HPRecover"))
IsHpRecover = true;
else if (JsonPath.Contains("_Door_")) IsDoor = true;
}
GameData.MazePropData.Add(ID, this);
}
}