mirror of
https://github.com/EggLinks/DanhengServer-OpenSource.git
synced 2026-01-02 20:26:03 +08:00
40 lines
1.0 KiB
C#
40 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace EggLink.DanhengServer.Data.Excel
|
|
{
|
|
[ResourceEntity("MessageGroupConfig.json")]
|
|
public class MessageGroupConfigExcel : ExcelResource
|
|
{
|
|
public int ID { get; set; }
|
|
public int MessageContactsID { get; set; }
|
|
public List<int> MessageSectionIDList { get; set; } = [];
|
|
|
|
public override int GetId()
|
|
{
|
|
return ID;
|
|
}
|
|
|
|
public override void Loaded()
|
|
{
|
|
GameData.MessageGroupConfigData.Add(ID, this);
|
|
}
|
|
|
|
public override void AfterAllDone()
|
|
{
|
|
GameData.MessageContactsConfigData[MessageContactsID].Groups.Add(this);
|
|
MessageSectionIDList.ForEach(m =>
|
|
{
|
|
GameData.MessageSectionConfigData.TryGetValue(m, out var section);
|
|
if (section != null)
|
|
{
|
|
section.GroupID = ID;
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|