public void UseDefaultShortcut() { this.menuEntList.Clear(); this.lastMenuEntList.Clear(); for (int i = 0; i < this.totalCount; i++) { ResShortcutDefault dataByKey = GameDataMgr.inBattleDefaultDatabin.GetDataByKey((long)(i + 1)); DebugHelper.Assert(dataByKey != null, "---shortcut id:" + (i + 1) + ", 找不到对应配置数据, jason 检查下"); if (dataByKey != null) { ResInBatMsgCfg cfg = GameDataMgr.inBattleMsgDatabin.GetDataByKey(dataByKey.dwConfigID); DebugHelper.Assert(cfg != null, "---shortcut dwConfigID:" + dataByKey.dwConfigID + ", 找不到对应配置数据, jason 检查下"); if (cfg != null) { this.menuEntList.Add(new TabElement(cfg.dwID, cfg.szContent)); this.lastMenuEntList.Add(new TabElement(cfg.dwID, cfg.szContent)); } } } }
public void ParseCfgData() { Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.InBatShortcut_OpenForm, new CUIEventManager.OnUIEventHandler(this.On_InBatMenu_OpenForm)); if (!int.TryParse(Singleton <CTextManager> .instance.GetText("InBat_Bubble_CDTime"), out InBattleShortcut.InBat_Bubble_CDTime)) { DebugHelper.Assert(false, "---InBatMsg 教练你配的 InBat_Bubble_CDTime 好像不是整数哦, check out"); } ListView <TabElement> view = null; Dictionary <long, object> .Enumerator enumerator = GameDataMgr.inBattleMsgDatabin.GetEnumerator(); while (enumerator.MoveNext()) { view = null; KeyValuePair <long, object> current = enumerator.Current; ResInBatMsgCfg cfg = (ResInBatMsgCfg)current.Value; if (cfg != null) { string szChannelTitle = cfg.szChannelTitle; this.tabElements.TryGetValue(szChannelTitle, out view); if (view == null) { view = new ListView <TabElement>(); this.tabElements.Add(szChannelTitle, view); this.title_list.Add(szChannelTitle); } TabElement item = new TabElement(cfg.dwID, cfg.szContent) { camp = cfg.bCampVisible }; view.Add(item); } } Dictionary <long, object> .Enumerator enumerator2 = GameDataMgr.inBattleHeroActDatabin.GetEnumerator(); while (enumerator2.MoveNext()) { KeyValuePair <long, object> pair2 = enumerator2.Current; ResInBatMsgHeroActCfg cfg2 = (ResInBatMsgHeroActCfg)pair2.Value; if (cfg2 != null) { DictionaryView <uint, ResInBatMsgHeroActCfg> view2 = null; this.heroActData.TryGetValue(cfg2.dwHeroID, out view2); if (view2 == null) { view2 = new DictionaryView <uint, ResInBatMsgHeroActCfg>(); this.heroActData.Add(cfg2.dwHeroID, view2); } if (!view2.ContainsKey(cfg2.dwActionID)) { view2.Add(cfg2.dwActionID, cfg2); } } } GameDataMgr.inBattleHeroActDatabin.Unload(); Dictionary <long, object> .Enumerator enumerator3 = GameDataMgr.inBattleDefaultDatabin.GetEnumerator(); while (enumerator3.MoveNext()) { KeyValuePair <long, object> pair3 = enumerator3.Current; ResShortcutDefault default2 = (ResShortcutDefault)pair3.Value; if (default2 != null) { DebugHelper.Assert(GameDataMgr.inBattleMsgDatabin.GetDataByKey(default2.dwConfigID) != null, "---jason 检查下 局内交流配置表中的默认配置sheet, 配置id:" + default2.dwConfigID); } } }
public void ParseCfgData() { Singleton <CUIEventManager> .GetInstance().AddUIEventListener(enUIEventID.InBatShortcut_OpenForm, new CUIEventManager.OnUIEventHandler(this.On_InBatMenu_OpenForm)); if (!int.TryParse(Singleton <CTextManager> .get_instance().GetText("InBat_Bubble_CDTime"), ref InBattleShortcut.InBat_Bubble_CDTime)) { DebugHelper.Assert(false, "---InBatMsg 教练你配的 InBat_Bubble_CDTime 好像不是整数哦, check out"); } ListView <TabElement> listView = null; Dictionary <long, object> .Enumerator enumerator = GameDataMgr.inBattleMsgDatabin.GetEnumerator(); while (enumerator.MoveNext()) { listView = null; KeyValuePair <long, object> current = enumerator.get_Current(); ResInBatMsgCfg resInBatMsgCfg = (ResInBatMsgCfg)current.get_Value(); if (resInBatMsgCfg != null) { string szChannelTitle = resInBatMsgCfg.szChannelTitle; this.tabElements.TryGetValue(szChannelTitle, ref listView); if (listView == null) { listView = new ListView <TabElement>(); this.tabElements.Add(szChannelTitle, listView); this.title_list.Add(szChannelTitle); } TabElement tabElement = new TabElement(resInBatMsgCfg.dwID, resInBatMsgCfg.szContent); tabElement.camp = resInBatMsgCfg.bCampVisible; listView.Add(tabElement); } } Dictionary <long, object> .Enumerator enumerator2 = GameDataMgr.inBattleHeroActDatabin.GetEnumerator(); while (enumerator2.MoveNext()) { KeyValuePair <long, object> current2 = enumerator2.get_Current(); ResInBatMsgHeroActCfg resInBatMsgHeroActCfg = (ResInBatMsgHeroActCfg)current2.get_Value(); if (resInBatMsgHeroActCfg != null) { DictionaryView <uint, ResInBatMsgHeroActCfg> dictionaryView = null; this.heroActData.TryGetValue(resInBatMsgHeroActCfg.dwHeroID, ref dictionaryView); if (dictionaryView == null) { dictionaryView = new DictionaryView <uint, ResInBatMsgHeroActCfg>(); this.heroActData.Add(resInBatMsgHeroActCfg.dwHeroID, dictionaryView); } if (!dictionaryView.ContainsKey(resInBatMsgHeroActCfg.dwActionID)) { dictionaryView.Add(resInBatMsgHeroActCfg.dwActionID, resInBatMsgHeroActCfg); } } } GameDataMgr.inBattleHeroActDatabin.Unload(); Dictionary <long, object> .Enumerator enumerator3 = GameDataMgr.inBattleDefaultDatabin.GetEnumerator(); while (enumerator3.MoveNext()) { KeyValuePair <long, object> current3 = enumerator3.get_Current(); ResShortcutDefault resShortcutDefault = (ResShortcutDefault)current3.get_Value(); if (resShortcutDefault != null) { ResInBatMsgCfg dataByKey = GameDataMgr.inBattleMsgDatabin.GetDataByKey(resShortcutDefault.dwConfigID); DebugHelper.Assert(dataByKey != null, "---jason 检查下 局内交流配置表中的默认配置sheet, 配置id:" + resShortcutDefault.dwConfigID); } } }