Ejemplo n.º 1
0
        public void AddSpeakerArray(CS_HORN_TYPE type, COMDT_CHAT_MSG_HORN[] astMsgInfo, uint len)
        {
            ListView <COMDT_CHAT_MSG_HORN> listView = this.GetSpeakerList(type);
            int lastSpeakerBeginSec = (int)this.GetLastSpeakerBeginSec(type);
            int num = 0;

            while ((long)num < (long)((ulong)len))
            {
                if (lastSpeakerBeginSec < (int)astMsgInfo[num].dwBeginShowSec)
                {
                    listView.Add(astMsgInfo[num]);
                    Singleton <CChatController> .get_instance().model.Add_Palyer_Info(astMsgInfo[num].stFrom);

                    if (type == null)
                    {
                        bool flag = astMsgInfo[num].stFrom.ullUid == Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID;

                        if (Singleton <CChatController> .get_instance().view != null)
                        {
                            Singleton <CChatController> .get_instance().view.bRefreshNew = (!Singleton <CChatController> .get_instance().view.IsCheckHistory() || flag);
                        }
                        CChatEntity chatEnt = CChatUT.Build_4_Speaker(astMsgInfo[num]);
                        Singleton <CChatController> .get_instance().model.channelMgr.Add_ChatEntity(chatEnt, EChatChannel.Lobby, 0uL, 0u);

                        this.m_lastSpeakerBeginSec = Math.Max(astMsgInfo[num].dwBeginShowSec, this.m_lastSpeakerBeginSec);
                    }
                    else
                    {
                        this.m_lastLoudSpeakerBeginSec = Math.Max(astMsgInfo[num].dwBeginShowSec, this.m_lastLoudSpeakerBeginSec);
                    }
                }
                num++;
            }
            if (len > 0u)
            {
                COMDT_CHAT_MSG_HORN cOMDT_CHAT_MSG_HORN = astMsgInfo[0];
                if (type == null)
                {
                    this.OnSpeakerNodeOpen();
                }
                else if (type == 1)
                {
                    this.OnLoudSpeakerTipsOpen();
                }
            }
        }
Ejemplo n.º 2
0
        public static CChatEntity Build_4_Time(int curSec)
        {
            CChatEntity cChatEntity = new CChatEntity();
            DateTime    dateTime    = Utility.ToUtcTime2Local((long)curSec);

            cChatEntity.ullUid        = 0uL;
            cChatEntity.iLogicWorldID = 0u;
            cChatEntity.text          = string.Format("{0}/{1}/{2}  {3}", new object[]
            {
                dateTime.get_Year(),
                dateTime.get_Month(),
                dateTime.get_Day(),
                dateTime.get_TimeOfDay().ToString()
            });
            cChatEntity.type = EChaterType.Time;
            return(cChatEntity);
        }
Ejemplo n.º 3
0
        public static void FakeSendChat(string content)
        {
            Assets.Scripts.GameSystem.RoomInfo roomInfo = Singleton <CRoomSystem> .GetInstance().roomInfo;

            DebugHelper.Assert(roomInfo != null);
            CChatEntity chatEnt = new CChatEntity {
                ullUid        = roomInfo.selfInfo.ullUid,
                iLogicWorldID = (uint)roomInfo.selfInfo.iLogicWorldId,
                type          = EChaterType.Self,
                text          = content
            };

            CChatUT.GetUser(chatEnt.type, chatEnt.ullUid, chatEnt.iLogicWorldID, out chatEnt.name, out chatEnt.level, out chatEnt.head_url, out chatEnt.stGameVip);
            Singleton <CChatController> .instance.model.channelMgr.Add_ChatEntity(chatEnt, EChatChannel.Select_Hero, 0L, 0);

            Singleton <EventRouter> .instance.BroadCastEvent("Chat_HeorSelectChatData_Change");
        }
