周卡月卡调整改bug,二版
parent
9f01f3c35f
commit
cd3dba3982
|
@ -558,7 +558,7 @@ public class PlayerManager extends MongoBase {
|
|||
VipInfo newVipInfo = new VipInfo();
|
||||
if(config.getContinueTime()!=null&&config.getContinueTime().length>0){
|
||||
if(vipInfo.containsKey(privilageId)){
|
||||
if(config.getContinueTime()[1]==1&&TimeUtils.now()/1000<vipInfo.get(privilageId).getEffectTime()){
|
||||
if(config.getContinueTime()[1]==1&&TimeUtils.nowInt()<vipInfo.get(privilageId).getEffectTime()){
|
||||
if(config.getCondition().length==1&&config.getCondition()[0][0]==0){
|
||||
return;
|
||||
}else{
|
||||
|
|
|
@ -1627,10 +1627,7 @@ public class PlayerLogic {
|
|||
cond = user.getHeroManager().GetAllLikableLv();
|
||||
break;
|
||||
case GlobalsDef.WEEKCARD_UNLOCK:
|
||||
int time = user.getPlayerInfoManager().getMonthCard().getOrDefault(1, 0);
|
||||
if (time != 0){
|
||||
cond = 1;
|
||||
}
|
||||
cond = user.getPlayerInfoManager().getMonthCard().getOrDefault(1, -1);
|
||||
break;
|
||||
default:{
|
||||
break;
|
||||
|
@ -1639,7 +1636,14 @@ public class PlayerLogic {
|
|||
TreeMap<Integer, Integer> condition = (TreeMap)conditionMap.get(privilegeId);
|
||||
if(sPrivilegeTypeConfig.getUnlockType()==GlobalsDef.RECHARGE_UNLOCK_PRIVILEGE){
|
||||
mCount = condition.get(0);
|
||||
}else{
|
||||
}
|
||||
else if(sPrivilegeTypeConfig.getUnlockType()==GlobalsDef.WEEKCARD_UNLOCK){
|
||||
if (cond == -1){
|
||||
mCount = 0;
|
||||
}else {
|
||||
mCount = condition.get(0);
|
||||
}
|
||||
}else {
|
||||
mCount = condition.floorEntry(cond).getValue();
|
||||
}
|
||||
return mCount;
|
||||
|
|
|
@ -98,7 +98,7 @@ public class AbstractWelfareBag extends MongoBase{
|
|||
LOGGER.error("礼包:{}未开启",modId);
|
||||
return false;
|
||||
}
|
||||
if(getLimit() != 0 && buyTimes >=getLimit()){
|
||||
if(getLimit() != 0 && buyTimes >= getLimit()){
|
||||
LOGGER.error("礼包:{}购买次数为:{}超过限制:{}",modId,buyTimes,getLimit());
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue