【ID1005229】【特权调整】月卡bugTask
parent
c754c7b063
commit
113c7514c8
|
@ -88,22 +88,26 @@ public abstract class AbstractServer extends AbstractEndport {
|
||||||
public void received(IChannel channel, Object msg) {
|
public void received(IChannel channel, Object msg) {
|
||||||
String sessionId = channel.getBindSessionId();
|
String sessionId = channel.getBindSessionId();
|
||||||
if (handler instanceof INetReceived) {
|
if (handler instanceof INetReceived) {
|
||||||
NettyGameSession gameSession = currentSessions.get(sessionId);
|
if(this.currentSessions.containsKey(sessionId)){
|
||||||
if (null != gameSession) {
|
NettyGameSession gameSession = this.currentSessions.get(sessionId);
|
||||||
gameSession.received(msg);
|
if (null != gameSession) {
|
||||||
|
gameSession.received(msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void caught(IChannel channel, Throwable caught) {
|
public void caught(IChannel channel, Throwable caught) {
|
||||||
NettyGameSession gameSession = ((INetSession) handler).createGameSession(channel,handler);
|
String sessionId = channel.getBindSessionId();
|
||||||
if (null != gameSession) {
|
if(this.currentSessions.containsKey(sessionId)){
|
||||||
LOGGER.info("seission" + gameSession + "channelActive: " + gameSession.getChannel().getRemoteAddress() + " ,uid: " +
|
NettyGameSession gameSession = this.currentSessions.get(sessionId);
|
||||||
gameSession.getUid() + " ,areaId: " + gameSession.getAreaId());
|
if (null != gameSession) {
|
||||||
caught.printStackTrace();
|
LOGGER.info("seission" + gameSession + "channelActive: " + gameSession.getChannel().getRemoteAddress() + " ,uid: " +
|
||||||
|
gameSession.getUid() + " ,areaId: " + gameSession.getAreaId());
|
||||||
|
caught.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,7 @@ public class GameLogicService implements IService {
|
||||||
}
|
}
|
||||||
|
|
||||||
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
|
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
|
||||||
|
LOGGER.info("ShutdownHook start");
|
||||||
Thread.currentThread().setName("addShutdownHook");
|
Thread.currentThread().setName("addShutdownHook");
|
||||||
try {
|
try {
|
||||||
GameApplication.close();
|
GameApplication.close();
|
||||||
|
|
|
@ -67,4 +67,7 @@ public interface Global {
|
||||||
|
|
||||||
|
|
||||||
int VIPSTORID = 20; //vip商店id
|
int VIPSTORID = 20; //vip商店id
|
||||||
|
int LUXURYMONTHCARDID =11;//6豪华月卡
|
||||||
|
int WEEKCARDID = 10; //月卡
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,10 +113,10 @@ public class QuickStartMonsterFighter extends BaseHandler<FightInfoProto.QuickSt
|
||||||
FightInfoProto.QuickStartMonsterFightResponse builder = FightInfoProto.QuickStartMonsterFightResponse.newBuilder()
|
FightInfoProto.QuickStartMonsterFightResponse builder = FightInfoProto.QuickStartMonsterFightResponse.newBuilder()
|
||||||
.setResult(resultCode)
|
.setResult(resultCode)
|
||||||
.setEnventDrop(dropBuilder)
|
.setEnventDrop(dropBuilder)
|
||||||
|
.setFightData(fightDataBuild)
|
||||||
.build();
|
.build();
|
||||||
MessageUtil.sendMessage(iSession, 1,MessageTypeProto.MessageType.QUICK_START_MONSTERFIGHTER_REPONSE_VALUE, builder, true);
|
MessageUtil.sendMessage(iSession, 1,MessageTypeProto.MessageType.QUICK_START_MONSTERFIGHTER_REPONSE_VALUE, builder, true);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
//排行榜
|
//排行榜
|
||||||
// String rankKey = RedisKey.getKey(RedisKey.MONSTER_ATTACK_RANK,"", false);
|
// String rankKey = RedisKey.getKey(RedisKey.MONSTER_ATTACK_RANK,"", false);
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.ljsd.jieling.handler.vip;
|
||||||
import com.ljsd.jieling.exception.ErrorCode;
|
import com.ljsd.jieling.exception.ErrorCode;
|
||||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||||
import com.ljsd.jieling.globals.BIReason;
|
import com.ljsd.jieling.globals.BIReason;
|
||||||
|
import com.ljsd.jieling.globals.Global;
|
||||||
import com.ljsd.jieling.handler.BaseHandler;
|
import com.ljsd.jieling.handler.BaseHandler;
|
||||||
import com.ljsd.jieling.logic.dao.PlayerManager;
|
import com.ljsd.jieling.logic.dao.PlayerManager;
|
||||||
import com.ljsd.jieling.logic.dao.UserManager;
|
import com.ljsd.jieling.logic.dao.UserManager;
|
||||||
|
@ -34,7 +35,7 @@ public class VipTakeDailyHandler extends BaseHandler<PlayerInfoProto.VipTakeDily
|
||||||
throw new ErrorCodeException(ErrorCode.CFG_NULL);
|
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("未激活豪华月卡"));
|
throw new ErrorCodeException(ErrorCode.newDefineCode("未激活豪华月卡"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue