using Mir2Assistant.Common.Utils; using System.Collections.Concurrent; namespace Mir2Assistant.Common.Models; public class MirGameInstanceModel { public int MirPid { get; set; } //游戏pid public uint MirThreadId { get; set; }//游戏主线程ID public IntPtr MirHwnd { get; set; }//游戏主窗体句柄 public nint MirBaseAddress { get; set; } public string? mirVer { get; set; } public nint? HookHandle { get; set; } public IntPtr? LibIpdl { get; set; } public Form? AssistantForm { get; set; } public Dictionary MirConfig = new Dictionary(); public CharacterStatusModel? CharacterStatus { get; set; } = new CharacterStatusModel(); public MemoryUtils? MemoryUtils { get; set; } public byte MonstersUpdateId = 0; /// /// 怪物 /// public ConcurrentDictionary Monsters { get; set; } = new ConcurrentDictionary(); public bool IsReadingMonsters = false; /// /// 技能 /// public ConcurrentBag Skills { get; set; } = new ConcurrentBag(); /// /// 二级对话列表 /// public List TalkCmds { get; set; } = new List(); public event Action? NewSysMsg; public void InvokeSysMsg(nint flag, string? msg) { Task.Run(() => { NewSysMsg?.Invoke(flag, msg); }); } }