local FuncNode_CheckBuffGroup = class("FuncNode_CheckBuffGroup") --[[ 初始化 --]] function FuncNode_CheckBuffGroup:initialize(entity) self.LimitChildCount = 2 self.Type = LuaConst.ConditionFuncType.CheckBuffGroup end --[[ 执行 --]] function FuncNode_CheckBuffGroup:Run(conditionDataNode, entity, missile) local type = conditionDataNode.FirstNode:Run(entity, missile) local buffGroup = FP.tonumberV1(conditionDataNode.SecondNode:Run(entity, missile)) local tempEntity if type == FP.Const.Zero then --自己 if entity then return entity.components.buff:HasBuffOfGroup(buffGroup) and FP.Const.One or FP.Const.Zero end elseif type == FP.Const.One then --目标 tempEntity = entity.components.target.Target if tempEntity then return tempEntity.components.buff:HasBuffOfGroup(buffGroup) and FP.Const.One or FP.Const.Zero end elseif type == FP.Const.Two then --和自己同FeatureID的所有怪都具有buff local featureID = entity.components.base.CurMonsterFeature.ID for i,checkEntity in ipairs(LogicUpdateManager.EntityList_Sync) do if checkEntity.components.base.CurMonsterFeature.ID == featureID then if not checkEntity.components.buff:HasBuffOfGroup(buffGroup) then return FP.Const.Zero end end end for i,checkEntity in ipairs(LogicUpdateManager.EntityList_Normal) do if checkEntity.components.base.CurMonsterFeature.ID == featureID then if not checkEntity.components.buff:HasBuffOfGroup(buffGroup) then return FP.Const.Zero end end end return FP.Const.One elseif type == FP.Const.Three then local masterEntity = entity:GetMasterEntity() if masterEntity then return masterEntity.components.buff:HasBuffOfGroup(buffGroup) and FP.Const.One or FP.Const.Zero else return FP.Const.Zero end end return FP.Const.Zero end return FuncNode_CheckBuffGroup