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,8 +447,6 @@ function _M.startBonusBattleRpc(agent, data) | ||
447 | local bonusC = role.dailyData:getProperty("bonusC") | 447 | local bonusC = role.dailyData:getProperty("bonusC") |
448 | bonusC[bonusData.type] = bonusC[bonusData.type] or {c = 0, b = 0} | 448 | bonusC[bonusData.type] = bonusC[bonusData.type] or {c = 0, b = 0} |
449 | if globalCsv.bonus_daily_count - bonusC[bonusData.type]["c"] <= 0 then return 4 end | 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 | role.__bonusBattleCache = { | 452 | role.__bonusBattleCache = { |
@@ -472,6 +470,13 @@ function _M.endBonusBattleRpc(agent, data) | @@ -472,6 +470,13 @@ function _M.endBonusBattleRpc(agent, data) | ||
472 | 470 | ||
473 | local reward | 471 | local reward |
474 | if starNum and starNum > 0 then | 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 | reward = role:award(bonusData.reward, {log = {desc = "bonusBattle", int1 = id}}) | 480 | reward = role:award(bonusData.reward, {log = {desc = "bonusBattle", int1 = id}}) |
476 | role:checkTaskEnter("BonusPass", {id = id}) | 481 | role:checkTaskEnter("BonusPass", {id = id}) |
477 | end | 482 | end |
src/adv/Adv.lua
@@ -887,8 +887,13 @@ function Adv:cost(item, params, check) | @@ -887,8 +887,13 @@ function Adv:cost(item, params, check) | ||
887 | end | 887 | end |
888 | 888 | ||
889 | --事件点击处理 | 889 | --事件点击处理 |
890 | -local function clickOut(self, room, block, params) | 890 | +local function clickOut(self, room, block, params, isExit) |
891 | if self:getCurMap():checkOver() then --检查是否可以出去了 | 891 | if self:getCurMap():checkOver() then --检查是否可以出去了 |
892 | + if isExit then | ||
893 | + self:over(true) | ||
894 | + return true | ||
895 | + end | ||
896 | + | ||
892 | if #self.mapStack > 1 then -- 处于夹层中 | 897 | if #self.mapStack > 1 then -- 处于夹层中 |
893 | table.remove(self.mapStack) --退出夹层 | 898 | table.remove(self.mapStack) --退出夹层 |
894 | self:backLayer(-1) | 899 | self:backLayer(-1) |
@@ -942,8 +947,7 @@ local function clickOut(self, room, block, params) | @@ -942,8 +947,7 @@ local function clickOut(self, room, block, params) | ||
942 | end | 947 | end |
943 | 948 | ||
944 | local function clickExit(self, room, block, params) | 949 | local function clickExit(self, room, block, params) |
945 | - self:over(true) | ||
946 | - return true | 950 | + return clickOut(self, room, block, params, true) |
947 | end | 951 | end |
948 | 952 | ||
949 | --战斗 普通攻击 | 953 | --战斗 普通攻击 |