//------------------------------------------------------------------------- // 桌子内聊天广播 public void desktopChat(ChatMsgRecv msg_rev) { //ChatInfo chat_info //if (SceneActorObj != null) //{ // SceneActorObj.setChatInfo(chat_info); //} }
//--------------------------------------------------------------------- // 好友聊天 async Task ICellPlayerProxy.s2sRecvChatFromFriend(ChatMsgRecv msg_recv) { CouchbaseQueData que_data = new CouchbaseQueData(); que_data.seq = 0; que_data.type = (int)CouchbaseQueDataType.RecvChatFromFriend; que_data.map_data = new Dictionary <string, string>(); que_data.map_data["msg_recv"] = EbTool.jsonSerialize(msg_recv); await CouchbaseQue.pushData(que_data); }
//------------------------------------------------------------------------- // 添加好友聊天消息记录 public void addFriendMsgRecord(ChatMsgRecv msg) { string friend_etguid = ""; ChatMsgRecord record = new ChatMsgRecord(); if (msg.et_player_guid_send == Entity.Guid) { record.is_me = true; friend_etguid = msg.et_player_guid_recv; } else { record.is_me = false; friend_etguid = msg.et_player_guid_send; } record.content = msg.content; record.dt = msg.dt; List <ChatMsgRecord> list_record = null; MapMsgRecord.TryGetValue(friend_etguid, out list_record); if (list_record == null) { list_record = new List <ChatMsgRecord>(); MapMsgRecord[friend_etguid] = list_record; } list_record.Add(record); if (list_record.Count > 1000) { list_record.RemoveAt(0); } //UiMbChatMsg chat_msg = UiMgr.Instance.getCurrentUi<UiMbChatMsg>(); //if (chat_msg != null) //{ // chat_msg.setCurrentChatMsg(record, msg.et_player_guid_send); //} }
//------------------------------------------------------------------------- // 玩家桌内聊天通知 public void onRecvChatFromDesktop(ChatMsgRecv msg_recv) { }
//--------------------------------------------------------------------- // 桌子内聊天广播 Task ICellDesktop.s2sDesktopChat(ChatMsgRecv msg) { var co_desktop = EtDesktop.getComponent <CellDesktop <DefDesktop> >(); return(co_desktop.s2sDesktopChat(msg)); }