修改合成限制为只限制英雄

master_otnew
grimm 2024-01-02 11:43:05 +08:00
parent ea310891c5
commit f55d9f3cd6
1 changed files with 9 additions and 7 deletions

View File

@ -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) {