Merge branch 'master_test_gn' into master_prb_gn

back_recharge
duhui 2021-07-06 16:44:43 +08:00
commit 9ae3b7f7a7
1 changed files with 24 additions and 0 deletions

View File

@ -163,6 +163,8 @@ public class GetPlayerInfoHandler extends BaseHandler{
PlayerLogic.getInstance().checkOldHeadFrame(user);
// 魂印图鉴,旧数据容错
PlayerLogic.getInstance().soulPrintHandBookDispose(user);
// 心愿抽卡 旧玩家兼容
wishOldUserRandomNumInit(user);
//hotfix 月卡
PlayerLogic.getInstance().getMonthCardInfo(user);
int monthline = STableManager.getConfig(SMonthcardConfig.class).get(Global.MONTHCARDID).getPrice();
@ -251,4 +253,26 @@ public class GetPlayerInfoHandler extends BaseHandler{
}
}
/**
*
* @param user
*/
private void wishOldUserRandomNumInit(User user){
// 玩家创建时间
long createTime = user.getPlayerInfoManager().getCreateTime();
// 截止时间 2021-07-07 00:00:00
long endTime = 1625587200000L;
// 截止时间之前创建的角色
if (createTime <= endTime){
// 钻石卡池抽奖次数
Integer num = user.getHeroManager().getRandomCountByType().getOrDefault(1,0);
// 限制次数
int value = SSpecialConfig.getIntegerValue(SSpecialConfig.UNLOCKCARDWISH);
if (num < value){
// 修改次数
user.getHeroManager().putRandomCount(1,value);
}
}
}
}