英雄归元、分解修改
parent
7228d149d4
commit
f7bdc25b3c
|
@ -2338,10 +2338,11 @@ public class HeroLogic{
|
|||
int templateId = hero.getTemplateId();
|
||||
int star = hero.getStar();
|
||||
Map<Integer, SHeroReturn> sHeroReturnMap = SHeroReturn.sheroReturnMap.get(templateId);
|
||||
if(sHeroReturnMap == null || !sHeroReturnMap.containsKey(breakId)){
|
||||
int breakFloor = breakId==0?0:STableManager.getConfig(SCHeroRankUpConfig.class).get(breakId).getPhase()[1];
|
||||
if(sHeroReturnMap == null || !sHeroReturnMap.containsKey(breakFloor)){
|
||||
throw new ErrorCodeException(ErrorCode.newDefineCode("not satisfy"));
|
||||
}
|
||||
SHeroReturn sHeroReturn = sHeroReturnMap.get(breakId);
|
||||
SHeroReturn sHeroReturn = sHeroReturnMap.get(breakFloor);
|
||||
boolean b = ItemUtil.itemCost(user, sHeroReturn.getReturnConsume(), BIReason.HERO_BACK_CONSUME, templateId * 100 + star);
|
||||
if(!b){
|
||||
throw new ErrorCodeException(ErrorCode.HERO_ITEM_NOT);
|
||||
|
|
|
@ -383,7 +383,9 @@ public class ItemLogic {
|
|||
heroManager.removeHero(uid,heroId);
|
||||
int[][] sumConsume = SHeroLevlConfig.getsHeroLevlConfigMap().get(hero.getLevel()).getSumConsume();
|
||||
SHeroSacrifice starSHeroSacrifice = STableManager.getFigureConfig(HeroStaticConfig.class).getsHeroSacrificeMap(1, hero.getStar());
|
||||
SHeroSacrifice breakSHeroSacrifice = STableManager.getFigureConfig(HeroStaticConfig.class).getsHeroSacrificeMap(2, hero.getBreakId());
|
||||
int breakFloor = hero.getBreakId()==0?0:STableManager.getConfig(SCHeroRankUpConfig.class).get(hero.getBreakId()).getPhase()[1];
|
||||
|
||||
SHeroSacrifice breakSHeroSacrifice = STableManager.getFigureConfig(HeroStaticConfig.class).getsHeroSacrificeMap(2, breakFloor);
|
||||
for(int[] item:sumConsume){
|
||||
baseItemMap.put(item[0],baseItemMap.getOrDefault(item[0],0)+item[1]);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,8 @@ public class SCHeroRankUpConfig implements BaseConfig{
|
|||
|
||||
private int judgeClass;
|
||||
|
||||
private int[] phase;
|
||||
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
}
|
||||
|
@ -79,4 +81,8 @@ public class SCHeroRankUpConfig implements BaseConfig{
|
|||
public int[][] getSumConsume() {
|
||||
return sumConsume;
|
||||
}
|
||||
|
||||
public int[] getPhase() {
|
||||
return phase;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue