示例#1
0
    void OnSendMessage(H2C.SendMessage packet)
    {
        if (IsConnected == false)
        {
            return;
        }

        if (packet.msg_type == pe_MsgType.Normal && IsListenChannel == false)
        {
            return;
        }
        if (packet.msg_type == pe_MsgType.Guild && IsListenGuild == false)
        {
            return;
        }
        if (packet.msg_type == pe_MsgType.RecvWhisper && isListenWhisper == false)
        {
            return;
        }
        if (packet.msg_type == pe_MsgType.Yell && IsListenYell == false)
        {
            return;
        }

        ChatLine line = new ChatLine(packet);

        ChatLineManager.Instance.AddLine(line);

        m_ChatLabelCallback(line);
    }
示例#2
0
    public ChatLine(H2C.SendMessage message)
    {
        Msg = MakeMessage(message.msg_type, message.nickname, message.message);

        LineType   = message.msg_type;
        AccountIdx = message.account_idx;
        Nickname   = message.nickname;
        Level      = message.level;
        RecvAt     = message.recv_at;
        HubType    = pe_HubType.SmallHeroChat;
    }