Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop
commit
626099d62d
|
|
@ -310,6 +310,34 @@ function BuffManager:PassUpdate()
|
||||||
and buff.caster.camp == curCamp -- 释放者是当前轮到的人
|
and buff.caster.camp == curCamp -- 释放者是当前轮到的人
|
||||||
and buff.caster.position == curPos
|
and buff.caster.position == curPos
|
||||||
and buff.roundDuration > 0 -- 不是无限存在的buff
|
and buff.roundDuration > 0 -- 不是无限存在的buff
|
||||||
|
and buff.caster.type~=BattleUnitType.Monster --灵兽的buff在这里处理
|
||||||
|
then
|
||||||
|
-- 当前轮释放的buff不结算
|
||||||
|
if buff.startRound ~= BattleLogic.GetCurRound() then
|
||||||
|
buff.roundPass = buff.roundPass + 1
|
||||||
|
if buff.roundPass >= buff.roundDuration then
|
||||||
|
buff.disperse = true
|
||||||
|
end
|
||||||
|
buff.target.Event:DispatchEvent(BattleEventName.BuffRoundChange, buff)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
--计算灵兽buff更新
|
||||||
|
function BuffManager:PassMonsterUpdate()
|
||||||
|
local curCamp, curPos = BattleLogic.GetCurTurn()
|
||||||
|
for i=1, self.buffDic.size do
|
||||||
|
local buffList = self.buffDic.vList[i]
|
||||||
|
if buffList.size > 0 then
|
||||||
|
for index = 1, buffList.size do
|
||||||
|
local buff = buffList.buffer[index]
|
||||||
|
if not buff.disperse -- 没过期
|
||||||
|
--and buff.caster.camp == curCamp -- 释放者是当前轮到的人
|
||||||
|
--and buff.caster.position == curPos
|
||||||
|
and buff.roundDuration > 0 -- 不是无限存在的buff
|
||||||
|
and buff.caster.type==BattleUnitType.Monster --灵兽的buff在这里处理
|
||||||
then
|
then
|
||||||
-- 当前轮释放的buff不结算
|
-- 当前轮释放的buff不结算
|
||||||
if buff.startRound ~= BattleLogic.GetCurRound() then
|
if buff.startRound ~= BattleLogic.GetCurRound() then
|
||||||
|
|
@ -324,8 +352,6 @@ function BuffManager:PassUpdate()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- 每一个人的轮次都刷新
|
-- 每一个人的轮次都刷新
|
||||||
function BuffManager:TurnUpdate(sort)
|
function BuffManager:TurnUpdate(sort)
|
||||||
local curCamp, curPos = BattleLogic.GetCurTurn()
|
local curCamp, curPos = BattleLogic.GetCurTurn()
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,8 @@ function BattleLogic.TurnRound(debugTurn)
|
||||||
)
|
)
|
||||||
-- 轮数变化
|
-- 轮数变化
|
||||||
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoundChange, CurRound)
|
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoundChange, CurRound)
|
||||||
|
--刷新灵兽buff,回合开始前刷新,如果灵兽技能是在回合后释放,持续1回合,配置的回合数要+1 2020/12/05 by:王振兴
|
||||||
|
BattleLogic.BuffMgr:PassMonsterUpdate()
|
||||||
-- 开始
|
-- 开始
|
||||||
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoundStart, CurRound)
|
BattleLogic.Event:DispatchEvent(BattleEventName.BattleRoundStart, CurRound)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue