渔民小镇 1 năm trước cách đây
mục cha
commit
56e578d644

+ 1 - 1
one-client/src/main/java/com/iohao/mmo/client/common/item/ItemTypeNode.java

@@ -19,7 +19,7 @@
 package com.iohao.mmo.client.common.item;
 
 /**
- * @param itemTypeId 物品 id
+ * @param itemTypeId 物品类型 id
  * @param quantity   物品数量
  * @author 渔民小镇
  * @date 2023-08-15

+ 7 - 7
one-client/src/main/java/com/iohao/mmo/client/common/item/ItemTypeNodeKit.java

@@ -36,24 +36,24 @@ public class ItemTypeNodeKit {
     final Map<String, InternalItemTypeConfig> map = new HashMap<>();
 
     public void add(String itemTypeId, String name, String description) {
-        var itemTypeNode = new InternalItemTypeConfig(itemTypeId, name, description);
+        var nodeConfig = new InternalItemTypeConfig(itemTypeId, name, description);
 
-        map.put(itemTypeId, itemTypeNode);
+        map.put(itemTypeId, nodeConfig);
     }
 
     public String toString(ItemTypeNode itemTypeNode) {
-        var node = map.get(itemTypeNode.itemTypeId());
+        var nodeConfig = map.get(itemTypeNode.itemTypeId());
         String line = "\n物品信息:[%s x %s];物品描述:%s";
 
         return String.format(line
-                , node.name()
+                , nodeConfig.name()
                 , itemTypeNode.quantity()
-                , node.description()
+                , nodeConfig.description()
         );
     }
 
     public JSONObject toJSON(String itemTypeId) {
-        var item = map.get(itemTypeId);
-        return JsonKit.toJSON(item);
+        var nodeConfig = map.get(itemTypeId);
+        return JsonKit.toJSON(nodeConfig);
     }
 }