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,8 +276,7 @@ function _M.startHangRpc(agent, data)
276 if not adv_idle_time or not adv_idle_energy or not adv_idle_reward_coef then 276 if not adv_idle_time or not adv_idle_energy or not adv_idle_reward_coef then
277 return 2 277 return 2
278 end 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 local advHang = role:getProperty("advHang") 282 local advHang = role:getProperty("advHang")
@@ -418,8 +417,7 @@ function _M.endHangRpc(agent, data) @@ -418,8 +417,7 @@ function _M.endHangRpc(agent, data)
418 if not adv_idle_time or not adv_idle_energy or not adv_idle_reward_coef then 417 if not adv_idle_time or not adv_idle_energy or not adv_idle_reward_coef then
419 return 2 418 return 2
420 end 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 local reward, isFull, change, heroFaithMap 422 local reward, isFull, change, heroFaithMap
425 local heroCnt = 0 423 local heroCnt = 0
src/actions/HangAction.lua
@@ -381,8 +381,9 @@ function _M.getRewardRpc(agent , data) @@ -381,8 +381,9 @@ function _M.getRewardRpc(agent , data)
381 table.clear(items) 381 table.clear(items)
382 local hangInfo = role:getProperty("hangInfo") 382 local hangInfo = role:getProperty("hangInfo")
383 local nowTime = skynet.timex() 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 hangInfo.coinTime = nowTime 387 hangInfo.coinTime = nowTime
387 hangInfo.itemTime = nowTime 388 hangInfo.itemTime = nowTime
388 role:updateProperty({field = "hangBag", value = items}) 389 role:updateProperty({field = "hangBag", value = items})
src/models/Diner.lua
@@ -193,10 +193,6 @@ function Diner:calSellReward(sell, delta, dishData, isExpedite) @@ -193,10 +193,6 @@ function Diner:calSellReward(sell, delta, dishData, isExpedite)
193 local addReward = {} 193 local addReward = {}
194 for key, value in pairs(dishData.item_normal:toNumMap()) do 194 for key, value in pairs(dishData.item_normal:toNumMap()) do
195 addReward[key] = (addReward[key] or 0) + value * delta 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 end 196 end
201 197
202 popular = dishData.famous_normal * delta 198 popular = dishData.famous_normal * delta
@@ -234,10 +230,16 @@ function Diner:calSellReward(sell, delta, dishData, isExpedite) @@ -234,10 +230,16 @@ function Diner:calSellReward(sell, delta, dishData, isExpedite)
234 end 230 end
235 upValue[-1] = (upValue[-1] or 0) + collectAdd 231 upValue[-1] = (upValue[-1] or 0) + collectAdd
236 232
  233 + -- 电波塔加成
  234 + local goldCount = self.owner:getBnousDiner(4,addReward[ItemId.Gold])
  235 +
237 for id, count in pairs(addReward) do 236 for id, count in pairs(addReward) do
238 addReward[id] = math.floor(count * (1 + (upValue[id] or 0) / 100)) 237 addReward[id] = math.floor(count * (1 + (upValue[id] or 0) / 100))
239 reward = reward:incrv(id, addReward[id]) 238 reward = reward:incrv(id, addReward[id])
240 end 239 end
  240 +
  241 + reward = reward:incrv(ItemId.Gold, goldCount)
  242 +
241 popular = math.floor(popular * (1 + (upValue[-1] or 0) / 100)) 243 popular = math.floor(popular * (1 + (upValue[-1] or 0) / 100))
242 244
243 return reward, popular 245 return reward, popular
src/models/RolePlugin.lua
@@ -2191,29 +2191,31 @@ function RolePlugin.bind(Role) @@ -2191,29 +2191,31 @@ function RolePlugin.bind(Role)
2191 for towerIdx, Set in pairs(towerBnous) do 2191 for towerIdx, Set in pairs(towerBnous) do
2192 for id, _ in pairs(Set) do 2192 for id, _ in pairs(Set) do
2193 local data = bnousCsv[towerIdx][id] 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 end 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 end 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 end 2219 end
2218 end 2220 end
2219 end 2221 end