Ejemplo n.º 4
0
        public void AddSpeakerArray(CS_HORN_TYPE type, COMDT_CHAT_MSG_HORN[] astMsgInfo, uint len)
        {
            ListView <COMDT_CHAT_MSG_HORN> speakerList = this.GetSpeakerList(type);
            int lastSpeakerBeginSec = (int)this.GetLastSpeakerBeginSec(type);

            for (int i = 0; i < len; i++)
            {
                if (lastSpeakerBeginSec < astMsgInfo[i].dwBeginShowSec)
                {
                    speakerList.Add(astMsgInfo[i]);
                    Singleton <CChatController> .instance.model.Add_Palyer_Info(astMsgInfo[i].stFrom);

                    if (type == CS_HORN_TYPE.CS_HORNTYPE_SMALL)
                    {
                        bool flag = astMsgInfo[i].stFrom.ullUid == Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID;

                        if (Singleton <CChatController> .instance.view != null)
                        {
                            Singleton <CChatController> .instance.view.bRefreshNew = !Singleton <CChatController> .instance.view.IsCheckHistory() || flag;
                        }
                        CChatEntity chatEnt = CChatUT.Build_4_Speaker(astMsgInfo[i]);
                        Singleton <CChatController> .instance.model.channelMgr.Add_ChatEntity(chatEnt, EChatChannel.Lobby, 0L, 0);

                        this.m_lastSpeakerBeginSec = Math.Max(astMsgInfo[i].dwBeginShowSec, this.m_lastSpeakerBeginSec);
                    }
                    else
                    {
                        this.m_lastLoudSpeakerBeginSec = Math.Max(astMsgInfo[i].dwBeginShowSec, this.m_lastLoudSpeakerBeginSec);
                    }
                }
            }
            if (len > 0)
            {
                COMDT_CHAT_MSG_HORN comdt_chat_msg_horn = astMsgInfo[0];
                if (type == CS_HORN_TYPE.CS_HORNTYPE_SMALL)
                {
                    this.OnSpeakerNodeOpen();
                }
                else if (type == CS_HORN_TYPE.CS_HORNTYPE_BIGER)
                {
                    this.OnLoudSpeakerTipsOpen();
                }
            }
        }
Ejemplo n.º 5
0
 public void Add(CChatEntity ent)
 {
     if (ent != null)
     {
         if (ent.type == EChaterType.Time)
         {
             this.unread_time_entity_count++;
         }
         this.list.Add(ent);
         if (this.list.Count > CChatController.MaxCount)
         {
             this.list.RemoveRange(0, this.list.Count - CChatController.MaxCount);
         }
         if (this.IsMeanbleChatEnt(ent))
         {
             this.unread_count++;
             ent.bHasReaded = false;
         }
     }
 }
Ejemplo n.º 6
0
        public static string Build_4_ChatEntry(bool bFriend, CChatEntity ent)
        {
            string str = !bFriend ? Singleton <CTextManager> .instance.GetText("chat_title_total") : Singleton <CTextManager> .instance.GetText("chat_title_friend");

            if (bFriend)
            {
                COMDT_FRIEND_INFO gameOrSnsFriend = Singleton <CFriendContoller> .GetInstance().model.GetGameOrSnsFriend(ent.ullUid, ent.iLogicWorldID);

                if (gameOrSnsFriend != null)
                {
                    str = str + ColorString(0, UT.Bytes2String(gameOrSnsFriend.szUserName)) + ":" + ent.text;
                }
                return(str);
            }
            COMDT_CHAT_PLAYER_INFO comdt_chat_player_info = Singleton <CChatController> .GetInstance().model.Get_Palyer_Info(ent.ullUid, ent.iLogicWorldID);

            if ((str != null) && (comdt_chat_player_info != null))
            {
                str = str + ColorString(0, UT.Bytes2String(comdt_chat_player_info.szName)) + ":" + ent.text;
            }
            return(str);
        }
