Commit 286c980a789b1bf7ecdd440a4784acbd132302d0
1 parent
4c7d396c
挂机战斗胜利才触发对应的引导
Showing
1 changed file
with
17 additions
and
16 deletions
Show diff stats
src/actions/HangAction.lua
| ... | ... | @@ -239,6 +239,23 @@ function _M.endBattleRpc(agent, data) |
| 239 | 239 | reward, change = role:award(reward, {log = {desc = "hangBattle", int1 = carbonId}}) |
| 240 | 240 | |
| 241 | 241 | role:checkTaskEnter("HangPass", {id = carbonId}) |
| 242 | + | |
| 243 | + -- 引导 | |
| 244 | + if carbonId == 10101 then | |
| 245 | + role:finishGuide(5) | |
| 246 | + elseif carbonId == 10102 then | |
| 247 | + role:finishGuide(8) | |
| 248 | + elseif carbonId == 10103 then | |
| 249 | + role:finishGuide(9) | |
| 250 | + elseif carbonId == 10220 then | |
| 251 | + role:finishGuide(22) | |
| 252 | + end | |
| 253 | + for _, guideData in pairs(csvdb["guide_unlockCsv"]) do | |
| 254 | + if guideData.type == 3 and guideData.carbonId == carbonId then | |
| 255 | + role:saveGuide(guideData.guideId,1,true) | |
| 256 | + break | |
| 257 | + end | |
| 258 | + end | |
| 242 | 259 | end |
| 243 | 260 | if hangInfo.carbonId < carbonId then |
| 244 | 261 | hangInfo.carbonId = carbonId |
| ... | ... | @@ -247,22 +264,6 @@ function _M.endBattleRpc(agent, data) |
| 247 | 264 | |
| 248 | 265 | local team = role:getProperty("pvpTC") |
| 249 | 266 | |
| 250 | - -- 引导 | |
| 251 | - if carbonId == 10101 then | |
| 252 | - role:finishGuide(5) | |
| 253 | - elseif carbonId == 10102 then | |
| 254 | - role:finishGuide(8) | |
| 255 | - elseif carbonId == 10103 then | |
| 256 | - role:finishGuide(9) | |
| 257 | - elseif carbonId == 10220 then | |
| 258 | - role:finishGuide(22) | |
| 259 | - end | |
| 260 | - for _, guideData in pairs(csvdb["guide_unlockCsv"]) do | |
| 261 | - if guideData.type == 3 and guideData.carbonId == carbonId then | |
| 262 | - role:saveGuide(guideData.guideId,1,true) | |
| 263 | - break | |
| 264 | - end | |
| 265 | - end | |
| 266 | 267 | |
| 267 | 268 | SendPacket(actionCodes.Hang_endBattleRpc, MsgPack.pack({ |
| 268 | 269 | starNum = msg.starNum, | ... | ... |