generated from root/miduo_server
公会科技等级加入等级限制
parent
65d4c814e2
commit
f387a07e9a
|
@ -484,6 +484,7 @@ public enum ErrorCode implements IErrorCode {
|
||||||
POWER_CENTER_LINK_POS_LIMIT(30305, "异能中心链接栏位上限"),
|
POWER_CENTER_LINK_POS_LIMIT(30305, "异能中心链接栏位上限"),
|
||||||
POWER_CENTER_EXIST_SAME_HERO(30306, "异能中心已存在同名卡"),
|
POWER_CENTER_EXIST_SAME_HERO(30306, "异能中心已存在同名卡"),
|
||||||
HERO_IS_LINKED(30307, "英雄链接中,不能进行此操作"),
|
HERO_IS_LINKED(30307, "英雄链接中,不能进行此操作"),
|
||||||
|
GUILD_SKILL_HIGH(30308, "科技技能等级不能超过其他科技技能20级"),
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
|
@ -1551,6 +1551,18 @@ public class GuildLogic{
|
||||||
consume = typeMap.get(1).get(0).getConsume();
|
consume = typeMap.get(1).get(0).getConsume();
|
||||||
} else {
|
} else {
|
||||||
level = skillInfo.get(type);
|
level = skillInfo.get(type);
|
||||||
|
for(int i=1;i<=4;i++){
|
||||||
|
if(i == type){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
int otherLevel = 0;
|
||||||
|
if (skillInfo.containsKey(i)) {
|
||||||
|
otherLevel = skillInfo.get(i);
|
||||||
|
}
|
||||||
|
if (level - otherLevel >= 20) {
|
||||||
|
throw new ErrorCodeException(ErrorCode.GUILD_SKILL_HIGH);
|
||||||
|
}
|
||||||
|
}
|
||||||
consume = typeMap.get(level % size + 1).get(level / size).getConsume();
|
consume = typeMap.get(level % size + 1).get(level / size).getConsume();
|
||||||
if (typeMap.get(level % size + 1).get(level / size + 1) == null) {
|
if (typeMap.get(level % size + 1).get(level / size + 1) == null) {
|
||||||
throw new ErrorCodeException(ErrorCode.HERO_LEVE_MAX);
|
throw new ErrorCodeException(ErrorCode.HERO_LEVE_MAX);
|
||||||
|
|
Loading…
Reference in New Issue