功能表结构修改兼容
parent
af9dfd344a
commit
c3fe0ac2c8
|
@ -146,17 +146,16 @@ public class CommonStaticConfig extends AbstractClassStaticConfig {
|
|||
break;
|
||||
}
|
||||
|
||||
for (int[] openRule : sGlobalSystemConfig.getOpenRules()) {
|
||||
int openType = openRule[0];
|
||||
int openCondition = openRule[1];
|
||||
if (!sGlobalSystemConfigMapByTypeAndConditionMapTmp.containsKey(openType)) {
|
||||
sGlobalSystemConfigMapByTypeAndConditionMapTmp.put(openType, new HashMap<>());
|
||||
}
|
||||
if (!sGlobalSystemConfigMapByTypeAndConditionMapTmp.get(openType).containsKey(openCondition)) {
|
||||
sGlobalSystemConfigMapByTypeAndConditionMapTmp.get(openType).put(openCondition, new ArrayList<>());
|
||||
}
|
||||
sGlobalSystemConfigMapByTypeAndConditionMapTmp.get(openType).get(openCondition).add(sGlobalSystemConfig);
|
||||
int[] openRules = sGlobalSystemConfig.getOpenRules();
|
||||
int openType = openRules[0];
|
||||
int openCondition = openRules[1];
|
||||
if (!sGlobalSystemConfigMapByTypeAndConditionMapTmp.containsKey(openType)) {
|
||||
sGlobalSystemConfigMapByTypeAndConditionMapTmp.put(openType, new HashMap<>());
|
||||
}
|
||||
if (!sGlobalSystemConfigMapByTypeAndConditionMapTmp.get(openType).containsKey(openCondition)) {
|
||||
sGlobalSystemConfigMapByTypeAndConditionMapTmp.get(openType).put(openCondition, new ArrayList<>());
|
||||
}
|
||||
sGlobalSystemConfigMapByTypeAndConditionMapTmp.get(openType).get(openCondition).add(sGlobalSystemConfig);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -262,37 +262,36 @@ public class HandlerLogicThread extends Thread{
|
|||
return false;
|
||||
}
|
||||
boolean result = true;
|
||||
outside: for (int[] openRule : sGlobalSystemConfig.getOpenRules()) {
|
||||
switch (openRule[0]){
|
||||
case 1:
|
||||
if (!SMainLevelConfig.biggerThanFight(user.getMainLevelManager().getFightId(),openRule[1])) {
|
||||
result = false;
|
||||
break outside;
|
||||
}
|
||||
int[] openRule = sGlobalSystemConfig.getOpenRules();
|
||||
switch (openRule[0]){
|
||||
case 1:
|
||||
if (!SMainLevelConfig.biggerThanFight(user.getMainLevelManager().getFightId(),openRule[1])) {
|
||||
result = false;
|
||||
break;
|
||||
case 2:
|
||||
if (user.getPlayerInfoManager().getLevel() < openRule[1]){
|
||||
result = false;
|
||||
break outside;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (user.getPlayerInfoManager().getLevel() < openRule[1]){
|
||||
result = false;
|
||||
break;
|
||||
case 3:
|
||||
if (user.getHeroManager().getHongmengMaxLevelByInt() < openRule[1]){
|
||||
result = false;
|
||||
break outside;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (user.getHeroManager().getHongmengMaxLevelByInt() < openRule[1]){
|
||||
result = false;
|
||||
break;
|
||||
case 4:
|
||||
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.getConfigById(openRule[1]);
|
||||
RechargeHandler rechargeHandler = BuyGoodsNewLogic.getRechargeHandler(config.getOtype());
|
||||
AbstractWelfareBag bag = rechargeHandler.getRechargeMap(user).get(config.getId());
|
||||
if (bag == null || !bag.buyAgo()){
|
||||
result = false;
|
||||
break outside;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
SRechargeCommodityNewConfig config = SRechargeCommodityNewConfig.getConfigById(openRule[1]);
|
||||
RechargeHandler rechargeHandler = BuyGoodsNewLogic.getRechargeHandler(config.getOtype());
|
||||
AbstractWelfareBag bag = rechargeHandler.getRechargeMap(user).get(config.getId());
|
||||
if (bag == null || !bag.buyAgo()){
|
||||
result = false;
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ public class SGlobalSystemConfig implements BaseConfig {
|
|||
|
||||
private String name;
|
||||
|
||||
private int[][] openRules;
|
||||
private int[] openRules;
|
||||
|
||||
private String systemOpen;
|
||||
|
||||
|
@ -82,7 +82,7 @@ public class SGlobalSystemConfig implements BaseConfig {
|
|||
return id;
|
||||
}
|
||||
|
||||
public int[][] getOpenRules() {
|
||||
public int[] getOpenRules() {
|
||||
return openRules;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue