Commit 0d8a89ca456ad80df59d55d077ce401e45be7b57

Authored by 熊润斐
2 parents 696ddd64 f854f3a3

Merge branch 'tr/bugfix' into tr/publish/preview

src/actions/AdvAction.lua
... ... @@ -276,8 +276,7 @@ function _M.startHangRpc(agent, data)
276 276 if not adv_idle_time or not adv_idle_energy or not adv_idle_reward_coef then
277 277 return 2
278 278 end
279   - local timeAdd = role:getBnousHangTime()
280   - adv_idle_time = adv_idle_time * 60 + timeAdd
  279 + adv_idle_time = adv_idle_time * 60
281 280  
282 281  
283 282 local advHang = role:getProperty("advHang")
... ... @@ -418,8 +417,7 @@ function _M.endHangRpc(agent, data)
418 417 if not adv_idle_time or not adv_idle_energy or not adv_idle_reward_coef then
419 418 return 2
420 419 end
421   - local timeAdd = role:getBnousHangTime()
422   - adv_idle_time = adv_idle_time * 60 + timeAdd
  420 + adv_idle_time = adv_idle_time * 60
423 421  
424 422 local reward, isFull, change, heroFaithMap
425 423 local heroCnt = 0
... ...
src/actions/HangAction.lua
... ... @@ -381,8 +381,9 @@ function _M.getRewardRpc(agent , data)
381 381 table.clear(items)
382 382 local hangInfo = role:getProperty("hangInfo")
383 383 local nowTime = skynet.timex()
384   - hangInfo.endItemTime = nowTime + globalCsv.idle_producetime_max
385   - hangInfo.endCoinTime = nowTime + globalCsv.idle_producetime_max
  384 + local timeAdd = role:getBnousHangTime()
  385 + hangInfo.endItemTime = nowTime + globalCsv.idle_producetime_max + timeAdd
  386 + hangInfo.endCoinTime = nowTime + globalCsv.idle_producetime_max + timeAdd
386 387 hangInfo.coinTime = nowTime
387 388 hangInfo.itemTime = nowTime
388 389 role:updateProperty({field = "hangBag", value = items})
... ...
src/models/Diner.lua
... ... @@ -193,10 +193,6 @@ function Diner:calSellReward(sell, delta, dishData, isExpedite)
193 193 local addReward = {}
194 194 for key, value in pairs(dishData.item_normal:toNumMap()) do
195 195 addReward[key] = (addReward[key] or 0) + value * delta
196   - if key == ItemId.Gold then
197   - local goldPriceAdd = self.owner:getBnousDiner(4,value)
198   - addReward[key] = addReward[key] + goldPriceAdd * delta
199   - end
200 196 end
201 197  
202 198 popular = dishData.famous_normal * delta
... ... @@ -234,10 +230,16 @@ function Diner:calSellReward(sell, delta, dishData, isExpedite)
234 230 end
235 231 upValue[-1] = (upValue[-1] or 0) + collectAdd
236 232  
  233 + -- 电波塔加成
  234 + local goldCount = self.owner:getBnousDiner(4,addReward[ItemId.Gold])
  235 +
237 236 for id, count in pairs(addReward) do
238 237 addReward[id] = math.floor(count * (1 + (upValue[id] or 0) / 100))
239 238 reward = reward:incrv(id, addReward[id])
240 239 end
  240 +
  241 + reward = reward:incrv(ItemId.Gold, goldCount)
  242 +
241 243 popular = math.floor(popular * (1 + (upValue[-1] or 0) / 100))
242 244  
243 245 return reward, popular
... ...
src/models/RolePlugin.lua
... ... @@ -2191,29 +2191,31 @@ function RolePlugin.bind(Role)
2191 2191 for towerIdx, Set in pairs(towerBnous) do
2192 2192 for id, _ in pairs(Set) do
2193 2193 local data = bnousCsv[towerIdx][id]
2194   - local effects = data.effect:toTableArraySec()
2195   - for _, effect in pairs(effects) do
2196   - local pm1, pm2, pm3, pm4 = tonumber(effect[1]), tonumber(effect[2]), tonumber(effect[3]), tonumber(effect[4])
2197   - if not self.towerBnousActive[pm1] then
2198   - self.towerBnousActive[pm1] = {}
2199   - end
2200   - if pm1 == SystemBnousType.TowerBuff then
2201   - if not self.towerBnousActive[pm1][pm2] then
2202   - self.towerBnousActive[pm1][pm2] = {}
2203   - end
2204   - table.insert(self.towerBnousActive[pm1][pm2],pm3)
2205   - elseif pm1 == SystemBnousType.Adv then
2206   - if not self.towerBnousActive[pm1][pm4] then
2207   - self.towerBnousActive[pm1][pm4] = {}
  2194 + if data then
  2195 + local effects = data.effect:toTableArraySec()
  2196 + for _, effect in pairs(effects) do
  2197 + local pm1, pm2, pm3, pm4 = tonumber(effect[1]), tonumber(effect[2]), tonumber(effect[3]), tonumber(effect[4])
  2198 + if not self.towerBnousActive[pm1] then
  2199 + self.towerBnousActive[pm1] = {}
2208 2200 end
2209   - self.towerBnousActive[pm1][pm4][pm2] = (self.towerBnousActive[pm1][pm4][pm2] or 0) + pm3
2210   - elseif pm1 == SystemBnousType.HangTime then
2211   - if type(self.towerBnousActive[pm1]) == "table" then
2212   - self.towerBnousActive[pm1] = 0
  2201 + if pm1 == SystemBnousType.TowerBuff then
  2202 + if not self.towerBnousActive[pm1][pm2] then
  2203 + self.towerBnousActive[pm1][pm2] = {}
  2204 + end
  2205 + table.insert(self.towerBnousActive[pm1][pm2],pm3)
  2206 + elseif pm1 == SystemBnousType.Adv then
  2207 + if not self.towerBnousActive[pm1][pm4] then
  2208 + self.towerBnousActive[pm1][pm4] = {}
  2209 + end
  2210 + self.towerBnousActive[pm1][pm4][pm2] = (self.towerBnousActive[pm1][pm4][pm2] or 0) + pm3
  2211 + elseif pm1 == SystemBnousType.HangTime then
  2212 + if type(self.towerBnousActive[pm1]) == "table" then
  2213 + self.towerBnousActive[pm1] = 0
  2214 + end
  2215 + self.towerBnousActive[pm1] = self.towerBnousActive[pm1] + pm2
  2216 + else
  2217 + self.towerBnousActive[pm1][pm2] = (self.towerBnousActive[pm1][pm2] or 0) + pm3
2213 2218 end
2214   - self.towerBnousActive[pm1] = self.towerBnousActive[pm1] + pm2
2215   - else
2216   - self.towerBnousActive[pm1][pm2] = (self.towerBnousActive[pm1][pm2] or 0) + pm3
2217 2219 end
2218 2220 end
2219 2221 end
... ...