Example #1
0
    public void SendWordMessage(string content, int sysType, OpenWhichChat type)//systype (文字 图片 语音) fromType(0 世界 1 公会 2组队等)
    {
        if (modulePlayer.BanChat == 2)
        {
            moduleGlobal.ShowMessage(630, 0);
            return;
        }
        if (type == OpenWhichChat.WorldChat)
        {
            moduleChat.CanChatWord = false;
            var b = moduleChat.SetWorldSend(content, sysType);
            if (word_chat_mes.Count > ChatNum)
            {
                word_chat_mes.Dequeue();
            }

            word_chat_mes.Enqueue(b);

            CsChatRoomMessage p = SetWorldSession(content, sysType);
            Send(p);
        }
        else if (type == OpenWhichChat.UnionChat)
        {
            var b = moduleChat.SetUnionSend(content, sysType);
            if (m_unionChat.Count > ChatNum)
            {
                word_chat_mes.Dequeue();
            }
            m_unionChat.Enqueue(b);

            CsChatGroup p = SetUnionSession(content, sysType);
            Send(p);
        }
    }
Example #2
0
    private CsChatGroup SetUnionSession(string content, int sysType)//systype (文字 图片 语音) 工会聊天
    {
        CsChatGroup p = PacketObject.Create <CsChatGroup>();

        p.groupId = modulePlayer.roleInfo.leagueID;
        p.type    = (sbyte)sysType;
        p.tag     = ChatTag();
        p.content = content;
        return(p);
    }