示例#1
0
        DTOBuffMemberView GetMembers4Mem(out ManagerSkillUseWrap use, out DTOBuffPoolView poolView, Guid managerId, string siteId, ArenaTeammemberFrame arenaFrame)
        {
            use      = ManagerUtil.GetSkillUseWrap(managerId, siteId);
            poolView = BuffPoolCore.Instance().GetRawPools(managerId, siteId, true);
            bool syncFlag = true;

            if (FrameConfig.SWAPBuffDisableCrossCache && !string.IsNullOrEmpty(siteId))
            {
                syncFlag = false;
            }
            ulong    verNo = use.VersionNo;
            DateTime dtNow = DateTime.Now;

            if (verNo == 0 || dtNow >= poolView.SyncTime)
            {
                if (syncFlag)
                {
                    s_buffSync.SyncBuffPools(managerId, siteId);
                }
                return(null);
            }
            var data = s_memBuffMember.Get <DTOBuffMemberView>(arenaFrame.ArenaType.ToString() + managerId.ToString());

            if (null != data &&
                data.UseSyncVersion == verNo &&
                data.PoolSyncTime == poolView.SyncTime &&
                data.PoolSyncVersion == poolView.SyncVersion)
            {
                return(data);
            }
            return(null);
        }
示例#2
0
        public static List <string>[] GetManagerSkillList(Guid managerId, ManagerSkillUseWrap use, string siteId = "")
        {
            var lstAll = new List <string>();
            var lib    = ManagerUtil.GetSkillLibWrap(managerId, siteId);

            FixTalents(use, lib, siteId);
            lstAll.AddRange(lib.LowWills.Keys);
            lstAll.AddRange(use.SetWills.Keys);
            lstAll.AddRange(lib.NodoTalents.Keys);
            if (!string.IsNullOrEmpty(use.Raw.CoachSkill))
            {
                lstAll.Add(use.Raw.CoachSkill);
            }
            //var combs = ManagerSkillCache.Instance().CheckCombs(use.SetWills.Keys, use.OnPids);
            //var combs = ManagerSkillCache.Instance().CheckCombs(use.OnPids);
            //if (null != combs)
            //    lstAll.AddRange(combs);
            var clubSkills = ManagerSkillCache.Instance().CheckClubSkills(use.OnPids);

            if (null != clubSkills)
            {
                lstAll.AddRange(clubSkills);
            }
            var rankSkills = BuffCache.Instance().GetRankedSkillList(lstAll);
            //if (null != combs)
            //    rankSkills[1].AddRange(combs);
            var skills = use.ManagerSkills;

            skills[0] = rankSkills[0];
            skills[1] = rankSkills[1];
            skills[2] = rankSkills[2];
            return(skills);
        }
示例#3
0
        public DTOBuffMemberView RebuildMembers(Guid managerId, ArenaTeammemberFrame arenaFrame)
        {
            const bool homeFlag = true;
            var        buffPack = new DTOBuffPack();
            var        use      = ManagerUtil.GetSkillUseWrap(managerId);
            var        poolView = BuffPoolCore.Instance().GetRawPools(managerId, "", true);

            FillBuffPack(buffPack, homeFlag, managerId, arenaFrame);
            TeammemberDataHelper.FillTeammemberData(buffPack, homeFlag);
            use.OnPids = buffPack.GetOnPids(homeFlag).Keys.ToArray();
            BuffUtil.GetManagerSkillList(managerId, use);
            BuffCache.Instance().FillRankedSkillList(buffPack.GetSBM(homeFlag), use.ManagerSkills);
            BuffUtil.FillLiveSkillList(use, poolView.LiveSkills);
            var data = CreateBuffView(managerId, use, buffPack.GetRawMembers(homeFlag));

            data.PoolSyncTime    = poolView.SyncTime;
            data.PoolSyncVersion = poolView.SyncVersion;
            FillBuffView(data, buffPack, homeFlag, false, 0);
            BuffFlowFacade.ProcManagerBuff(buffPack, homeFlag, data.FirmSkillList, false);
            BuffFlowFacade.ProcPlayerBuff(buffPack, homeFlag, data.BuffMembers.Values, false);
            BuffFlowFacade.ProcManagerBuff(buffPack, homeFlag, poolView);
            FillBuffView(data, buffPack, homeFlag, true, 1);
            data.TalentType = BuffUtil.GetTalentType(managerId);
            NbManagerextraMgr.UpdateKpi(managerId, data.Kpi);
            data.SyncIdleFlag = false;
            s_memBuffMember.Set(arenaFrame.ArenaType.ToString() + managerId.ToString(), data);
            return(data);
        }