特权过期
parent
69610995d1
commit
1e36eb0195
|
@ -810,8 +810,12 @@ public class PlayerLogic {
|
||||||
public int getMaxCountByPrivilegeType(User user ,int privilegeType){
|
public int getMaxCountByPrivilegeType(User user ,int privilegeType){
|
||||||
List<SPrivilegeTypeConfig> sPrivilegeTypeConfigs = SPrivilegeTypeConfig.privilegeByType.get(privilegeType);
|
List<SPrivilegeTypeConfig> sPrivilegeTypeConfigs = SPrivilegeTypeConfig.privilegeByType.get(privilegeType);
|
||||||
List<Integer> typePrivileges = new ArrayList<>();
|
List<Integer> typePrivileges = new ArrayList<>();
|
||||||
|
Map<Integer, VipInfo> vipInfo = user.getPlayerInfoManager().getVipInfo();
|
||||||
for(SPrivilegeTypeConfig config:sPrivilegeTypeConfigs){
|
for(SPrivilegeTypeConfig config:sPrivilegeTypeConfigs){
|
||||||
if(!user.getPlayerInfoManager().getVipInfo().containsKey(config.getId())){
|
if(!vipInfo.containsKey(config.getId())){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if(vipInfo.get(config.getId()).getEffectTime()!=0&&vipInfo.get(config.getId()).getEffectTime()<TimeUtils.now()/1000){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
typePrivileges.add(config.getId());
|
typePrivileges.add(config.getId());
|
||||||
|
|
Loading…
Reference in New Issue