Пример #1
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);
        }
Пример #2
0
        DTOBuffMemberView GetMembersCore(DTOBuffPack buffPack, bool homeFlag, Guid managerId, ArenaTeammemberFrame arenaFrame, bool syncFlag = true, string siteId = "")
        {
            if (FrameConfig.SWAPBuffDisableCrossCache && !string.IsNullOrEmpty(siteId))
            {
                syncFlag = false;
            }
            ManagerSkillUseWrap use;
            DTOBuffPoolView     poolView;
            var data = GetMembers4Mem(out use, out poolView, managerId, siteId, arenaFrame);

            do
            {
                if (null != data)
                {
                    break;
                }
                if (string.IsNullOrEmpty(siteId))
                {
                    data = GetMembers4Db(managerId, use, arenaFrame);
                }
                if (null == data)
                {
                    FillBuffPack(buffPack, homeFlag, managerId, arenaFrame, null, siteId);
                    TeammemberDataHelper.FillTeammemberData(buffPack, homeFlag, siteId);
                    use.OnPids = buffPack.GetOnPids(homeFlag).Keys.ToArray();
                    BuffUtil.GetManagerSkillList(managerId, use, siteId);
                    BuffCache.Instance().FillRankedSkillList(buffPack.GetSBM(homeFlag), use.ManagerSkills);
                    BuffUtil.FillLiveSkillList(use, poolView.LiveSkills);
                    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, siteId);
                if (syncFlag)
                {
                    s_buffSync.SyncBuffMembers(managerId, arenaFrame.ArenaType, CloneBuffView(data), siteId);
                }
            }while (false);
            data.KpiReady = data.Kpi;
            data.ClothId  = BuffPoolCore.Instance().GetManagerClothId(managerId, poolView);
            return(data);
        }