Commit 74a8fdc94e9cccfd76b2b525050d75e043700067
1 parent
7b64b6cd
奖励副本 胜利扣除次数
Showing
2 changed files
with
14 additions
and
5 deletions
Show diff stats
src/actions/HangAction.lua
... | ... | @@ -447,8 +447,6 @@ function _M.startBonusBattleRpc(agent, data) |
447 | 447 | local bonusC = role.dailyData:getProperty("bonusC") |
448 | 448 | bonusC[bonusData.type] = bonusC[bonusData.type] or {c = 0, b = 0} |
449 | 449 | if globalCsv.bonus_daily_count - bonusC[bonusData.type]["c"] <= 0 then return 4 end |
450 | - bonusC[bonusData.type]["c"] = bonusC[bonusData.type]["c"] + 1 | |
451 | - role.dailyData:updateProperty({field = "bonusC", value = bonusC}) | |
452 | 450 | |
453 | 451 | |
454 | 452 | role.__bonusBattleCache = { |
... | ... | @@ -472,6 +470,13 @@ function _M.endBonusBattleRpc(agent, data) |
472 | 470 | |
473 | 471 | local reward |
474 | 472 | if starNum and starNum > 0 then |
473 | + -- 胜利扣除次数 | |
474 | + local bonusC = role.dailyData:getProperty("bonusC") | |
475 | + bonusC[bonusData.type] = bonusC[bonusData.type] or {c = 0, b = 0} | |
476 | + if globalCsv.bonus_daily_count - bonusC[bonusData.type]["c"] <= 0 then return 3 end | |
477 | + bonusC[bonusData.type]["c"] = bonusC[bonusData.type]["c"] + 1 | |
478 | + role.dailyData:updateProperty({field = "bonusC", value = bonusC}) | |
479 | + | |
475 | 480 | reward = role:award(bonusData.reward, {log = {desc = "bonusBattle", int1 = id}}) |
476 | 481 | role:checkTaskEnter("BonusPass", {id = id}) |
477 | 482 | end | ... | ... |
src/adv/Adv.lua
... | ... | @@ -887,8 +887,13 @@ function Adv:cost(item, params, check) |
887 | 887 | end |
888 | 888 | |
889 | 889 | --事件点击处理 |
890 | -local function clickOut(self, room, block, params) | |
890 | +local function clickOut(self, room, block, params, isExit) | |
891 | 891 | if self:getCurMap():checkOver() then --检查是否可以出去了 |
892 | + if isExit then | |
893 | + self:over(true) | |
894 | + return true | |
895 | + end | |
896 | + | |
892 | 897 | if #self.mapStack > 1 then -- 处于夹层中 |
893 | 898 | table.remove(self.mapStack) --退出夹层 |
894 | 899 | self:backLayer(-1) |
... | ... | @@ -942,8 +947,7 @@ local function clickOut(self, room, block, params) |
942 | 947 | end |
943 | 948 | |
944 | 949 | local function clickExit(self, room, block, params) |
945 | - self:over(true) | |
946 | - return true | |
950 | + return clickOut(self, room, block, params, true) | |
947 | 951 | end |
948 | 952 | |
949 | 953 | --战斗 普通攻击 | ... | ... |