local FuncNode_EventAttrTypeCompare = class("FuncNode_EventAttrTypeCompare") --[[ 初始化 --]] function FuncNode_EventAttrTypeCompare:initialize(entity) self.LimitChildCount = 1 self.Type = LuaConst.ConditionFuncType.EventAttrTypeCompare end --[[ 执行 --]] function FuncNode_EventAttrTypeCompare:Run(conditionDataNode, entity, missile, buffObject, eventParams) local result = FP.Const.Zero repeat if not eventParams then logging.error(LTAG.ERROR, "HYW : Only Event Trigger can use FuncNode_EventAttrTypeCompare !! No eventParams Error! @FuncNode_EventAttrTypeCompare") break end if not eventParams.attrType then logging.error(LTAG.ERROR, "HYW : No eventParams.attrType Error! @FuncNode_EventAttrTypeCompare") break end local compareTo = FP.tonumberV1(conditionDataNode.FirstNode:Run(entity, missile, buffObject, eventParams)) local attrTypeId if compareTo > 0 then attrTypeId = LuaConst.AttrTypeId[eventParams.attrType] else if eventParams.attrType == LuaConst.RealtimeAttrType.hp then attrTypeId = -1 elseif eventParams.attrType == LuaConst.RealtimeAttrType.sa then attrTypeId = -2 elseif eventParams.attrType == LuaConst.RealtimeAttrType.am then attrTypeId = -3 elseif eventParams.attrType == LuaConst.RealtimeAttrType.pc then attrTypeId = -4 end end if attrTypeId == compareTo then result = FP.Const.One end until true return result end return FuncNode_EventAttrTypeCompare