local FuncNode_InteractEntityHasWantedTaskID = class("FuncNode_InteractEntityHasWantedTaskID") --[[ 初始化 --]] function FuncNode_InteractEntityHasWantedTaskID:initialize(entity) self.LimitChildCount = 0 self.Type = LuaConst.ConditionFuncType.InteractEntityHasWantedTaskID end --[[ 执行 --]] function FuncNode_InteractEntityHasWantedTaskID:Run(conditionDataNode, entity, missile) if LevelManager.IsSyncLevel() then logging.error(LTAG.ERROR, "[gws] :检测是否具有悬赏任务 ,只能在主城配置,同步玩法不能用!") return FP.Const.Zero end local colliderTriggerEntity = entity.components.interact:GetLastInteractEntity() -- 交互物 if colliderTriggerEntity then local collectServerDataID = colliderTriggerEntity.components.record:GetVariable("collectServerDataId") or -1 local have = CTL.CountryWantedTask.HasWantedTask(collectServerDataID) return have and FP.Const.One or FP.Const.Zero end return FP.Const.Zero end return FuncNode_InteractEntityHasWantedTaskID