Add Mail editor (WIP)

Update Drop editor indexes
This commit is contained in:
2022-10-27 13:03:53 +08:00
parent 150e3a1132
commit 8a65120e47
12 changed files with 9603 additions and 6162 deletions

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace GrasscutterTools.Game.Mail
{
/// <summary>
/// 邮件
/// </summary>
public class Mail
{
/// <summary>
/// 发件人
/// </summary>
public string Sender { get; set; }
/// <summary>
/// 收件人 (0 表示发送给所有人)
/// </summary>
public int Recipient { get; set; }
/// <summary>
/// 是否发送给所有人
/// </summary>
[JsonIgnore]
public bool SendToAll => Recipient == 0;
/// <summary>
/// 邮件标题
/// </summary>
public string Title { get; set; }
/// <summary>
/// 邮件内容
/// </summary>
public string Content { get; set; }
/// <summary>
/// 附件列表
/// </summary>
public List<MailItem> ItemList { get; set; }
/// <summary>
/// 发送时间
/// </summary>
public DateTime SendTime { get; set; }
}
}

View File

@@ -0,0 +1,28 @@
namespace GrasscutterTools.Game.Mail
{
/// <summary>
/// 附件
/// </summary>
public struct MailItem
{
/// <summary>
/// 物品ID
/// </summary>
public int ItemId { get; set; }
/// <summary>
/// 物品数量
/// </summary>
public int ItemCount { get; set; }
/// <summary>
/// 物品等级
/// </summary>
public int ItemLevel { get; set; }
public override string ToString()
{
return $"{ItemId}:{GameData.Items[ItemId]} x{ItemCount} lv{ItemLevel}";
}
}
}