Commit 206c38f5e136228134345c6ccf72d3253f10d8e8
Merge branch 'tr/bugfix' into tr/publish/release
Showing
4 changed files
with
16 additions
and
9 deletions
Show diff stats
src/adv/Adv.lua
| ... | ... | @@ -1127,10 +1127,17 @@ function Adv:supplyPotion() |
| 1127 | 1127 | for potionId, set in pairs(potionCsv) do |
| 1128 | 1128 | local count = potionBag[potionId] or 0 |
| 1129 | 1129 | if count > 0 then |
| 1130 | - local level = dishTree:getv(potionId,1) | |
| 1131 | - local num = math.min(set[level].limit,count) | |
| 1132 | - advItems = advItems:setv(potionId,num) | |
| 1133 | - potionBag[potionId] = num ~= count and (count - num) or nil | |
| 1130 | + local max = set[dishTree:getv(potionId,1)].limit | |
| 1131 | + local old = advItems:getv(potionId,0) | |
| 1132 | + local need = max - old | |
| 1133 | + | |
| 1134 | + if need < count then | |
| 1135 | + advItems = advItems:setv(potionId,max) | |
| 1136 | + potionBag[potionId] = count - need | |
| 1137 | + else | |
| 1138 | + advItems = advItems:setv(potionId,old + count) | |
| 1139 | + potionBag[potionId] = nil | |
| 1140 | + end | |
| 1134 | 1141 | end |
| 1135 | 1142 | end |
| 1136 | 1143 | self.owner:updateProperties({ | ... | ... |
src/models/Activity.lua
| ... | ... | @@ -455,7 +455,7 @@ activityFunc[Activity.ActivityType.PayBack] = { |
| 455 | 455 | -- 英雄帖 |
| 456 | 456 | activityFunc[Activity.ActivityType.CalendaTask] = { |
| 457 | 457 | ["init"] = function(self, actType, isCrossDay, notify) |
| 458 | - local calTask = self.owner:getProperty("CalTask") | |
| 458 | + local calTask = self.owner:getProperty("calTask") | |
| 459 | 459 | calTask = {} |
| 460 | 460 | local role = self.owner |
| 461 | 461 | local buildL = role.dinerData:getProperty("buildL") |
| ... | ... | @@ -481,7 +481,7 @@ activityFunc[Activity.ActivityType.CalendaTask] = { |
| 481 | 481 | |
| 482 | 482 | end, |
| 483 | 483 | ["close"] = function(self, actType, notify) |
| 484 | - self.owner:updateProperty({field="CalTask", value={}}) | |
| 484 | + self.owner:updateProperty({field="calTask", value={}}) | |
| 485 | 485 | end, |
| 486 | 486 | } |
| 487 | 487 | |
| ... | ... | @@ -874,7 +874,7 @@ activityFunc[Activity.ActivityType.CommonSignIn] = { |
| 874 | 874 | ["crossDay"] = function(self, actType, notify, actId) |
| 875 | 875 | local actCfg = csvdb["activity_ctrlCsv"][actId] |
| 876 | 876 | if not actCfg then return end |
| 877 | - local conArr = actCfg.condition2:toArray("true", "=") | |
| 877 | + local conArr = actCfg.condition2:toArray(true, "=") | |
| 878 | 878 | -- 0 登录即可, 1 达到指定活跃度 |
| 879 | 879 | if conArr[1] ~= 0 then |
| 880 | 880 | return | ... | ... |
src/models/Diner.lua
| ... | ... | @@ -201,7 +201,7 @@ function Diner:calSellReward(sell, delta, dishData) |
| 201 | 201 | upValue[ItemId.Gold] = (upValue[ItemId.Gold] or 0) + buildData.gold_up |
| 202 | 202 | end |
| 203 | 203 | if buildData.item_up > 0 then |
| 204 | - upValue[ItemId.DinerCoin] = (upValue[ItemId.DinerCoin] or 0) + buildData.gold_up | |
| 204 | + upValue[ItemId.DinerCoin] = (upValue[ItemId.DinerCoin] or 0) + buildData.item_up | |
| 205 | 205 | end |
| 206 | 206 | if buildData and buildData.famous_up > 0 then |
| 207 | 207 | upValue[-1] = (upValue[-1] or 0) + buildData.famous_up | ... | ... |
src/models/RoleTask.lua
| ... | ... | @@ -706,7 +706,7 @@ function RoleTask.bind(Role) |
| 706 | 706 | calTask[id] = count |
| 707 | 707 | elseif cfg.type == 20 then -- 开启x品质时钟箱子 |
| 708 | 708 | if cfg.condition2 <= (param2 or 0) then |
| 709 | - calTask[id] = (calTask[id] or 0) + param2 | |
| 709 | + calTask[id] = (calTask[id] or 0) + param1 | |
| 710 | 710 | end |
| 711 | 711 | elseif cfg.type == 15 then -- 通关关卡 |
| 712 | 712 | if (calTask[id] or 0) == 0 then | ... | ... |