天眼类型
parent
6b645813ed
commit
90bf135e95
|
@ -71,7 +71,6 @@ public class ChatLogic {
|
|||
chatInfoList = MessageCache.guildMsg.get(guildId).getObjs(messageId);
|
||||
}
|
||||
break;
|
||||
|
||||
case 3: //好友
|
||||
Map<Object, Object> hmget = RedisUtil.getInstence().hmget(GameApplication.serverId + RedisKey.CUser_Chat + uid);
|
||||
if (hmget != null && hmget.size() != 0){
|
||||
|
|
|
@ -461,17 +461,50 @@ public class MessageUtil {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param msg
|
||||
* @param me
|
||||
* @param uid
|
||||
* @param channel
|
||||
*/
|
||||
public static void sendSkyEyeMsg(String msg,User me,int uid,int channel){
|
||||
// 渠道特殊处理
|
||||
channel = channel == 2?4:channel;
|
||||
channel = channel == 3?8:channel;
|
||||
int eyeChannel = conversionSkyEyeChannel(channel);
|
||||
// 聊天的玩家
|
||||
User he = UserManager.getUserNotCache(uid);
|
||||
ChatProto.ChatV3.Builder v3 = buildChatV3(msg,me,channel);
|
||||
ChatProto.ChatV3.Builder v3 = buildChatV3(msg,me,eyeChannel);
|
||||
v3.setTo(buildChatUser(he));
|
||||
skyEyeSendMsg(v3.build());
|
||||
}
|
||||
|
||||
/**
|
||||
* 本地类型
|
||||
* 1:世界,2:公会,3:好友私聊,4:跨服聊天
|
||||
* 转换天眼类型
|
||||
* 1:世界,2:国家,3:团队,4:公会,5:队伍,6:附近,7:战场,8:私聊
|
||||
* @param channel
|
||||
* @return
|
||||
*/
|
||||
private static int conversionSkyEyeChannel(int channel){
|
||||
int result;
|
||||
switch (channel){
|
||||
case 2:
|
||||
result = 4;
|
||||
break;
|
||||
case 3:
|
||||
result = 8;
|
||||
break;
|
||||
case 4:
|
||||
result = 7;
|
||||
break;
|
||||
default:
|
||||
result = channel;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑基础信息,天眼
|
||||
* @param msg
|
||||
|
|
Loading…
Reference in New Issue