Ejemplo n.º 7
0
        public void Add_ChatEntity(CChatEntity chatEnt, EChatChannel type, ulong ullUid = 0, uint dwLogicWorldId = 0)
        {
            CChatChannel channel = this._getChannel(type, ullUid, dwLogicWorldId);

            if (channel == null)
            {
                channel = this.CreateChannel(type, ullUid, dwLogicWorldId);
            }
            if (chatEnt.type != EChaterType.System)
            {
                Singleton <CChatController> .instance.view.ChatParser.bProc_ChatEntry = false;
                Singleton <CChatController> .instance.view.ChatParser.maxWidth        = CChatParser.chat_list_max_width;
                Singleton <CChatController> .instance.view.ChatParser.Parse(chatEnt.text, CChatParser.start_x, chatEnt);
            }
            CChatEntity last = channel.GetLast();

            if (((last != null) && (last.time != 0)) && ((chatEnt.time - last.time) > 60))
            {
                channel.Add(CChatUT.Build_4_Time());
            }
            channel.Add(chatEnt);
        }
Ejemplo n.º 8
0
        public void AddSpeakerArray(CS_HORN_TYPE type, COMDT_CHAT_MSG_HORN[] astMsgInfo, uint len)
        {
            ListView <COMDT_CHAT_MSG_HORN> speakerList = this.GetSpeakerList(type);
            int lastSpeakerIndex = (int)this.GetLastSpeakerIndex(type);

            if (lastSpeakerIndex == 0)
            {
                lastSpeakerIndex = -1;
            }
            for (int i = 0; i < len; i++)
            {
                if (lastSpeakerIndex < astMsgInfo[i].dwMsgIdx)
                {
                    speakerList.Add(astMsgInfo[i]);
                    Singleton <CChatController> .instance.model.Add_Palyer_Info(astMsgInfo[i].stFrom);

                    CChatEntity chatEnt = (type != CS_HORN_TYPE.CS_HORNTYPE_SMALL) ? CChatUT.Build_4_LoudSpeaker(astMsgInfo[i]) : CChatUT.Build_4_Speaker(astMsgInfo[i]);
                    Singleton <CChatController> .instance.model.channelMgr.Add_ChatEntity(chatEnt, EChatChannel.Lobby, 0L, 0);

                    if (type == CS_HORN_TYPE.CS_HORNTYPE_SMALL)
                    {
                        this.m_speakerIndex = astMsgInfo[i].dwMsgIdx;
                    }
                    else
                    {
                        this.m_loudSpeakerIndex = astMsgInfo[i].dwMsgIdx;
                    }
                }
            }
            if ((type == CS_HORN_TYPE.CS_HORNTYPE_SMALL) && (len > 0))
            {
                this.OnSpeakerNodeOpen();
            }
            if ((type == CS_HORN_TYPE.CS_HORNTYPE_BIGER) && (len > 0))
            {
                this.OnLoudSpeakerTipsOpen(null);
            }
        }
Ejemplo n.º 9
0
        public static void FakeSendChat(string content)
        {
            try
            {
                RoomInfo roomInfo = Singleton <CRoomSystem> .GetInstance().roomInfo;

                DebugHelper.Assert(roomInfo != null);
                CChatEntity chatEnt = new CChatEntity {
                    ullUid        = roomInfo.selfInfo.ullUid,
                    iLogicWorldID = (uint)roomInfo.selfInfo.iLogicWorldId,
                    type          = EChaterType.Self,
                    text          = content
                };
                CChatUT.GetUser(chatEnt.type, chatEnt.ullUid, chatEnt.iLogicWorldID, out chatEnt.name, out chatEnt.level, out chatEnt.head_url, out chatEnt.stGameVip);
                Singleton <CChatController> .instance.model.channelMgr.Add_ChatEntity(chatEnt, EChatChannel.Select_Hero, 0L, 0);

                Singleton <EventRouter> .instance.BroadCastEvent("Chat_HeorSelectChatData_Change");
            }
            catch (Exception exception)
            {
                object[] inParameters = new object[] { exception.Message };
                DebugHelper.Assert(false, "Fake Send Chat, {0}", inParameters);
            }
        }
