二维数组赋值

back_recharge
jiahuiwen 2019-06-20 19:42:17 +08:00
parent 6433dc032f
commit 3d6690ccab
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ public class UseItemAndDestroyBehavior extends BaseBehavior {
@Override
public boolean process(int optionId, User user, int[][] behaviorTypeValues, MapInfoProto.EventUpdateResponse.Builder eventUpdateResponse) throws Exception {
int[][] userItem = new int[behaviorTypeValues[0][0]][behaviorTypeValues[0][1]];
int[][] userItem = {{behaviorTypeValues[0][0],behaviorTypeValues[0][1]}};
boolean isEnough = ItemUtil.itemCost(user, userItem, BIReason.MAP_EVENT_CONSUME,getBehaviorType());
if (!isEnough) {
return isEnough;