local FuncNode_CasterHeroFilter = class("FuncNode_CasterHeroFilter") --[[ 初始化 --]] function FuncNode_CasterHeroFilter:initialize(entity) self.LimitChildCount = 3 self.Type = LuaConst.ConditionFuncType.CasterHeroFilter end --[[ 执行 --]] function FuncNode_CasterHeroFilter:Run(conditionDataNode, entity, missileOrMissileData, buffObject, params) if params and params.caster then local heroId = conditionDataNode.FirstNode:Run(entity) if (params.caster:IsHero() or params.caster:IsAdjutant()) and FP.Equals(heroId, params.caster:GetCharacterID()) then return FP.Const.One end else if params then logging.error(LTAG.ERROR, "HYW : 事件参数没有caster参数 @FuncNode_CasterHeroFilter entityID : ", entity.EntityID) else logging.error(LTAG.ERROR, "HYW : 事件参数不存在 @FuncNode_CasterHeroFilter entityID : ", entity.EntityID) end end return FP.Const.Zero end return FuncNode_CasterHeroFilter