Ejemplo n.º 10
0
        public void Add_ChatEntity(CChatEntity chatEnt, EChatChannel type, ulong ullUid = 0uL, uint dwLogicWorldId = 0u)
        {
            CChatChannel cChatChannel = this._getChannel(type, ullUid, dwLogicWorldId);

            if (cChatChannel == null)
            {
                cChatChannel = this.CreateChannel(type, ullUid, dwLogicWorldId);
            }
            if (chatEnt.type != EChaterType.System || chatEnt.type != EChaterType.OfflineInfo)
            {
                if (Singleton <CChatController> .instance.view.ChatParser != null)
                {
                    Singleton <CChatController> .instance.view.ChatParser.bProc_ChatEntry = false;
                    if (type == EChatChannel.Guild)
                    {
                        Singleton <CChatController> .instance.view.ChatParser.maxWidth = CChatParser.chat_guild_list_max_width;
                    }
                    else
                    {
                        Singleton <CChatController> .instance.view.ChatParser.maxWidth = CChatParser.chat_list_max_width;
                    }
                    Singleton <CChatController> .instance.view.ChatParser.Parse(chatEnt.text, CChatParser.start_x, chatEnt);
                }
                else
                {
                    DebugHelper.Assert(false, "CChatController.instance.view.ChatParser = null! StackTrace = " + new StackTrace().ToString());
                }
            }
            CChatEntity last = cChatChannel.GetLast();

            if (last != null && last.time != 0 && chatEnt.time - last.time > 60)
            {
                cChatChannel.Add(CChatUT.Build_4_Time());
            }
            cChatChannel.Add(chatEnt);
        }
Ejemplo n.º 11
0
        public static string Build_4_ChatEntry(bool bFriend, CChatEntity ent)
        {
            string text = bFriend ? Singleton <CTextManager> .instance.GetText("chat_title_friend") : Singleton <CTextManager> .instance.GetText("chat_title_total");

            if (bFriend)
            {
                COMDT_FRIEND_INFO gameOrSnsFriend = Singleton <CFriendContoller> .GetInstance().model.GetGameOrSnsFriend(ent.ullUid, ent.iLogicWorldID);

                if (gameOrSnsFriend != null)
                {
                    text = text + CChatUT.ColorString(0u, UT.Bytes2String(gameOrSnsFriend.szUserName)) + ":" + ent.text;
                }
            }
            else
            {
                COMDT_CHAT_PLAYER_INFO cOMDT_CHAT_PLAYER_INFO = Singleton <CChatController> .GetInstance().model.Get_Palyer_Info(ent.ullUid, ent.iLogicWorldID);

                if (text != null && cOMDT_CHAT_PLAYER_INFO != null)
                {
                    text = text + CChatUT.ColorString(0u, UT.Bytes2String(cOMDT_CHAT_PLAYER_INFO.szName)) + ":" + ent.text;
                }
            }
            return(text);
        }
Ejemplo n.º 12
0
        private void On_Rolling_SystemChatInfoReceived(string content)
        {
            CChatEntity chatEnt = CChatUT.Build_4_System(content);

            this.model.channelMgr.Add_ChatEntity(chatEnt, EChatChannel.Lobby, 0L, 0);
        }
Ejemplo n.º 13
0
 public void Add_CurChatFriend(CChatEntity chatEnt)
 {
     DebugHelper.Assert(Singleton <CChatController> .instance.model.sysData.ullUid != 0uL && Singleton <CChatController> .instance.model.sysData.dwLogicWorldId != 0u);
     this.Add_ChatEntity(chatEnt, EChatChannel.Friend, Singleton <CChatController> .instance.model.sysData.ullUid, Singleton <CChatController> .instance.model.sysData.dwLogicWorldId);
 }
