消耗道具

back_recharge
wangyuan 2019-06-20 16:03:26 +08:00
parent 9836927645
commit 1046bcfb85
2 changed files with 8 additions and 3 deletions

View File

@ -80,5 +80,5 @@ public interface BIReason {
int ARENA_CHALLENGE_CONSUME = 1020;
int RINGFIRE_LOAD_CONSUME = 1021;
}

View File

@ -1549,8 +1549,13 @@ public class HeroLogic {
}
}
if(!exists){
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.RINGFIRE_LOAD_RESPONSE_VALUE,"not exists" +
"");
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.RINGFIRE_LOAD_RESPONSE_VALUE,"not exists" );
return;
}
SRingFireMaterialConfig sRingFireMaterialConfig = SRingFireMaterialConfig.config.get(comonpentId);
boolean enough = ItemUtil.itemCost(user, sRingFireMaterialConfig.getMaterial(), BIReason.RINGFIRE_LOAD_CONSUME, comonpentId);
if(!enough){
MessageUtil.sendErrorResponse(session,0,MessageTypeProto.MessageType.RINGFIRE_LOAD_RESPONSE_VALUE,"道具不足" );
return;
}
pokemon.upOrActiveComonpent(comonpentId);