Commit 1a31f4c49a452e30ff9cd72f5c1e1e92b95bb88d
Merge branch 'cn/develop' into cn/publish/preview
Showing
1 changed file
with
13 additions
and
0 deletions
Show diff stats
src/actions/GmAction.lua
... | ... | @@ -1139,4 +1139,17 @@ function _M.get_draw_hero_pro(role, pms) |
1139 | 1139 | return json.encode(result) |
1140 | 1140 | end |
1141 | 1141 | |
1142 | +function _M.decrePayR(role, pms) | |
1143 | + local id = tonumber(pms.pm1) | |
1144 | + local payR = role.storeData:getProperty("payR") | |
1145 | + if payR[id] > 0 then | |
1146 | + payR[id] = payR[id] - 1 | |
1147 | + if payR[id] == 0 then | |
1148 | + payR[id] = nil | |
1149 | + end | |
1150 | + end | |
1151 | + role.storeData:updateProperty({field = "payR", value = payR}) | |
1152 | + return "指令成功" | |
1153 | +end | |
1154 | + | |
1142 | 1155 | return _M |
1143 | 1156 | \ No newline at end of file | ... | ... |