Commit cab8ee2654899a1e0e487447e539db6b70a00018
Merge branch 'cn/develop' into cn/publish/preview
Showing
1 changed file
with
8 additions
and
1 deletions
Show diff stats
src/models/Daily.lua
@@ -201,6 +201,13 @@ function Daily:checkTreasureWeight(treasureList, tmptreasure, treasureBase) | @@ -201,6 +201,13 @@ function Daily:checkTreasureWeight(treasureList, tmptreasure, treasureBase) | ||
201 | local treasure | 201 | local treasure |
202 | if next(chapters) == nil then return end | 202 | if next(chapters) == nil then return end |
203 | 203 | ||
204 | + --扣除在挖宝列表里未过期宝藏的资源值 | ||
205 | + for _, val in pairs(treasureList) do | ||
206 | + if not val["expire_time"] then | ||
207 | + treasureBase = treasureBase - val["treasure_value"] | ||
208 | + end | ||
209 | + end | ||
210 | + | ||
204 | while next(tmptreasure) do | 211 | while next(tmptreasure) do |
205 | local tmp, num = self:checkTreasureBase(tmptreasure, treasureBase, removeId) | 212 | local tmp, num = self:checkTreasureBase(tmptreasure, treasureBase, removeId) |
206 | 213 | ||
@@ -335,7 +342,7 @@ function Daily:getTreasrueList() | @@ -335,7 +342,7 @@ function Daily:getTreasrueList() | ||
335 | local tmpcsv = csvdb["idle_treasureCsv"] | 342 | local tmpcsv = csvdb["idle_treasureCsv"] |
336 | local treasureList = self:getProperty("treasureList") or {} --挖宝列表 过期删除 领取奖励删除 跨天更新 | 343 | local treasureList = self:getProperty("treasureList") or {} --挖宝列表 过期删除 领取奖励删除 跨天更新 |
337 | local tmptreasure = {} | 344 | local tmptreasure = {} |
338 | - local treasureBase = globalCsv.idle_treasure_base | 345 | + local treasureBase = globalCsv.idle_treasure_base + self.owner:getBnousTreasureBaseMaximum() |
339 | for id, val in pairs(tmpcsv) do | 346 | for id, val in pairs(tmpcsv) do |
340 | if self:checkUnlock(val) == true then | 347 | if self:checkUnlock(val) == true then |
341 | local treasure = self:checkTreasureExpired(val, treasureList) | 348 | local treasure = self:checkTreasureExpired(val, treasureList) |