Merge branch 'master' of http://60.1.1.230/backend/jieling_server
# Conflicts: # serverlogic/src/main/java/com/ljsd/jieling/handler/BaseHandler.javaback_recharge
commit
4c4c942c87
|
|
@ -50,6 +50,7 @@ public abstract class BaseHandler<T extends GeneratedMessage> {
|
|||
if(null !=proto){
|
||||
LOGGER.error("processWithProtoException\r\nprotoID:"+netData.getMsgId()+"\r\n"+proto.toString());
|
||||
}
|
||||
throw var4;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ public class GuildLogic {
|
|||
PlayerInfoCache cache = RedisUtil.getInstence().getMapEntry(RedisKey.PLAYER_INFO_CACHE, "", String.valueOf(uid), PlayerInfoCache.class);
|
||||
cache.setGuildPosition(GlobalsDef.CHAIRMAN);
|
||||
RedisUtil.getInstence().putMapEntry(RedisKey.PLAYER_INFO_CACHE,"",String.valueOf(uid),cache);
|
||||
user.getUserMissionManager().onGameEvent(user,GameEvent.JOIN_FAMILY);
|
||||
Family.FamilyCreateResponse build = Family.FamilyCreateResponse.newBuilder()
|
||||
.setFamilyBaseInfo(CBean2Proto.getFamilyBaseInfo(guildInfo))
|
||||
.setFamilyUserInfo(CBean2Proto.getFamilyUserInfo(user,GlobalsDef.CHAIRMAN))
|
||||
|
|
|
|||
|
|
@ -632,6 +632,9 @@ public class MissionLoigc {
|
|||
case TAKE_FRIEND_GIFT:
|
||||
count = cumulationData.takeFriendGifts;
|
||||
break;
|
||||
case JOIN_FAMILY:
|
||||
count = cumulationData.joinFamilyCount;
|
||||
break;
|
||||
default:
|
||||
count = 0;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ public class ProtocolsManager implements ProtocolsAbstract {
|
|||
dealHeartBeat(session);
|
||||
return;
|
||||
}
|
||||
|
||||
LOGGER.info("request={} commond ={}: " ,packetNetData.getUserId(), MessageTypeProto.MessageType.valueOf(packetNetData.getMsgId()));
|
||||
if (packetNetData.getMsgId()== MessageTypeProto.MessageType.LOGIN_REQUEST_VALUE ||
|
||||
packetNetData.getMsgId()== MessageTypeProto.MessageType.RECONNECT_REQUEST_VALUE){
|
||||
|
||||
|
|
@ -168,7 +168,9 @@ public class ProtocolsManager implements ProtocolsAbstract {
|
|||
return;
|
||||
}
|
||||
//处理多设备重登
|
||||
dealRepeatLogin(session.getUid());
|
||||
if(dealRepeatLogin(session) == 1 && packetNetData.getMsgId()!= MessageTypeProto.MessageType.RECONNECT_REQUEST_VALUE){
|
||||
return;
|
||||
}
|
||||
//刷新token
|
||||
//refreshToken(session);
|
||||
//踢下线
|
||||
|
|
@ -303,9 +305,13 @@ public class ProtocolsManager implements ProtocolsAbstract {
|
|||
}
|
||||
|
||||
|
||||
private int dealRepeatLogin(int uid) {
|
||||
private int dealRepeatLogin(ISession newSession) {
|
||||
int uid = newSession.getUid();
|
||||
if (OnlineUserManager.checkUidOnline(uid)){
|
||||
ISession iSession = OnlineUserManager.getSessionByUid(uid);
|
||||
if(iSession == newSession){
|
||||
return 0;
|
||||
}
|
||||
MessageUtil.sendErrorCode(iSession, ErrorCode.reloginCode,"您的账号已经在其他设备上登陆,请确认账号安全!");
|
||||
iSession.setOfflineType(ErrorCode.reloginCode);
|
||||
backUpMsgToRedis(iSession);
|
||||
|
|
@ -316,9 +322,9 @@ public class ProtocolsManager implements ProtocolsAbstract {
|
|||
}
|
||||
|
||||
private int checkIndex(ISession iSession, PacketNetData packetNetData) {
|
||||
if(packetNetData.getMsgId() == MessageTypeProto.MessageType.LOGIN_REQUEST_VALUE || packetNetData.getMsgId() == MessageTypeProto.MessageType.RECONNECT_REQUEST_VALUE){
|
||||
/* if(packetNetData.getMsgId() == MessageTypeProto.MessageType.LOGIN_REQUEST_VALUE || packetNetData.getMsgId() == MessageTypeProto.MessageType.RECONNECT_REQUEST_VALUE){
|
||||
return 0;
|
||||
}
|
||||
}*/
|
||||
int index = packetNetData.getIndex();
|
||||
if (iSession.getIndex() >= index){
|
||||
byte[] message = iSession.getCacheMessage(index);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public class ISession extends NettyGameSession {
|
|||
|
||||
private String id;
|
||||
private int token;
|
||||
private int index; //客戶端index
|
||||
private int index=-1; //客戶端index
|
||||
private AtomicInteger indicationIndex= new AtomicInteger(1); //服務端index
|
||||
private boolean kick;
|
||||
private int fiveReady; //客户端可以接受服务器5点刷新
|
||||
|
|
|
|||
|
|
@ -584,8 +584,6 @@ public class ItemUtil {
|
|||
levelUpExp = sPlayerLevelConfig.getExp();
|
||||
}
|
||||
while (curExp >= levelUpExp && curExp <= maxExp) {
|
||||
|
||||
Poster.getPoster().dispatchEvent(new UserLevelEvent(user.getId(),playerInfoManager.getLevel()));
|
||||
if(playerInfoManager.getLevel()==2&&playerInfoManager.getNickName().equals(String.valueOf(playerInfoManager.getRootId()))){
|
||||
//TODO 走表
|
||||
String title = SErrorCodeEerverConfig.getI18NMessage("change_playername_title");
|
||||
|
|
@ -604,6 +602,7 @@ public class ItemUtil {
|
|||
if (curExp >= sPlayerLevelConfig.getExp()) {
|
||||
curExp = curExp - sPlayerLevelConfig.getExp();
|
||||
playerInfoManager.setLevel(playerInfoManager.getLevel() + 1);
|
||||
Poster.getPoster().dispatchEvent(new UserLevelEvent(user.getId(),playerInfoManager.getLevel()));
|
||||
sPlayerLevelConfig = SPlayerLevelConfig.getsPlayerLevelConfigMap().get(playerInfoManager.getLevel());
|
||||
levelUpExp = sPlayerLevelConfig.getExp();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue