public override void RemoveInfo(object item) { NSpellAuraInfo info = item as NSpellAuraInfo; if (info != null) { NSpellAuraInfo.RemoveInfo(info.ID); } }
override protected bool ImportExcelContent(string fullPath) { // 先清理内存 NSpellAuraInfo.ClearInfo(); // 导入数据到内存 AttInfoDataHelper.ImportFromExcel <NSpellAuraInfo>(fullPath); // 存储新的数据 NSpellAuraInfo.SaveToFile(); // 清理内存 NSpellAuraInfo.ClearInfo(); return(true); }
public override bool Initialize(params object[] args) { // 注册frame RegisterFrame(GameFrameType.AccountLogin, typeof(AccountLoginFrame)); RegisterFrame(GameFrameType.SelectRole, typeof(SelectRoleFrame)); RegisterFrame(GameFrameType.CreateRole, typeof(CreateRoleFrame)); RegisterFrame(GameFrameType.Gaming, typeof(LoadingFrame)); RegisterFrame(GameFrameType.Gaming, typeof(GamingFrame)); RegisterFrame(GameFrameType.Gaming, typeof(GamingMainFrame)); RegisterFrame(GameFrameType.Gaming, typeof(GamingCombatFrame)); RegisterFrame(GameFrameType.Gaming, typeof(MiniMapFrame)); // 加载属性模板表 NLevelupInfo.LoadFromFile(); NSpellInfo.LoadFromFile(); NSpellAuraInfo.LoadFromFile(); NSpellEffectInfo.LoadFromFile(); return(base.Initialize(args)); }
protected override void RefreshListViewItem(ref ListView viewControl, string filter) { Dictionary <UInt32, NSpellAuraInfo> infos = NSpellAuraInfo.ConvertNativeInfos(); // 刷新界面 foreach (var item in infos) { if (item.Value.ID.IndexOf(filter) == -1 && item.Value.Name.IndexOf(filter) == -1 && item.Value.Description.IndexOf(filter) == -1) { continue; } ListViewItem listItem = new ListViewItem(); listItem.Text = item.Value.ID; listItem.Tag = item.Value; listItem.SubItems.Add(item.Value.Name); listItem.SubItems.Add(item.Value.Description); viewControl.Items.Add(listItem); } }
public AuraInstance(AuraData data) { Data = data; AuraInfo = NSpellAuraInfo.FindInfo(data.InfoID); Debug.Assert(AuraInfo != null); }
public override void ReloadFromFile() { NSpellAuraInfo.ClearInfo(); NSpellAuraInfo.LoadFromFile(); }
public override void SaveToFile() { NSpellAuraInfo.SaveToFile(); }
public override void NewInfo() { NSpellAuraInfo info = new NSpellAuraInfo(Guid.NewGuid().ToString()); }
public override void ClearInfo() { NSpellAuraInfo.ClearInfo(); }