修复代码

back_recharge
lvxinran 2021-03-19 17:49:49 +08:00
parent 63a8cc5b33
commit 6907229c3f
1 changed files with 6 additions and 1 deletions

View File

@ -595,8 +595,10 @@ public class ExpeditionLogic {
if (scHero == null) {
throw new ErrorCodeException(ErrorCode.CFG_NULL,"英雄表id不存在:"+heroTid);
}
// 等级上限验证
// 最高等级
level = level>scHero.getMaxLevel()?scHero.getMaxLevel():level;
// 最低20级
level = level<20?20:level;
//创建新的英雄
Hero newHero = new Hero(hero,user.getId(),heroTid,level);
// 魂宝灵宝,魂印需要走表
@ -843,6 +845,9 @@ public class ExpeditionLogic {
*
*/
private static void disposeWithHeroHoly(User user,Hero hero,StringBuilder skillSb){
if(!user.getExpeditionManager().getHeroItems().containsKey(hero.getTemplateId())){
return;
}
int holyId = user.getExpeditionManager().getHeroItems().get(hero.getTemplateId());
SExpeditionHolyConfig con = STableManager.getConfig(SExpeditionHolyConfig.class).get(holyId);
if( con != null ){