public void InnerHandle_InBat_PreConfigMsg(COM_INBATTLE_CHAT_TYPE chatType, uint herocfgID, uint cfg_id, ulong ullUid) { ResInBatMsgHeroActCfg heroActCfg = Singleton <InBattleMsgMgr> .instance.GetHeroActCfg(herocfgID, cfg_id); ResInBatMsgCfg cfgData = Singleton <InBattleMsgMgr> .instance.GetCfgData(cfg_id); if (cfgData != null) { if (heroActCfg != null) { InBattleMsgUT.ShowInBattleMsg(chatType, ullUid, herocfgID, heroActCfg.szContent, heroActCfg.szSound, true); } else { InBattleMsgUT.ShowInBattleMsg(chatType, ullUid, herocfgID, cfgData.szContent, cfgData.szSound, false); } if ((chatType == COM_INBATTLE_CHAT_TYPE.COM_INBATTLE_CHATTYPE_SIGNAL) && (Singleton <CBattleSystem> .instance.TheMinimapSys.CurMapType() == MinimapSys.EMapType.Mini)) { ReadonlyContext <PoolObjHandle <ActorRoot> > allHeroes = Singleton <GamePlayerCenter> .instance.GetPlayerByUid(ullUid).GetAllHeroes(); for (int i = 0; i < allHeroes.Count; i++) { PoolObjHandle <ActorRoot> handle = allHeroes[i]; ActorRoot root = handle.handle; if ((root != null) && (root.TheActorMeta.ConfigId == herocfgID)) { Vector2 sreenLoc = CUIUtility.WorldToScreenPoint(this.m_battleForm.GetCamera(), root.HudControl.GetSmallMapPointer_WorldPosition()); Singleton <CUIParticleSystem> .instance.AddParticle(cfgData.szMiniMapEffect, 2f, sreenLoc); return; } } } } }
public ResInBatMsgHeroActCfg GetHeroActCfg(uint heroid, uint actID) { DictionaryView <uint, ResInBatMsgHeroActCfg> view = null; this.heroActData.TryGetValue(heroid, out view); if (view == null) { return(null); } ResInBatMsgHeroActCfg cfg = null; view.TryGetValue(actID, out cfg); return(cfg); }
public ResInBatMsgHeroActCfg GetHeroActCfg(uint heroid, uint actID) { DictionaryView <uint, ResInBatMsgHeroActCfg> dictionaryView = null; this.heroActData.TryGetValue(heroid, ref dictionaryView); if (dictionaryView == null) { return(null); } ResInBatMsgHeroActCfg result = null; dictionaryView.TryGetValue(actID, ref result); return(result); }
public void ParseCfgData() { if (!int.TryParse(Singleton <CTextManager> .instance.GetText("InBat_Bubble_CDTime"), out this.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); } view.Add(new TabElement(cfg.dwID, cfg.szContent)); } } 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(); }
public void InnerHandle_InBat_PreConfigMsg(COM_INBATTLE_CHAT_TYPE chatType, uint herocfgID, uint cfg_id, ulong ullUid) { ResInBatMsgHeroActCfg heroActCfg = Singleton <InBattleMsgMgr> .get_instance().GetHeroActCfg(herocfgID, cfg_id); ResInBatMsgCfg cfgData = Singleton <InBattleMsgMgr> .get_instance().GetCfgData(cfg_id); if (cfgData == null) { return; } if (heroActCfg != null) { InBattleMsgUT.ShowInBattleMsg(chatType, ullUid, herocfgID, heroActCfg.szContent, heroActCfg.szSound); } else { InBattleMsgUT.ShowInBattleMsg(chatType, ullUid, herocfgID, cfgData.szContent, cfgData.szSound); } if (chatType == 1 && Singleton <CBattleSystem> .get_instance().TheMinimapSys.CurMapType() == MinimapSys.EMapType.Mini) { Player playerByUid = Singleton <GamePlayerCenter> .get_instance().GetPlayerByUid(ullUid); ReadonlyContext <PoolObjHandle <ActorRoot> > allHeroes = playerByUid.GetAllHeroes(); for (int i = 0; i < allHeroes.get_Count(); i++) { ActorRoot handle = allHeroes.get_Item(i).get_handle(); if (handle != null && (long)handle.TheActorMeta.ConfigId == (long)((ulong)herocfgID)) { Camera currentCamera = Singleton <Camera_UI3D> .GetInstance().GetCurrentCamera(); if (currentCamera != null) { Vector2 sreenLoc = currentCamera.WorldToScreenPoint(handle.HudControl.GetSmallMapPointer_WorldPosition()); Singleton <CUIParticleSystem> .get_instance().AddParticle(cfgData.szMiniMapEffect, 2f, sreenLoc); } } } } }
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); } } }