宝物分解bug

back_recharge
jiahuiwen 2021-11-17 17:24:30 +08:00
parent daa339ee54
commit 7961a40690
1 changed files with 5 additions and 2 deletions

View File

@ -336,8 +336,11 @@ public class ItemLogic {
throw new ErrorCodeException(ErrorCode.ITEM_DECOMPOSE_NO_EQUIP);
}
PropertyItem propertyItem = equipMap.get(jewelId);
if (!StringUtil.isEmpty(propertyItem.getHeroId())&&user.getHeroManager().getHero(propertyItem.getHeroId())!=null) {
throw new ErrorCodeException(ErrorCode.ITEM_DECOMPOSE_SOULE_CANT);
if (!StringUtil.isEmpty(propertyItem.getHeroId())) {
Hero hero = user.getHeroManager().getHero(propertyItem.getHeroId());
if (hero != null && hero.getJewelInfo().contains(jewelId)) {
throw new ErrorCodeException(ErrorCode.ITEM_DECOMPOSE_SOULE_CANT);
}
}
Jewel jewel = (Jewel) propertyItem;
SJewelConfig config = STableManager.getConfig(SJewelConfig.class).get(propertyItem.getEquipId());