修改合成限制为只限制英雄
parent
ea310891c5
commit
f55d9f3cd6
|
@ -3826,7 +3826,7 @@ public class HeroLogic {
|
|||
}
|
||||
|
||||
/**
|
||||
* 英雄,灵兽合成
|
||||
* 英雄,灵兽,神兵合成
|
||||
*
|
||||
* @param iSession
|
||||
* @param item
|
||||
|
@ -3843,12 +3843,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