//初始化接收频道设置信息 private void InitReceiveChannelSet() { // //刚打开时默认为选择综合接收频道 // recChatTypeDic [(byte)ChatType.ZongHe] = true; // recChatTypeDic [(byte)ChatType.ZhenYing] = true; // recChatTypeDic [(byte)ChatType.SiLiao] = true; //从本地读取接收频道的设置信息 ckb_rec_channel_zhenying_set.startsActive = (LocalVarManager.GetInt(LocalVarManager.CHAT_REC_ZH_CHANNEL, 0) == (int)ReceiveState.REJECT ? false : true); ckb_rec_channel_zonghe_set.startsActive = (LocalVarManager.GetInt(LocalVarManager.CHAT_REC_ZY_CHANNEL, 0) == (int)ReceiveState.REJECT ? false : true); ckb_rec_channel_siliao_set.startsActive = (LocalVarManager.GetInt(LocalVarManager.CHAT_REC_SL_CHANNEL, 0) == (int)ReceiveState.REJECT ? false : true); }
//聊天内容推送 private void Fun_10_3(INetData data) { ChatContentPushMsg_10_3 recChatMsg = new ChatContentPushMsg_10_3(); recChatMsg.read(data.GetMemoryStream()); if (!IsValidMsg(recChatMsg.chatType)) { return; } if (IsBlackListMan(recChatMsg.senderName)) { return; } Log.info(this, "判断是否接收该频道消息"); switch (recChatMsg.chatType) { case (byte)ChatType.SiLiao: if (LocalVarManager.GetInt(LocalVarManager.CHAT_REC_SL_CHANNEL, 0) == (int)ReceiveState.REJECT) { return; } else { break; } case (byte)ChatType.ZongHe: if (LocalVarManager.GetInt(LocalVarManager.CHAT_REC_ZH_CHANNEL, 0) == (int)ReceiveState.REJECT) { return; } else { break; } case (byte)ChatType.ZhenYing: if (LocalVarManager.GetInt(LocalVarManager.CHAT_REC_ZY_CHANNEL, 0) == (int)ReceiveState.REJECT) { return; } else { break; } default: break; } ChatVo recChat = new ChatVo(); recChat.chatType = recChatMsg.chatType; recChat.senderId = recChatMsg.senderId; recChat.serverId = recChatMsg.serverId; recChat.senderName = recChatMsg.senderName; recChat.senderSex = recChatMsg.senderSex; recChat.senderJob = recChatMsg.senderJob; recChat.senderLvl = recChatMsg.senderLvl; recChat.senderVip = recChatMsg.senderVip; recChat.content = recChatMsg.content; recChat.goods = recChatMsg.goodsList.Count > 0?recChatMsg.goodsList[0]:null; recChat.nationId = recChatMsg.senderNation; SendChatMsg(recChat); }