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