public static void OnObserveTipsCome(CSPkg msg) { InBattleInputChat inputChat = Singleton <InBattleMsgMgr> .get_instance().m_InputChat; if (inputChat != null) { SCPKG_OBTIPS_NTF stOBTipsNtf = msg.stPkgData.get_stOBTipsNtf(); COM_OBNUM_TIPS_TYPE bTipsType = stOBTipsNtf.bTipsType; string text = string.Empty; Player playerByUid = Singleton <GamePlayerCenter> .GetInstance().GetPlayerByUid(stOBTipsNtf.ullRecomUid); if (playerByUid != null) { text = playerByUid.Name; } InBattleInputChat.InBatChatEntity ent = inputChat.ConstructColorFlagEnt(string.Format(Singleton <CTextManager> .GetInstance().GetText(bTipsType.ToString()), stOBTipsNtf.dwOBNum, text)); inputChat.Add(ent); } }
private void On_EndEdit(string content) { Singleton <InBattleMsgMgr> .instance.HideView(); if (this.m_inputField != null) { this.m_inputField.set_text(string.Empty); } if (this.intimeMSecond_StartTime != 0uL) { uint num = (uint)(Singleton <FrameSynchr> .GetInstance().LogicFrameTick - this.intimeMSecond_StartTime); if ((ulong)num < (ulong)((long)this.intimeMSecond)) { if (this.intimeSendCount + 1 > this.intimeMaxCount) { if (this.m_inputButton != null) { this.m_inputButton.StartCooldown(this.intime_cd, new Action(this.OnBlockCDEnd)); } InBattleInputChat inputChat = Singleton <InBattleMsgMgr> .instance.m_InputChat; if (inputChat != null) { InBattleInputChat.InBatChatEntity ent = inputChat.ConstructEnt(this.m_inCDTxt, InBattleInputChat.InBatChatEntity.EType.System); inputChat.Add(ent); } this.intimeSendCount = 0; return; } } else { this.intimeSendCount = 0; } } InBattleInputChat inputChat2 = Singleton <InBattleMsgMgr> .instance.m_InputChat; if (inputChat2 == null) { return; } if (string.IsNullOrEmpty(content)) { return; } content = CUIUtility.RemoveEmoji(content); if (this.m_inputText != null) { this.m_inputText.CustomSetActive(false); } SLevelContext curLvelContext = Singleton <BattleLogic> .instance.GetCurLvelContext(); if (curLvelContext != null && !Singleton <InBattleMsgMgr> .instance.ShouldBeThroughNet(curLvelContext)) { InBattleInputChat inputChat3 = Singleton <InBattleMsgMgr> .instance.m_InputChat; if (inputChat3 != null) { InBattleInputChat.InBatChatEntity ent2 = inputChat3.ConstructEnt(this.m_inWramBattle, InBattleInputChat.InBatChatEntity.EType.System); inputChat3.Add(ent2); } } else if (!string.IsNullOrEmpty(content)) { InBattleMsgNetCore.SendInBattleMsg_InputChat(content, (byte)inputChat2.m_curChatCamp); } if (this.intimeSendCount == 0) { this.intimeMSecond_StartTime = Singleton <FrameSynchr> .GetInstance().LogicFrameTick; } this.intimeSendCount++; }