特权修复

lvxinran 2020-10-30 10:47:45 +08:00
parent 1751ac7e44
commit 6991d23e69
1 changed files with 2 additions and 3 deletions

View File

@ -309,7 +309,7 @@ public class PlayerLogic {
Set<Integer> fixVipId = new HashSet<>();
for(Map.Entry<Integer,VipInfo> vipInfoItem : vipInfo.entrySet()){
//如果这个权限是活动 且永久了 那么需要修复
if(vipInfoItem.getValue().getEffectTime()==0&&SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(vipInfoItem.getKey()).getPrivilegeType()==5){
if(vipInfoItem.getValue().getEffectTime()==0&&SPrivilegeTypeConfig.getsPrivilegeTypeConfigMap().get(vipInfoItem.getKey()).getUnlockType()==5){
fixVipId.add(vipInfoItem.getKey());
}
if(vipInfoItem.getValue().getEffectTime()!=0 && vipInfoItem.getValue().getEffectTime()<=(TimeUtils.now()/1000)){
@ -317,11 +317,10 @@ public class PlayerLogic {
CombatLogic.getInstance().getNewAdventureReward(user,true,vipInfoItem.getValue().getEffectTime());
}
removePrivileges.add(vipInfoItem.getKey());
continue;
}
}
if(!fixVipId.isEmpty()){
fixVipId.forEach(n->playerInfoManager.addVipByTime(n,(int)((TimeUtils.now()+TimeUtils.WEEK)/1000)));
fixVipId.forEach(n->playerInfoManager.addVipByTime(n,(int)(TimeUtils.now()/1000)));
}
playerInfoManager.vipFlush(removePrivileges);
//vip刷新后才能发给前端