法宝限制等级修改
parent
8c3ba79471
commit
4806c9d71e
|
@ -52,6 +52,9 @@ public class GetWorldArenaInfoRequestHandler extends BaseHandler<WorldProto.GetW
|
||||||
WorldProto.GetWorldArenaInfoResponse.Builder builder = WorldProto.GetWorldArenaInfoResponse.newBuilder();
|
WorldProto.GetWorldArenaInfoResponse.Builder builder = WorldProto.GetWorldArenaInfoResponse.newBuilder();
|
||||||
|
|
||||||
TimeControllerOfFunction timeControllerOfFunction = GlobalDataManaager.getInstance().getTimeControllerOfFunctionByFunctinoType(FunctionIdEnum.World_Arena);
|
TimeControllerOfFunction timeControllerOfFunction = GlobalDataManaager.getInstance().getTimeControllerOfFunctionByFunctinoType(FunctionIdEnum.World_Arena);
|
||||||
|
if (timeControllerOfFunction == null){
|
||||||
|
throw new ErrorCodeException(ErrorCode.ACTIVITY_NOT_OPEN);
|
||||||
|
}
|
||||||
int functionStartTime = (int)(timeControllerOfFunction.getStartTime() / 1000);
|
int functionStartTime = (int)(timeControllerOfFunction.getStartTime() / 1000);
|
||||||
int diff = TimeUtils.nowInt() - functionStartTime;
|
int diff = TimeUtils.nowInt() - functionStartTime;
|
||||||
if (diff > setting.getRestTime()[0] && diff < setting.getRestTime()[1]) {
|
if (diff > setting.getRestTime()[0] && diff < setting.getRestTime()[1]) {
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class GlobalDataManaager implements IManager {
|
||||||
public TimeControllerOfFunction getTimeControllerOfFunctionByFunctinoType(FunctionIdEnum functionIdEnum){
|
public TimeControllerOfFunction getTimeControllerOfFunctionByFunctinoType(FunctionIdEnum functionIdEnum){
|
||||||
Map<Integer, SGlobalSystemConfig> sGlobalSystemConfigMap = STableManager.getConfig(SGlobalSystemConfig.class);
|
Map<Integer, SGlobalSystemConfig> sGlobalSystemConfigMap = STableManager.getConfig(SGlobalSystemConfig.class);
|
||||||
for(Map.Entry<Integer,TimeControllerOfFunction> item : openTimeOfFuntionCache.entrySet()){
|
for(Map.Entry<Integer,TimeControllerOfFunction> item : openTimeOfFuntionCache.entrySet()){
|
||||||
SGlobalSystemConfig sGlobalSystemConfig = sGlobalSystemConfigMap.get(item.getKey());
|
SGlobalSystemConfig sGlobalSystemConfig = sGlobalSystemConfigMap.get(item.getKey());
|
||||||
if(sGlobalSystemConfig.getIsIDdSame() == functionIdEnum.getFunctionType()){
|
if(sGlobalSystemConfig.getIsIDdSame() == functionIdEnum.getFunctionType()){
|
||||||
return item.getValue();
|
return item.getValue();
|
||||||
}
|
}
|
||||||
|
|
|
@ -716,12 +716,13 @@ public class EquipLogic {
|
||||||
|
|
||||||
int nowLv = baubles.getLevel();
|
int nowLv = baubles.getLevel();
|
||||||
int tgLv = nowLv + upLv;
|
int tgLv = nowLv + upLv;
|
||||||
Map<Integer, SEquipTalismana> talismanaMap = SEquipTalismana.equipTalismanaStarMap.get(baubles.getEquipId());
|
|
||||||
SEquipTalismana equipTalismana = talismanaMap.get(tgLv);
|
int limit = SSpecialConfig.getIntegerValue("EquipTalismanaUpperLimit");
|
||||||
if (equipTalismana == null){
|
if (tgLv > limit){
|
||||||
throw new ErrorCodeException(ErrorCode.LEVE_MAX, "法宝已到达最大等级:"+tgLv);
|
throw new ErrorCodeException(ErrorCode.LEVE_MAX, "法宝已到达最大等级:"+tgLv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Map<Integer, SEquipTalismana> talismanaMap = SEquipTalismana.equipTalismanaStarMap.get(baubles.getEquipId());
|
||||||
HashMap<Integer, Integer> costItemMap = new HashMap<>();
|
HashMap<Integer, Integer> costItemMap = new HashMap<>();
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (int i = 0; i < upLv; i++) {
|
for (int i = 0; i < upLv; i++) {
|
||||||
|
|
Loading…
Reference in New Issue