Commit 5b3f595accfef0fc158753f2979fb1aad1be171e

Authored by suhongyang
1 parent 7c55db1f

区分round型和turn型buff

Showing 1 changed file with 5 additions and 4 deletions   Show diff stats
src/adv/AdvBuff.lua
... ... @@ -262,12 +262,13 @@ function Buff:initByDB(data)
262 262 end
263 263  
264 264 function Buff:battleBegin()
  265 + if self.isDel or self.owner.isDead or self.buffData.turn == 0 then return end
265 266 self.turn = self.buffData.turn
266   - self.ifRoundEnd = self.buffData.turn ~= 0 -- turn类型buff战斗结束后移除
  267 + self.ifRoundEnd = true -- turn类型buff战斗结束后移除
267 268 end
268 269  
269 270 function Buff:beforeTurn()
270   - if self.isDel or self.owner.isDead then return end
  271 + if self.isDel or self.owner.isDead or self.buffData.turn == 0 then return end
271 272 if self.turnSpace > 0 then
272 273 return
273 274 end
... ... @@ -277,7 +278,7 @@ function Buff:beforeTurn()
277 278 end
278 279  
279 280 function Buff:afterTurn()
280   - if self.isDel or self.owner.isDead then return end
  281 + if self.isDel or self.owner.isDead or self.buffData.turn == 0 then return end
281 282 if self.turnSpace > 0 then
282 283 self.turnSpace = self.turnSpace - 1
283 284 self:decTurn()
... ... @@ -303,7 +304,7 @@ function Buff:decTurn()
303 304 end
304 305  
305 306 function Buff:afterRound()
306   - if self.isDel or self.owner.isDead then return end
  307 + if self.isDel or self.owner.isDead or self.buffData.round == 0 then return end
307 308 if self.roundSpace > 0 then
308 309 self.roundSpace = self.turnSpace - 1
309 310 self:decRound()
... ...