예제 #1
0
 private void _onPacketArrived(Int32 _stream_id, PacketType _packet_type, GC_ChatMsg _msg)
 {
     switch ((EChatType)_msg.ChatType)
     {
     case EChatType.CHAT_HALL:
     case EChatType.CHAT_ROOM:
     case EChatType.CHAT_CLUB:
     case EChatType.CHAT_TRADE:
     {
         if (ChatInfo.ContainsKey(_msg.ChatType))
         {
             if (ChatInfo[_msg.ChatType].Count >= MaxChatCount)
             {
                 ChatInfo[_msg.ChatType].RemoveFirst();
             }
             ChatInfo[_msg.ChatType].AddLast(_msg);
         }
         else
         {
             LinkedList <GC_ChatMsg> chats = new LinkedList <GC_ChatMsg>();
             chats.AddLast(_msg);
             ChatInfo.Add(_msg.ChatType, chats);
         }
         SignalSystem.FireSignal(SignalId.Chat_ReceiveChat, _msg);
     }
     break;
     }
 }
예제 #2
0
파일: UI_Chat.cs 프로젝트: vic910/ChessSoul
    private void _addChat(GC_ChatMsg _data)
    {
        eChatTarget    type   = eChatTarget.eChatTarget_other;
        PlayerInfoBase player = null;

        if (_data.PlayerID == MainPlayer.Instance.PlayerInfo.PlayerID)
        {
            type   = eChatTarget.eChatTarget_mine;
            player = MainPlayer.Instance.PlayerInfo;
        }
        else
        {
            type   = eChatTarget.eChatTarget_other;
            player = LobbySystem.Instance.GetPlayerInfo(_data.PlayerID);
        }
        _addChat(type, player.PlayerName, player.Level, _data.Chat);
    }
예제 #3
0
파일: UI_Chat.cs 프로젝트: vic910/ChessSoul
    private void _receivePlayerChat(SignalId _signal_id, SignalParameters _parameters)
    {
        GC_ChatMsg data = _parameters[0] as GC_ChatMsg;

        _addChat(data);
    }