|
@@ -26,7 +26,7 @@ import com.iohao.game.external.client.AbstractInputCommandRegion;
|
|
|
import com.iohao.game.external.client.command.InputRequestData;
|
|
|
import com.iohao.game.external.client.kit.ScannerKit;
|
|
|
import com.iohao.game.external.client.kit.SplitParam;
|
|
|
-import com.iohao.mmo.bag.ItemIdConst;
|
|
|
+import com.iohao.mmo.bag.ItemTypeIdConst;
|
|
|
import com.iohao.mmo.bag.cmd.BagCmd;
|
|
|
import com.iohao.mmo.bag.proto.BagItemMessage;
|
|
|
import com.iohao.mmo.bag.proto.BagMessage;
|
|
@@ -69,19 +69,19 @@ public class BagInputCommandRegion extends AbstractInputCommandRegion {
|
|
|
|
|
|
List<BagItemMessage> list = new ArrayList<>();
|
|
|
// 添加一些经验值道具
|
|
|
- BagItemMessage bagItemMessage = BagInternalHelper.ofBagItemMessage(ItemIdConst.expId);
|
|
|
+ BagItemMessage bagItemMessage = BagInternalHelper.ofBagItemMessage(ItemTypeIdConst.expId);
|
|
|
bagItemMessage.quantity = 10;
|
|
|
list.add(bagItemMessage);
|
|
|
log.info("添加 {} 个经验值道具 {}", bagItemMessage.quantity, bagItemMessage);
|
|
|
|
|
|
// 添加一些装备制造书材料
|
|
|
- bagItemMessage = BagInternalHelper.ofBagItemMessage(ItemIdConst.equipWeaponBook10);
|
|
|
+ bagItemMessage = BagInternalHelper.ofBagItemMessage(ItemTypeIdConst.equipWeaponBook10);
|
|
|
bagItemMessage.quantity = 1;
|
|
|
list.add(bagItemMessage);
|
|
|
log.info("添加 {} 【装备-武器】制造书材料 {}", bagItemMessage.quantity, bagItemMessage);
|
|
|
|
|
|
// 添加一些装备制造书材料
|
|
|
- bagItemMessage = BagInternalHelper.ofBagItemMessage(ItemIdConst.iron10);
|
|
|
+ bagItemMessage = BagInternalHelper.ofBagItemMessage(ItemTypeIdConst.iron10);
|
|
|
bagItemMessage.quantity = 1;
|
|
|
list.add(bagItemMessage);
|
|
|
log.info("添加 {} 装备-制造材料-铁 {}", bagItemMessage.quantity, bagItemMessage);
|
|
@@ -95,9 +95,9 @@ public class BagInputCommandRegion extends AbstractInputCommandRegion {
|
|
|
BagMessage value = result.getValue();
|
|
|
|
|
|
List<JSONObject> list = value.itemMap.values().stream().map(bagItemMessage -> {
|
|
|
- String itemId = bagItemMessage.itemId;
|
|
|
+ String itemTypeId = bagItemMessage.itemTypeId;
|
|
|
JSONObject bagItemMessageJson = JsonKit.toJSON(bagItemMessage);
|
|
|
- JSONObject itemMessageJson = ItemKit.toJSON(itemId);
|
|
|
+ JSONObject itemMessageJson = ItemKit.toJSON(itemTypeId);
|
|
|
return JsonKit.merge(bagItemMessageJson, itemMessageJson);
|
|
|
}).toList();
|
|
|
|
|
@@ -123,7 +123,7 @@ public class BagInputCommandRegion extends AbstractInputCommandRegion {
|
|
|
|
|
|
BagItemMessage bagItemMessage = new BagItemMessage();
|
|
|
bagItemMessage.id = id;
|
|
|
- bagItemMessage.itemId = itemId;
|
|
|
+ bagItemMessage.itemTypeId = itemId;
|
|
|
bagItemMessage.quantity = 1;
|
|
|
|
|
|
ScannerKit.log(() -> log.info("{}", bagItemMessage));
|
|
@@ -188,15 +188,15 @@ public class BagInputCommandRegion extends AbstractInputCommandRegion {
|
|
|
log.info("格式 [制造书物品id-制造铁物品id]");
|
|
|
});
|
|
|
|
|
|
- String defaultValue = ItemIdConst.equipWeaponBook10 + "-" + ItemIdConst.iron10;
|
|
|
+ String defaultValue = ItemTypeIdConst.equipWeaponBook10 + "-" + ItemTypeIdConst.iron10;
|
|
|
String inputType = defaultValue;
|
|
|
// inputType = ScannerKit.nextLine(defaultValue);
|
|
|
SplitParam param = new SplitParam(inputType);
|
|
|
|
|
|
- String equipWeaponBook = param.getString(0, ItemIdConst.equipWeaponBook10);
|
|
|
+ String equipWeaponBook = param.getString(0, ItemTypeIdConst.equipWeaponBook10);
|
|
|
UseItemMessage useItemMessageEquip = BagInternalHelper.ofUseItemMessage(equipWeaponBook);
|
|
|
|
|
|
- String iron = param.getString(1, ItemIdConst.iron10);
|
|
|
+ String iron = param.getString(1, ItemTypeIdConst.iron10);
|
|
|
UseItemMessage useItemMessageIron = BagInternalHelper.ofUseItemMessage(iron);
|
|
|
|
|
|
return List.of(useItemMessageEquip, useItemMessageIron);
|