Commit 2c6371cb41148111664706fc68bc4042ee70740f
Merge remote-tracking branch 'origin/cn/develop' into cn/develop
# Conflicts: # src/actions/GmAction.lua
Showing
1 changed file
with
13 additions
and
0 deletions
Show diff stats
src/actions/GmAction.lua
| ... | ... | @@ -1139,6 +1139,19 @@ 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 | function _M.draw_code(role, pms) |
| 1143 | 1156 | local code = pms.pm1 |
| 1144 | 1157 | if type(code) ~= "string" then return -2 end | ... | ... |