浏览代码

道具合成:辅助道具消耗

huangyuhao 7 月之前
父节点
当前提交
2750c56e67
共有 1 个文件被更改,包括 13 次插入2 次删除
  1. 13 2
      meta/userapi/lua/ItemSynthesis.lua

+ 13 - 2
meta/userapi/lua/ItemSynthesis.lua

@@ -82,9 +82,14 @@ function ItemSynthesis.synthesis(actor, msgData)
82
         noticeTip.noticeinfo(actor, StringIdConst.TEXT358)
82
         noticeTip.noticeinfo(actor, StringIdConst.TEXT358)
83
         if special then
83
         if special then
84
             for index, value in pairs(special) do
84
             for index, value in pairs(special) do
85
-                removeItemIndex[index] = value["itemIndex"]
85
+                removeitembyidxlist(actor, value["itemIndex"], 9999, "物品合成")
86
+            end
87
+        end
88
+        -- 辅助道具消耗
89
+        if assistantItem then
90
+            for index, value in pairs(assistantItem) do
91
+                removeitembyidxlist(actor, value["itemIndex"], 9999, "物品合成")
86
             end
92
             end
87
-            removeitembyidxlist(actor, removeItemIndex, 9999, "物品合成")
88
         end
93
         end
89
         return
94
         return
90
     end
95
     end
@@ -149,6 +154,12 @@ function ItemSynthesis.synthesis(actor, msgData)
149
                 productItemInfo[productItem] = productItemInfo[productItem] + 1
154
                 productItemInfo[productItem] = productItemInfo[productItem] + 1
150
             end
155
             end
151
         end
156
         end
157
+        -- 辅助道具消耗
158
+        if assistantItem then
159
+            for index, value in pairs(assistantItem) do
160
+                removeitembyidxlist(actor, value["itemIndex"], 9999, "物品合成")
161
+            end
162
+        end
152
     end
163
     end
153
 
164
 
154
     if not table.isNullOrEmpty(productItemInfo) then
165
     if not table.isNullOrEmpty(productItemInfo) then