激活皮肤消耗
parent
7232b8604a
commit
4105cb1292
|
@ -290,4 +290,6 @@ public interface BIReason {
|
|||
|
||||
int SPECIAL_FREE_PIECE_CONSUME = 1072;//灵兽放生碎片消耗
|
||||
|
||||
int SKIN_USE_CONSUME = 1073;//激活皮肤消耗
|
||||
|
||||
}
|
|
@ -204,6 +204,11 @@ public class ItemLogic {
|
|||
}else{
|
||||
time = sHeroSkin.getTime()+TimeUtils.nowInt();
|
||||
}
|
||||
|
||||
boolean use = ItemUtil.itemCost(user,new int[][]{{item.getItemId(),item.getItemNum()}},BIReason.SKIN_USE_CONSUME,1);
|
||||
if(!use){
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
}
|
||||
user.getHeroManager().addSkin(sHeroSkin.getType(),time);
|
||||
ItemUtil.drop(user,new int[][]{sHeroSkin.getHeadIcon()},BIReason.SKIN_USE_REWARD);
|
||||
HeroInfoProto.GetSkinIndication indication = HeroInfoProto.GetSkinIndication.newBuilder()
|
||||
|
|
Loading…
Reference in New Issue