diff --git a/src/actions/GmAction.lua b/src/actions/GmAction.lua index e004b64..d20acfc 100644 --- a/src/actions/GmAction.lua +++ b/src/actions/GmAction.lua @@ -301,9 +301,13 @@ function _M.get(role, pms) end end elseif pms.pm1 == "HERO" then - for itemId = 400 , 700 do + local unitCsv = csvdb["unitCsv"] + for itemId = 400 , 800 do if csvdb["itemCsv"][itemId] then - role:award({[itemId] = 1}, {log = {desc = "gm"}}) + local heroUnit = unitCsv[itemId - 300] + if heroUnit.open == 1 then + role:award({[itemId] = 1}, {log = {desc = "gm"}}) + end end end elseif pms.pm1 == "MAXHERO" then -- libgit2 0.21.2