【ID1005229】【特权调整】月卡bugTask

back_recharge
zhangshanxue 2019-12-17 10:27:09 +08:00
parent c754c7b063
commit 113c7514c8
5 changed files with 20 additions and 11 deletions

View File

@ -88,22 +88,26 @@ public abstract class AbstractServer extends AbstractEndport {
public void received(IChannel channel, Object msg) {
String sessionId = channel.getBindSessionId();
if (handler instanceof INetReceived) {
NettyGameSession gameSession = currentSessions.get(sessionId);
if (null != gameSession) {
gameSession.received(msg);
if(this.currentSessions.containsKey(sessionId)){
NettyGameSession gameSession = this.currentSessions.get(sessionId);
if (null != gameSession) {
gameSession.received(msg);
}
}
}
}
@Override
public void caught(IChannel channel, Throwable caught) {
NettyGameSession gameSession = ((INetSession) handler).createGameSession(channel,handler);
if (null != gameSession) {
LOGGER.info("seission" + gameSession + "channelActive: " + gameSession.getChannel().getRemoteAddress() + " ,uid: " +
gameSession.getUid() + " ,areaId: " + gameSession.getAreaId());
caught.printStackTrace();
String sessionId = channel.getBindSessionId();
if(this.currentSessions.containsKey(sessionId)){
NettyGameSession gameSession = this.currentSessions.get(sessionId);
if (null != gameSession) {
LOGGER.info("seission" + gameSession + "channelActive: " + gameSession.getChannel().getRemoteAddress() + " ,uid: " +
gameSession.getUid() + " ,areaId: " + gameSession.getAreaId());
caught.printStackTrace();
}
}
}

View File

@ -108,6 +108,7 @@ public class GameLogicService implements IService {
}
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
LOGGER.info("ShutdownHook start");
Thread.currentThread().setName("addShutdownHook");
try {
GameApplication.close();

View File

@ -67,4 +67,7 @@ public interface Global {
int VIPSTORID = 20; //vip商店id
int LUXURYMONTHCARDID =11;//6豪华月卡
int WEEKCARDID = 10; //月卡
}

View File

@ -113,10 +113,10 @@ public class QuickStartMonsterFighter extends BaseHandler<FightInfoProto.QuickSt
FightInfoProto.QuickStartMonsterFightResponse builder = FightInfoProto.QuickStartMonsterFightResponse.newBuilder()
.setResult(resultCode)
.setEnventDrop(dropBuilder)
.setFightData(fightDataBuild)
.build();
MessageUtil.sendMessage(iSession, 1,MessageTypeProto.MessageType.QUICK_START_MONSTERFIGHTER_REPONSE_VALUE, builder, true);
return;
}
//排行榜
// String rankKey = RedisKey.getKey(RedisKey.MONSTER_ATTACK_RANK,"", false);

View File

@ -3,6 +3,7 @@ package com.ljsd.jieling.handler.vip;
import com.ljsd.jieling.exception.ErrorCode;
import com.ljsd.jieling.exception.ErrorCodeException;
import com.ljsd.jieling.globals.BIReason;
import com.ljsd.jieling.globals.Global;
import com.ljsd.jieling.handler.BaseHandler;
import com.ljsd.jieling.logic.dao.PlayerManager;
import com.ljsd.jieling.logic.dao.UserManager;
@ -34,7 +35,7 @@ public class VipTakeDailyHandler extends BaseHandler<PlayerInfoProto.VipTakeDily
throw new ErrorCodeException(ErrorCode.CFG_NULL);
}
if(!playerInfoManager.getRechargeInfo().getBuyGoodsTimes().containsKey(GiftGoodsType.LUXURYMONTHCARD)){
if(!playerInfoManager.getRechargeInfo().getBuyGoodsTimes().containsKey(Global.LUXURYMONTHCARDID)){
throw new ErrorCodeException(ErrorCode.newDefineCode("未激活豪华月卡"));
}