【战斗】修复群体性的免疫效果不会正常消失的问题

dev_chengFeng
gaoxin 2021-06-17 16:01:48 +08:00
parent 23c17edfc7
commit ac7501a1d5
1 changed files with 5 additions and 8 deletions

View File

@ -13,13 +13,11 @@ end
local immune3 = function(buff)
return buff.type == BuffName.Shield and buff.shieldType == ShieldTypeName.AllReduce
end
--自定义免疫
local immune4=nil
--初始化Buff通过传入一些自定义参数控制成长相关的数值
function Immune:SetData(type,func)
self.immuneType =type
immune4=func
self.immuneType = type
self.immune4 = func
self.isBuff = true
-- 刷新排序等级
@ -38,8 +36,8 @@ function Immune:OnStart()
elseif self.immuneType == 3 then --免疫无敌盾
self.target.buffFilter:Add(immune3)
elseif self.immuneType==4 then--自定义免疫
if immune4 then
self.target.buffFilter:Add(immune4)
if self.immune4 then
self.target.buffFilter:Add(self.immune4)
end
end
if condition then
@ -66,8 +64,7 @@ function Immune:OnEnd()
elseif self.immuneType == 3 then --免疫无敌盾
immune = immune3
elseif self.immuneType == 4 then--自定义免疫
immune=immune4
immune4=nil
immune = self.immune4
end
for i = 1, self.target.buffFilter.size do
if self.target.buffFilter.buffer[i] == immune then