local FuncNode_HasWorshipCount = class("FuncNode_HasWorshipCount") --[[ 初始化 --]] function FuncNode_HasWorshipCount:initialize(entity) self.LimitChildCount = 1 self.Type = LuaConst.ConditionFuncType.HasWorshipCount end --[[ 执行 --]] function FuncNode_HasWorshipCount:Run(conditionDataNode, entity, missile) if LevelManager.IsSyncLevel() then logging.error(LTAG.ERROR, "[gws]: 只有主城的玩法才能检查是否有膜拜次数") return FP.Const.Zero end local type = conditionDataNode.FirstNode:Run(entity, missile) local count = 0 if type == FP.Const.One then --天地群雄 count = MDL.HeroMatch1v1.GetCurDayWorshipCount() elseif type == FP.Const.Two then --国战 count = MDL.Country.GetRemainWorship() or 0 elseif type == FP.Const.Three then --天地群雄3v3 count = MDL.HeroMatch3v3.GetCurDayWorshipCount() end return count > 0 and FP.Const.One or FP.Const.Zero end return FuncNode_HasWorshipCount