//跨服聊天提交
parent
0f49dae227
commit
8eb605135d
|
|
@ -64,7 +64,7 @@ public class ChatLogic {
|
||||||
case 0: // 系统
|
case 0: // 系统
|
||||||
chatInfoList = MessageCache.sysMsg.getObjs(messageId);
|
chatInfoList = MessageCache.sysMsg.getObjs(messageId);
|
||||||
break;
|
break;
|
||||||
case -1: //世界
|
case 1: //世界
|
||||||
chatInfoList = MessageCache.worldMsg.getObjs(messageId);
|
chatInfoList = MessageCache.worldMsg.getObjs(messageId);
|
||||||
break;
|
break;
|
||||||
case 2://公会
|
case 2://公会
|
||||||
|
|
@ -95,7 +95,7 @@ public class ChatLogic {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 4:
|
||||||
int group = GlobleSystemLogic.getInstence().getCrossGroup();
|
int group = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||||
if(group==-1){
|
if(group==-1){
|
||||||
throw new ErrorCodeException(ErrorCode.CHAT_NOT_CROSS);
|
throw new ErrorCodeException(ErrorCode.CHAT_NOT_CROSS);
|
||||||
|
|
@ -162,7 +162,7 @@ public class ChatLogic {
|
||||||
}
|
}
|
||||||
boolean result = true;
|
boolean result = true;
|
||||||
switch (chatType){
|
switch (chatType){
|
||||||
case -1:
|
case 1:
|
||||||
//0|content需要解字符串
|
//0|content需要解字符串
|
||||||
String s = message;
|
String s = message;
|
||||||
String[] strs = message.split("|",3);
|
String[] strs = message.split("|",3);
|
||||||
|
|
@ -177,7 +177,7 @@ public class ChatLogic {
|
||||||
case 3:
|
case 3:
|
||||||
result = ShieldedWordUtils.checkName(user,message,false,ChatContentType.PRIVATE_CHAT,UserManager.getUser(friendId));
|
result = ShieldedWordUtils.checkName(user,message,false,ChatContentType.PRIVATE_CHAT,UserManager.getUser(friendId));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 4:
|
||||||
result = ShieldedWordUtils.checkName(user,message,false,ChatContentType.CROSS_CHAT);
|
result = ShieldedWordUtils.checkName(user,message,false,ChatContentType.CROSS_CHAT);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -200,7 +200,7 @@ public class ChatLogic {
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (chatType){
|
switch (chatType){
|
||||||
case -1: //世界
|
case 1: //世界
|
||||||
long messageId = RedisUtil.getInstence().increment(GameApplication.serverId + RedisKey.CHAT_WORD_MSG_ID + GameApplication.serverId);
|
long messageId = RedisUtil.getInstence().increment(GameApplication.serverId + RedisKey.CHAT_WORD_MSG_ID + GameApplication.serverId);
|
||||||
ChatProto.ChatInfo chatInfo = CBean2Proto.getChatInfoBuilder(user,message,nowTime,messageId);
|
ChatProto.ChatInfo chatInfo = CBean2Proto.getChatInfoBuilder(user,message,nowTime,messageId);
|
||||||
|
|
||||||
|
|
@ -243,7 +243,7 @@ public class ChatLogic {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: //跨服
|
case 4: //跨服
|
||||||
int group = GlobleSystemLogic.getInstence().getCrossGroup();
|
int group = GlobleSystemLogic.getInstence().getCrossGroup();
|
||||||
if(group==-1){
|
if(group==-1){
|
||||||
throw new ErrorCodeException(ErrorCode.CHAT_NOT_CROSS);
|
throw new ErrorCodeException(ErrorCode.CHAT_NOT_CROSS);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue