BUG【ID1007627】【剑影仙踪】激活豪华月卡后,需要领取一次奖励,才会显示完成条件
parent
d34556c29c
commit
eda4141f3b
|
@ -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.activity.event.NewWelfareEvent;
|
||||
import com.ljsd.jieling.logic.activity.event.NewWelfareTypeEnum;
|
||||
|
@ -39,13 +40,18 @@ public class MonthTakeDailyHandler extends BaseHandler <PlayerInfoProto.TakeMoth
|
|||
throw new ErrorCodeException(ErrorCode.CFG_NULL);
|
||||
}
|
||||
|
||||
|
||||
if(!user.getPlayerInfoManager().getMonthCard().containsKey(proto.getType())){
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("未激活"));
|
||||
}
|
||||
|
||||
if(user.getPlayerInfoManager().getMonthCardDailyTake().contains(proto.getType())){
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("had taked the month daily reward"));
|
||||
}
|
||||
user.getPlayerInfoManager().addMonthCardDailyTake(proto.getType());
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, config.getBaseReward(), BIReason.TAKE_VIP_DAILY_REWARD);
|
||||
PlayerInfoProto.TakeMothDilyResponse build = PlayerInfoProto.TakeMothDilyResponse.newBuilder().setDrop(drop).build();
|
||||
Poster.getPoster().dispatchEvent(new NewWelfareEvent(user, NewWelfareTypeEnum.RECHARGE_BUY.getType(),proto.getType()));
|
||||
// Poster.getPoster().dispatchEvent(new NewWelfareEvent(user, NewWelfareTypeEnum.RECHARGE_BUY.getType(),proto.getType()));
|
||||
MessageUtil.sendMessage(iSession, 1,MessageTypeProto.MessageType.MONTHCARD_TAKE_DAILY_RESPONSE_VALUE, build, true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -138,6 +138,7 @@ public class BuyGoodsLogic {
|
|||
if(rechargeInfo.getSmonthSaveAmt()<lmonthline&&(price+rechargeInfo.getSmonthSaveAmt())>=lmonthline){
|
||||
sendneed=true;
|
||||
user.getPlayerInfoManager().getMonthCard().put(Global.LMONTHCARDID, (int) (System.currentTimeMillis() / 1000));
|
||||
Poster.getPoster().dispatchEvent(new NewWelfareEvent(user, NewWelfareTypeEnum.RECHARGE_BUY.getType(),Global.LMONTHCARDID));
|
||||
}
|
||||
if(sendneed){
|
||||
ISession session = OnlineUserManager.sessionMap.get(uid);
|
||||
|
|
Loading…
Reference in New Issue