Ejemplo n.º 1
0
    public void ExecuteChatCmd(GameCmd.stWildChannelCommonChatUserCmd_CS cmd)
    {
        if (!ChatDataManager.CanRecieveChatMsgWithBlack(cmd.dwOPDes))
        {
            return;
        }
        if (cmd.byChatType == GameCmd.CHATTYPE.CHAT_SYS)
        {
            if ((cmd.byChatPos & (uint)GameCmd.ChatPos.ChatPos_Tips) == (uint)GameCmd.ChatPos.ChatPos_Tips)
            {
                TipsManager.Instance.ShowTips(cmd.szInfo);
            }

            if ((cmd.byChatPos & (uint)GameCmd.ChatPos.ChatPos_Sys_chat) == (uint)GameCmd.ChatPos.ChatPos_Sys_chat)
            {
                DataManager.Manager <ChatDataManager>().PrivateChatManager.AddChat(new GameCmd.stCommonMChatUserCmd_CS()
                {
                    szInfo     = cmd.szInfo,
                    byChatType = CHATTYPE.CHAT_SYS,
                    dwOPDes    = 0,
                    szOPDes    = "系统",
                });
                return;
            }
        }

        ChatChannel channel = DataManager.Manager <ChatDataManager>().GetChannelByType(cmd.byChatType);

        if (channel != null)
        {
            channel.Add(channel.ToChatInfo(cmd));
        }

        if ((GameCmd.ChatPos)cmd.byChatPos == GameCmd.ChatPos.ChatPos_Gm ||
            (GameCmd.ChatPos)cmd.byChatPos == GameCmd.ChatPos.ChatPos_Important)
        {
            ShowRunlight(cmd.szInfo, RunLightInfo.Pos.Top);
        }
        //下走马灯 不显示
        if ((GameCmd.ChatPos)cmd.byChatPos == GameCmd.ChatPos.ChatPos_Sys &&
            DataManager.Manager <ChatDataManager>().SimpleChannelContain(CHATTYPE.CHAT_SYS))
        {
            ShowRunlight(cmd.szInfo, RunLightInfo.Pos.Bottom);
        }
    }
Ejemplo n.º 2
0
 public ChatInfo ToChatInfo(GameCmd.stWildChannelCommonChatUserCmd_CS cmd)
 {
     return(ToChatInfo(cmd.dwOPDes, cmd.szInfo, cmd.name, (uint)cmd.profession, cmd.voiceFildId, cmd.voiceLength));
 }