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 | 201 | local treasure |
| 202 | 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 | 211 | while next(tmptreasure) do |
| 205 | 212 | local tmp, num = self:checkTreasureBase(tmptreasure, treasureBase, removeId) |
| 206 | 213 | |
| ... | ... | @@ -335,7 +342,7 @@ function Daily:getTreasrueList() |
| 335 | 342 | local tmpcsv = csvdb["idle_treasureCsv"] |
| 336 | 343 | local treasureList = self:getProperty("treasureList") or {} --挖宝列表 过期删除 领取奖励删除 跨天更新 |
| 337 | 344 | local tmptreasure = {} |
| 338 | - local treasureBase = globalCsv.idle_treasure_base | |
| 345 | + local treasureBase = globalCsv.idle_treasure_base + self.owner:getBnousTreasureBaseMaximum() | |
| 339 | 346 | for id, val in pairs(tmpcsv) do |
| 340 | 347 | if self:checkUnlock(val) == true then |
| 341 | 348 | local treasure = self:checkTreasureExpired(val, treasureList) | ... | ... |