Merge branch 'master_dev' into master_otnew
commit
5a5a82ea5a
|
@ -3835,7 +3835,7 @@ public class HeroLogic {
|
|||
}
|
||||
|
||||
/**
|
||||
* 英雄,灵兽合成
|
||||
* 英雄,灵兽,神兵合成
|
||||
*
|
||||
* @param iSession
|
||||
* @param item
|
||||
|
@ -3852,12 +3852,14 @@ public class HeroLogic {
|
|||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
int composeNum = itemNum / sItem.getUsePerCount();
|
||||
SGameSetting gameSetting = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting();
|
||||
if (composeNum <= 0 || composeNum > gameSetting.getHeroCompoundLimit()) {
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
if (hasHeroNum + composeNum > gameSetting.getHeroNumlimit()) {
|
||||
throw new ErrorCodeException(ErrorCode.HERO_HERO_MAX);
|
||||
if (sItem.getItemType() == GlobalItemType.CARD){
|
||||
SGameSetting gameSetting = STableManager.getFigureConfig(CommonStaticConfig.class).getGameSetting();
|
||||
if (composeNum <= 0 || composeNum > gameSetting.getHeroCompoundLimit()) {
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
if (hasHeroNum + composeNum > gameSetting.getHeroNumlimit()) {
|
||||
throw new ErrorCodeException(ErrorCode.HERO_HERO_MAX);
|
||||
}
|
||||
}
|
||||
boolean result = ItemUtil.checkCost(user, sItem, itemNum, BIReason.COMPOS_HERO_CONSUME, itemId);
|
||||
if (!result) {
|
||||
|
|
Loading…
Reference in New Issue