Commit 60fff86655613fdd7356bbe81aeffc82cba3002a
1 parent
fc316d1f
微调 结算返还
Showing
2 changed files
with
5 additions
and
0 deletions
Show diff stats
src/adv/Adv.lua
@@ -776,6 +776,10 @@ function Adv:over(success, rewardRatio, overType) | @@ -776,6 +776,10 @@ function Adv:over(success, rewardRatio, overType) | ||
776 | end | 776 | end |
777 | reward = self.owner:award(reward, {log = {desc = "advOver", int1 = self.chapterId}}) | 777 | reward = self.owner:award(reward, {log = {desc = "advOver", int1 = self.chapterId}}) |
778 | 778 | ||
779 | + if not self:isEndless() then | ||
780 | + self.owner:changeAdvCount(self.level - chapterData.limitlevel) | ||
781 | + end | ||
782 | + | ||
779 | if success then | 783 | if success then |
780 | self.owner:checkTaskEnter("AdvPass", {id = self.chapterId, level = self.level, score = score}) | 784 | self.owner:checkTaskEnter("AdvPass", {id = self.chapterId, level = self.level, score = score}) |
781 | 785 |
src/models/RolePlugin.lua
@@ -852,6 +852,7 @@ function RolePlugin.bind(Role) | @@ -852,6 +852,7 @@ function RolePlugin.bind(Role) | ||
852 | 852 | ||
853 | --忽略上限 | 853 | --忽略上限 |
854 | function Role:changeAdvCount(change) | 854 | function Role:changeAdvCount(change) |
855 | + if change == 0 then return end | ||
855 | local count = self:getProperty("advC") | 856 | local count = self:getProperty("advC") |
856 | local ctime = self:getProperty("advCT") | 857 | local ctime = self:getProperty("advCT") |
857 | if ctime == 0 then | 858 | if ctime == 0 then |