充值后再次签到
parent
8f981bc846
commit
9dde66d590
|
@ -41,5 +41,6 @@ public interface VipPrivilegeType {
|
|||
int GUILD_BOSS_CHALLENGE_TIMES = 37; //公会boss挑战次数
|
||||
int UNLOCK_GUILD_BOSS_SWEEP = 1002; //公会boss扫荡
|
||||
int EXPEDITION_RELIVE = 1003; //猎妖之路免费复活次数
|
||||
int SIGN_AGAIN = 1005; //每日签到充值后再领一次
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package com.ljsd.jieling.handler;
|
||||
|
||||
import com.ljsd.jieling.core.VipPrivilegeType;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.player.PlayerLogic;
|
||||
import com.ljsd.jieling.netty.cocdex.PacketNetData;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import com.ljsd.jieling.protocols.CommonProto;
|
||||
|
@ -47,6 +49,12 @@ public class SignInHandler extends BaseHandler {
|
|||
throw new ErrorCodeException(ErrorCode.newDefineCode("day out0findex"));
|
||||
}
|
||||
|
||||
//check 道具
|
||||
boolean check = PlayerLogic.getInstance().check(user, VipPrivilegeType.SIGN_AGAIN, 1);
|
||||
if(!check){
|
||||
throw new ErrorCodeException("次数不足");
|
||||
}
|
||||
PlayerLogic.getInstance().checkAndUpdate(user, VipPrivilegeType.SIGN_AGAIN, 1);
|
||||
user.getPlayerInfoManager().setSignTotay(1);
|
||||
|
||||
int[] reward = sign.getreward();
|
||||
|
|
|
@ -186,6 +186,9 @@ public class BuyGoodsLogic {
|
|||
}
|
||||
}
|
||||
rechargeInfo.setSaveAmt(price+saveAmt);
|
||||
if(user.getPlayerInfoManager().getRechargedaily()==0){
|
||||
user.getPlayerInfoManager().updateVipPrivilage(VipPrivilegeType.SIGN_AGAIN, -1);
|
||||
}
|
||||
user.getPlayerInfoManager().addRechargedaily(price);
|
||||
//TODO 用事件分发
|
||||
ActivityLogic.getInstance().updateActivityMissionProgress(user, ActivityType.RechargeTotal,price);
|
||||
|
|
Loading…
Reference in New Issue