lvxinran 2019-09-12 16:19:28 +08:00
commit 4f39ea2210
3 changed files with 23 additions and 4 deletions

View File

@ -108,6 +108,8 @@ public class SGameSetting implements BaseConfig {
private int[] equipTalismanaUnlock;
private int[] equipSignUnlock;
private static SGameSetting gameSetting;
@ -319,4 +321,9 @@ public class SGameSetting implements BaseConfig {
public int[] getEquipTalismanaUnlock() {
return equipTalismanaUnlock;
}
public int[] getEquipSignUnlock() {
return equipSignUnlock;
}
}

View File

@ -58,8 +58,8 @@ public class SGlobalSystemConfig implements BaseConfig {
}
if(2 == sGlobalSystemConfig.getType()){
long cacheOpenTime = GameApplication.serverConfig.getCacheOpenTime();
sGlobalSystemConfig.setSeasonOpenLong(cacheOpenTime +Integer.parseInt(sGlobalSystemConfig.getSeasonOpen()));
sGlobalSystemConfig.setSeasonEndLong(cacheOpenTime +Integer.parseInt(sGlobalSystemConfig.getSeasonEnd()));
sGlobalSystemConfig.setSeasonOpenLong(cacheOpenTime +Integer.parseInt(sGlobalSystemConfig.getSeasonOpen())*1000);
sGlobalSystemConfig.setSeasonEndLong(cacheOpenTime +Integer.parseInt(sGlobalSystemConfig.getSeasonEnd())*1000);
}else{
sGlobalSystemConfig.setSeasonOpenLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSeasonOpen(), TimeUtils.Stand_CeHua_Data_format));
sGlobalSystemConfig.setSeasonEndLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSeasonEnd(), TimeUtils.Stand_CeHua_Data_format));

View File

@ -1406,8 +1406,20 @@ public class HeroLogic {
Hero hero = user.getHeroManager().getHeroMap().get(heroId);
if (hero == null || equipIds.isEmpty()) {
MessageUtil.sendErrorResponse(session, 0, MessageTypeProto.MessageType.SOUL_EQUIP_WEAR_RESPONSE_VALUE, "");
return;
throw new Exception("英雄不存在或无装备"+heroId+"size"+equipIds.size());
}
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