back_recharge
duhui 2023-04-07 13:25:17 +08:00
parent 02762f8093
commit 0e22c4f222
1 changed files with 3 additions and 3 deletions

View File

@ -128,7 +128,7 @@ public class MagicSoldierLogic {
String format = MessageFormat.format("神兵涅槃退出表不存在uid{0}, 神兵tmpId{1}", user.getId(),soldier.getTmpId());
throw new ErrorCodeException(format);
}
boolean costLong = ItemUtil.checkCostLong(user, new int[][]{shenBing.getReturnCost()}, BIReason.MAGIC_SOLDIER_RETURN_COST);
boolean costLong = ItemUtil.checkCostLong(user, new int[][]{shenBing.getReturnCost()}, 1);
if (!costLong){
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
}
@ -139,14 +139,14 @@ public class MagicSoldierLogic {
SShenbingStar bingStar = SShenbingStar.starMap.get(shenBing.getQuality()).get(soldier.getStar());
reward.add(new int[][]{{shenBing.getId(),bingStar.getSumItemNum()}});
ItemUtil.itemCost(user, new int[][]{shenBing.getReturnCost()}, BIReason.MAGIC_SOLDIER_RETURN_COST,0);
// 完结
CommonProto.Drop.Builder drop = ItemUtil.drop(user, reward, BIReason.MAGIC_SOLDIER_RETURN_GET);
ItemUtil.itemCost(user, new int[][]{shenBing.getReturnCost()}, BIReason.MAGIC_SOLDIER_RETURN_COST,0);
builder.setDrop(drop);
soldier.setLevel(1);
soldier.setStar(0);
manager.setMagicSoldier(soldier);
builder.setDrop(drop);
MessageUtil.sendMessage(session, 1, MessageTypeProto.MessageType.MAGIC_SOLDIER_RETURN_RESPONSE_VALUE, builder.build(), true);
}