diff --git a/src/actions/GmAction.lua b/src/actions/GmAction.lua index b0abb1d..ccb1208 100644 --- a/src/actions/GmAction.lua +++ b/src/actions/GmAction.lua @@ -38,12 +38,20 @@ function _M.rune(role, pms) end function _M.get(role, pms) - local itemId = tonum(pms.pm1) - if not csvdb["itemCsv"][itemId] then - return "物品不存在" + if pms.pm1 == "ALL" then + for id,data in pairs(csvdb["itemCsv"]) do + if data.type ~= 4 then + role:award({[id] = 10}) + end + end + else + local itemId = tonum(pms.pm1) + if not csvdb["itemCsv"][itemId] then + return "物品不存在" + end + local count = tonum(pms.pm2) + role:award({[itemId] = count}) end - local count = tonum(pms.pm2) - role:award({[itemId] = count}) return "成功" end -- libgit2 0.21.2