魂印功能限制
parent
abd7ebd875
commit
9bb332835e
|
@ -108,6 +108,8 @@ public class SGameSetting implements BaseConfig {
|
||||||
|
|
||||||
private int[] equipTalismanaUnlock;
|
private int[] equipTalismanaUnlock;
|
||||||
|
|
||||||
|
private int[] equipSignUnlock;
|
||||||
|
|
||||||
|
|
||||||
private static SGameSetting gameSetting;
|
private static SGameSetting gameSetting;
|
||||||
|
|
||||||
|
@ -319,4 +321,9 @@ public class SGameSetting implements BaseConfig {
|
||||||
public int[] getEquipTalismanaUnlock() {
|
public int[] getEquipTalismanaUnlock() {
|
||||||
return equipTalismanaUnlock;
|
return equipTalismanaUnlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int[] getEquipSignUnlock() {
|
||||||
|
return equipSignUnlock;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -1406,8 +1406,20 @@ public class HeroLogic {
|
||||||
Hero hero = user.getHeroManager().getHeroMap().get(heroId);
|
Hero hero = user.getHeroManager().getHeroMap().get(heroId);
|
||||||
|
|
||||||
if (hero == null || equipIds.isEmpty()) {
|
if (hero == null || equipIds.isEmpty()) {
|
||||||
MessageUtil.sendErrorResponse(session, 0, MessageTypeProto.MessageType.SOUL_EQUIP_WEAR_RESPONSE_VALUE, "");
|
throw new Exception("英雄不存在或无装备"+heroId+"size"+equipIds.size());
|
||||||
return;
|
}
|
||||||
|
|
||||||
|
int[] equipSignUnlock = SGameSetting.getGameSetting().getEquipSignUnlock();
|
||||||
|
if(equipSignUnlock[0]==1){
|
||||||
|
if(user.getPlayerInfoManager().getLevel()<equipSignUnlock[0]){
|
||||||
|
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.SOUL_EQUIP_WEAR_RESPONSE_VALUE,"玩家等级不够,无法装备!限制"+equipSignUnlock[0]+"级");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(hero.getStar()<equipSignUnlock[1]){
|
||||||
|
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.SOUL_EQUIP_WEAR_RESPONSE_VALUE,"妖灵师等级不够,无法装备!限制"+equipSignUnlock[1]+"级");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<Integer,Integer> currentType = new HashMap<>(); //pos2type
|
Map<Integer,Integer> currentType = new HashMap<>(); //pos2type
|
||||||
|
|
Loading…
Reference in New Issue