Ejemplo n.º 14
0
 public bool IsMeanbleChatEnt(CChatEntity ent)
 {
     return(ent.type != EChaterType.System && ent.type != EChaterType.Time && ent.type != EChaterType.OfflineInfo && ent.type != EChaterType.LeaveRoom);
 }
Ejemplo n.º 15
0
 public void Add_2_Guild_Tab(CChatEntity ent)
 {
     this.channelMgr.Add_ChatEntity(ent, EChatChannel.Guild, 0L, 0);
 }
Ejemplo n.º 16
0
 public bool IsMeanbleChatEnt(CChatEntity ent)
 {
     return(((ent.type != EChaterType.System) && (ent.type != EChaterType.Time)) && (ent.type != EChaterType.OfflineInfo));
 }
Ejemplo n.º 17
0
 public void Add_2_Lobby_Tab(CChatEntity ent)
 {
     this.channelMgr.Add_ChatEntity(ent, EChatChannel.Lobby, 0L, 0);
 }
Ejemplo n.º 18
0
        private void On_Chat_GetMsg_NTF(CSPkg msg)
        {
            SCPKG_CMD_CHAT_NTF stChatNtf = msg.stPkgData.stChatNtf;

            if (stChatNtf.dwTimeStamp != 0)
            {
                Singleton <CChatController> .GetInstance().model.SetTimeStamp(EChatChannel.Lobby, stChatNtf.dwTimeStamp);
            }
            Singleton <CChatController> .GetInstance().model.SetRestFreeCnt(EChatChannel.Lobby, stChatNtf.dwRestChatFreeCnt);

            int num = Mathf.Min(stChatNtf.astChatMsg.Length, stChatNtf.bMsgCnt);

            if (num == 0)
            {
                this.cur_chatTimer_totalTime += step_time;
                if (this.cur_chatTimer_totalTime >= max_ChatTime)
                {
                    this.cur_chatTimer_totalTime = max_ChatTime;
                }
                Singleton <CTimerManager> .instance.ResetTimerTotalTime(this.chatTimer, this.cur_chatTimer_totalTime * 0x3e8);
            }
            else
            {
                this.cur_chatTimer_totalTime = init_chatTime;
                Singleton <CTimerManager> .instance.ResetTimerTotalTime(this.chatTimer, this.cur_chatTimer_totalTime * 0x3e8);

                bool flag  = false;
                bool flag2 = false;
                bool flag3 = false;
                bool flag4 = false;
                bool flag5 = false;
                for (int i = num - 1; i >= 0; i--)
                {
                    COMDT_CHAT_MSG comdt_chat_msg = stChatNtf.astChatMsg[i];
                    if (CChatUT.Convert_ChatMsgType_Channel(comdt_chat_msg.bType) == EChatChannel.Friend)
                    {
                        COMDT_CHAT_PLAYER_INFO stFrom  = comdt_chat_msg.stContent.stPrivate.stFrom;
                        CChatEntity            chatEnt = null;
                        if (stFrom.ullUid == Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID)
                        {
                            string content = UT.Bytes2String(comdt_chat_msg.stContent.stPrivate.szContent);
                            chatEnt = CChatUT.Build_4_Self(content);
                            this.model.channelMgr.Add_CurChatFriend(chatEnt);
                            string a = string.Format(fmt, Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().Name, content);
                            this.model.sysData.Add_NewContent_Entry(a, EChatChannel.Friend);
                            Singleton <EventRouter> .GetInstance().BroadCastEvent("Chat_FriendChatData_Change");

                            Singleton <EventRouter> .GetInstance().BroadCastEvent("Chat_ChatEntry_Change");

                            flag = true;
                        }
                        else
                        {
                            string rawText = UT.Bytes2String(comdt_chat_msg.stContent.stPrivate.szContent);
                            chatEnt = CChatUT.Build_4_Friend(comdt_chat_msg.stContent.stPrivate);
                            this.model.channelMgr.Add_ChatEntity(chatEnt, EChatChannel.Friend, stFrom.ullUid, (uint)stFrom.iLogicWorldID);
                            string str4 = CChatUT.Build_4_EntryString(EChatChannel.Friend, stFrom.ullUid, (uint)stFrom.iLogicWorldID, rawText);
                            this.model.sysData.Add_NewContent_Entry(str4, EChatChannel.Friend);
                            this.model.sysData.LastChannel = EChatChannel.Friend;
                            flag = true;
                        }
                    }
                    else if (CChatUT.Convert_ChatMsgType_Channel(comdt_chat_msg.bType) == EChatChannel.Lobby)
                    {
                        if (this.view != null)
                        {
                            this.view.bRefreshNew = !this.view.IsCheckHistory();
                        }
                        COMDT_CHAT_PLAYER_INFO comdt_chat_player_info2 = comdt_chat_msg.stContent.stLogicWord.stFrom;
                        this.model.Add_Palyer_Info(comdt_chat_msg.stContent.stLogicWord.stFrom);
                        CChatEntity entity2 = CChatUT.Build_4_Lobby(comdt_chat_msg.stContent.stLogicWord);
                        if (comdt_chat_player_info2.ullUid == Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID)
                        {
                            entity2.type = EChaterType.Self;
                        }
                        this.model.channelMgr.Add_ChatEntity(entity2, EChatChannel.Lobby, 0L, 0);
                        string str5 = UT.Bytes2String(comdt_chat_msg.stContent.stLogicWord.szContent);
                        string str6 = CChatUT.Build_4_EntryString(EChatChannel.Lobby, comdt_chat_player_info2.ullUid, (uint)comdt_chat_player_info2.iLogicWorldID, str5);
                        this.model.sysData.Add_NewContent_Entry(str6, EChatChannel.Lobby);
                        this.model.sysData.LastChannel = EChatChannel.Lobby;
                        flag2 = true;
                    }
                    else if (CChatUT.Convert_ChatMsgType_Channel(comdt_chat_msg.bType) == EChatChannel.Guild)
                    {
                        COMDT_CHAT_PLAYER_INFO comdt_chat_player_info3 = comdt_chat_msg.stContent.stGuild.stFrom;
                        this.model.Add_Palyer_Info(comdt_chat_msg.stContent.stGuild.stFrom);
                        CChatEntity entity3 = CChatUT.Build_4_Guild(comdt_chat_msg.stContent.stGuild);
                        if (comdt_chat_player_info3.ullUid == Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID)
                        {
                            entity3.type = EChaterType.Self;
                        }
                        this.model.channelMgr.Add_ChatEntity(entity3, EChatChannel.Guild, 0L, 0);
                        string str7 = UT.Bytes2String(comdt_chat_msg.stContent.stGuild.szContent);
                        string str8 = CChatUT.Build_4_EntryString(EChatChannel.Guild, comdt_chat_player_info3.ullUid, (uint)comdt_chat_player_info3.iLogicWorldID, str7);
                        this.model.sysData.Add_NewContent_Entry(str8, EChatChannel.Guild);
                        this.model.sysData.LastChannel = EChatChannel.Guild;
                        flag4 = true;
                    }
                    else if (CChatUT.Convert_ChatMsgType_Channel(comdt_chat_msg.bType) == EChatChannel.Room)
                    {
                        COMDT_CHAT_PLAYER_INFO info = comdt_chat_msg.stContent.stRoom.stFrom;
                        this.model.Add_Palyer_Info(info);
                        CChatEntity entity4 = CChatUT.Build_4_Room(comdt_chat_msg.stContent.stRoom);
                        if (info.ullUid == Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID)
                        {
                            entity4.type = EChaterType.Self;
                        }
                        this.model.channelMgr.Add_ChatEntity(entity4, EChatChannel.Room, 0L, 0);
                        string str9  = UT.Bytes2String(comdt_chat_msg.stContent.stRoom.szContent);
                        string str10 = CChatUT.Build_4_EntryString(EChatChannel.Room, info.ullUid, (uint)info.iLogicWorldID, str9);
                        this.model.sysData.Add_NewContent_Entry(str10, EChatChannel.Room);
                        flag3 = true;
                        Singleton <EventRouter> .GetInstance().BroadCastEvent("Chat_RoomChatData_Change");
                    }
                    else if (CChatUT.Convert_ChatMsgType_Channel(comdt_chat_msg.bType) == EChatChannel.Select_Hero)
                    {
                        COMDT_CHAT_PLAYER_INFO comdt_chat_player_info5 = comdt_chat_msg.stContent.stBattle.stFrom;
                        this.model.Add_Palyer_Info(comdt_chat_msg.stContent.stBattle.stFrom);
                        CChatEntity entity5 = CChatUT.Build_4_SelectHero(comdt_chat_msg.stContent.stBattle);
                        this.model.channelMgr.Add_ChatEntity(entity5, EChatChannel.Select_Hero, 0L, 0);
                        Singleton <EventRouter> .instance.BroadCastEvent("Chat_HeorSelectChatData_Change");
                    }
                    else if (CChatUT.Convert_ChatMsgType_Channel(comdt_chat_msg.bType) == EChatChannel.Team)
                    {
                        COMDT_CHAT_PLAYER_INFO comdt_chat_player_info6 = comdt_chat_msg.stContent.stTeam.stFrom;
                        this.model.Add_Palyer_Info(comdt_chat_msg.stContent.stTeam.stFrom);
                        CChatEntity entity6 = CChatUT.Build_4_Team(comdt_chat_msg.stContent.stTeam);
                        if (comdt_chat_player_info6.ullUid == Singleton <CRoleInfoManager> .GetInstance().GetMasterRoleInfo().playerUllUID)
                        {
                            entity6.type = EChaterType.Self;
                        }
                        this.model.channelMgr.Add_ChatEntity(entity6, EChatChannel.Team, 0L, 0);
                        string str11 = UT.Bytes2String(comdt_chat_msg.stContent.stTeam.szContent);
                        string str12 = CChatUT.Build_4_EntryString(EChatChannel.Team, comdt_chat_player_info6.ullUid, (uint)comdt_chat_player_info6.iLogicWorldID, str11);
                        this.model.sysData.Add_NewContent_Entry(str12, EChatChannel.Team);
                        this.model.sysData.LastChannel = EChatChannel.Team;
                        flag5 = true;
                        Singleton <EventRouter> .instance.BroadCastEvent("Chat_TeamChat_Change");
                    }
                    else if (comdt_chat_msg.bType == 7)
                    {
                        Singleton <InBattleMsgMgr> .instance.Handle_InBattleMsg_Ntf(comdt_chat_msg.stContent.stInBattle);
                    }
                }
                if (flag2)
                {
                    Singleton <EventRouter> .GetInstance().BroadCastEvent("Chat_LobbyChatData_Change");
                }
                if (flag)
                {
                    Singleton <EventRouter> .GetInstance().BroadCastEvent("Chat_FriendChatData_Change");
                }
                if (flag4)
                {
                    Singleton <EventRouter> .GetInstance().BroadCastEvent("Chat_GuildChatData_Change");
                }
                if (((flag2 || flag) || flag4) && (this.model.channelMgr.ChatTab == CChatChannelMgr.EChatTab.Normal))
                {
                    Singleton <EventRouter> .GetInstance().BroadCastEvent("Chat_ChatEntry_Change");
                }
                if (flag3 && (this.model.channelMgr.ChatTab == CChatChannelMgr.EChatTab.Room))
                {
                    Singleton <EventRouter> .GetInstance().BroadCastEvent("Chat_ChatEntry_Change");
                }
                if (((flag2 || flag) || flag5) && (this.model.channelMgr.ChatTab == CChatChannelMgr.EChatTab.Team))
                {
                    Singleton <EventRouter> .GetInstance().BroadCastEvent("Chat_ChatEntry_Change");
                }
            }
        }