Exemple #1
0
    public void     OnReceiveChatMessage(int node, PacketId id, byte[] data)
    {
        Debug.Log("OnReceiveChatMessage");

        ChatPacket  packet = new ChatPacket(data);
        ChatMessage chat   = packet.GetPacket();

        Debug.Log("[CharId]" + chat.characterId);
        Debug.Log("[CharMsg]" + chat.message);


        chrController controller = findPlayer(chat.characterId);

        // 채팅 메시지 표시 쿼리 발행.
        if (controller != null)
        {
            QueryTalk talk = queryTalk(chat.characterId, chat.message, false);
            if (talk != null)
            {
                talk.set_done(true);
                talk.set_success(true);
            }
        }
    }
Exemple #2
0
    public void     OnReceiveChatMessage(PacketId id, byte[] data)
    {
        Debug.Log("OnReceiveChatMessage");

        ChatPacket  packet = new ChatPacket(data);
        ChatMessage chat   = packet.GetPacket();

        Debug.Log("{CharId]" + chat.characterId);
        Debug.Log("[CharMsg]" + chat.message);

        chrController remote =
            CharacterRoot.get().findCharacter(chat.characterId);

        // 채팅 메시지 표시 쿼리 발행.
        if (remote != null)
        {
            QueryTalk talk = remote.cmdQueryTalk(chat.message);
            if (talk != null)
            {
                talk.set_done(true);
                talk.set_success(true);
            }
        }
    }