Commit e881b80757569a4b0f286a80b95d88767275d91e
1 parent
42674b1a
通关 GM 特殊需求
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
src/actions/GmAction.lua
@@ -187,7 +187,7 @@ function _M.fb(role, pms) -- 直接通关 | @@ -187,7 +187,7 @@ function _M.fb(role, pms) -- 直接通关 | ||
187 | addPre(pre) | 187 | addPre(pre) |
188 | end | 188 | end |
189 | end | 189 | end |
190 | - role:hangFinish(carbonId) | 190 | + role:hangFinish(carbonId, true) |
191 | addPre(carbonId) | 191 | addPre(carbonId) |
192 | 192 | ||
193 | role:log("gm_action", {desc = "fb", int1 = carbonId, key1 = pms.sender}) | 193 | role:log("gm_action", {desc = "fb", int1 = carbonId, key1 = pms.sender}) |
@@ -210,7 +210,7 @@ function _M.fbc(role, pms) -- 直接通关 | @@ -210,7 +210,7 @@ function _M.fbc(role, pms) -- 直接通关 | ||
210 | addPre(pre) | 210 | addPre(pre) |
211 | end | 211 | end |
212 | end | 212 | end |
213 | - role:hangFinish(carbonId) | 213 | + role:hangFinish(10101, true) |
214 | addPre(carbonId) | 214 | addPre(carbonId) |
215 | 215 | ||
216 | role:checkTaskEnter("HangPass", {id = carbonId}) | 216 | role:checkTaskEnter("HangPass", {id = carbonId}) |
src/models/RolePlugin.lua
@@ -1361,10 +1361,10 @@ function RolePlugin.bind(Role) | @@ -1361,10 +1361,10 @@ function RolePlugin.bind(Role) | ||
1361 | return (hangPass[diff] or 0) >= carbonId | 1361 | return (hangPass[diff] or 0) >= carbonId |
1362 | end | 1362 | end |
1363 | 1363 | ||
1364 | - function Role:hangFinish(carbonId) | 1364 | + function Role:hangFinish(carbonId, force) |
1365 | local hangPass = self:getProperty("hangPass") | 1365 | local hangPass = self:getProperty("hangPass") |
1366 | local diff = math.floor(carbonId / 10000) | 1366 | local diff = math.floor(carbonId / 10000) |
1367 | - if (hangPass[diff] or 0) < carbonId then | 1367 | + if (hangPass[diff] or 0) < carbonId or force then |
1368 | hangPass[diff] = carbonId | 1368 | hangPass[diff] = carbonId |
1369 | self:updateProperty({field = "hangPass", value = hangPass}) | 1369 | self:updateProperty({field = "hangPass", value = hangPass}) |
1370 | end | 1370 | end |