diff --git a/src/actions/GmAction.lua b/src/actions/GmAction.lua index f093107..bf2f59e 100644 --- a/src/actions/GmAction.lua +++ b/src/actions/GmAction.lua @@ -1139,4 +1139,17 @@ function _M.get_draw_hero_pro(role, pms) return json.encode(result) end +function _M.decrePayR(role, pms) + local id = tonumber(pms.pm1) + local payR = role.storeData:getProperty("payR") + if payR[id] > 0 then + payR[id] = payR[id] - 1 + if payR[id] == 0 then + payR[id] = nil + end + end + role.storeData:updateProperty({field = "payR", value = payR}) + return "指令成功" +end + return _M \ No newline at end of file -- libgit2 0.21.2