|
@@ -18,8 +18,11 @@
|
|
|
*/
|
|
|
package com.iohao.mmo.client.input;
|
|
|
|
|
|
+import com.google.protobuf.ListValue;
|
|
|
import com.iohao.game.action.skeleton.protocol.wrapper.ByteValueList;
|
|
|
import com.iohao.game.action.skeleton.protocol.wrapper.StringValue;
|
|
|
+import com.iohao.game.action.skeleton.protocol.wrapper.StringValueList;
|
|
|
+import com.iohao.game.action.skeleton.protocol.wrapper.WrapperKit;
|
|
|
import com.iohao.game.external.client.AbstractInputCommandRegion;
|
|
|
import com.iohao.game.external.client.command.InputRequestData;
|
|
|
import com.iohao.game.external.client.kit.ScannerKit;
|
|
@@ -28,6 +31,8 @@ import com.iohao.mmo.common.provide.kit.JsonKit;
|
|
|
import com.iohao.mmo.equip.cmd.EquipCmd;
|
|
|
import com.iohao.mmo.equip.proto.*;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -129,9 +134,11 @@ public class EquipInputCommandRegion extends AbstractInputCommandRegion {
|
|
|
ScannerKit.log(() -> log.info("请输入要删除的装备id,格式 [装备1id-装备2id]"));
|
|
|
String ids = ScannerKit.nextLine("1-1");
|
|
|
|
|
|
+ List<String> idList = Arrays.asList(ids.split("-"));
|
|
|
+
|
|
|
// 请求参数
|
|
|
- StringValue stringValue = StringValue.of(ids);
|
|
|
- return stringValue;
|
|
|
+ StringValueList listValue = WrapperKit.ofListStringValue(idList);
|
|
|
+ return listValue;
|
|
|
};
|
|
|
|
|
|
// 10-5
|
|
@@ -151,10 +158,12 @@ public class EquipInputCommandRegion extends AbstractInputCommandRegion {
|
|
|
ScannerKit.log(() -> log.info("请输入装备库itemTypeId列表,格式 [装备库itemTypeId1-装备库itemTypeId2-装备库itemTypeId3...]"));
|
|
|
String itemTypeIds = ScannerKit.nextLine("1-1");
|
|
|
|
|
|
+ List<String> itemTypeIdList = Arrays.asList(itemTypeIds.split("-"));
|
|
|
+
|
|
|
// 请求参数
|
|
|
- StringValue stringValue = StringValue.of(itemTypeIds);
|
|
|
+ StringValueList listValue = WrapperKit.ofListStringValue(itemTypeIdList);
|
|
|
|
|
|
- return stringValue;
|
|
|
+ return listValue;
|
|
|
};
|
|
|
// 10-13
|
|
|
ofCommand(EquipCmd.randomEquip).callback(ByteValueList.class, result -> {
|