Ejemplo n.º 1
0
        public bool RescoverSelfRunePageDateManagerInfo()
        {
            if (runePageDataManagerSelfRecord == null || runePageDataManagerSelfRecord.Count <= 0)
            {
                return(false);
            }

            if (runePageDataManager.Count <= 0)
            {
                for (int i = 0; i < runePageDataManagerSelfRecord.Count; ++i)
                {
                    if (runePageDataManagerSelfRecord[i] == null)
                    {
                        continue;
                    }

                    runePageDataManager.Add(runePageDataManagerSelfRecord[i]);
                }
            }

            if (runePageDataManager.Count > 0)
            {
                this.uCurRunePageData = runePageDataManager[0];
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        // 负责new,创建新的单页数据
        public void NewPagePointsItem(int nPageIndex)
        {
            RunePageDataItem talentMenuPagePoints = new RunePageDataItem();

            talentMenuPagePoints.nCreateIndex = nPageIndex;
            runePageDataManager.Add(talentMenuPagePoints);
            this.uCurRunePageData = talentMenuPagePoints;
        }
Ejemplo n.º 3
0
        /////////////////////////////////////////////////////页的新增切换和显示////////////////////////////////////////////////////////

        // 玩家点击某页的时候或者是初始化某页的显示的时候调用,删除的时候也调用.负责点数的显示和页面的切换。关于切换页面显示方面都调用这个
        public void SetCurPageIndex(int nPageIndex)
        {
            if (runePageDataManager == null)
            {
                return;
            }

            if (runePageDataManager.Count < nPageIndex || nPageIndex <= 0)
            {
                return;
            }

            this.nCurPageSortIndex = nPageIndex;
            uCurRunePageData       = this.runePageDataManager[this.nCurPageSortIndex - 1];
        }
Ejemplo n.º 4
0
        /////////////////////////////////////////////////////数据载入区///////////////////////////////////////////////////////

        public bool ReceiveSelfEntityViewRuneInfo(ref IntPtr ptrParam, int nPtrLen)
        {
            runePageDataManager.Clear();
            // 先压出个人全部符文store
            IntPtrVaArgParseHelper helper = new IntPtrVaArgParseHelper(ptrParam, nPtrLen);
            cmd_count storeCountData      = helper.get <cmd_count>();
            int       nStoreCount         = storeCountData.nCount;

            for (int k = 0; k < nStoreCount; k++)
            {
                cmd_Rune_InStore_Item storeItemdata = helper.get <cmd_Rune_InStore_Item>();
                int nRuneId = storeItemdata.nRuneId;
                SSchemeRuneConfig runeConfig = RunePage.Instance.allRunePageTable[nRuneId] as SSchemeRuneConfig;
                if (runeConfig == null)
                {
                    continue;
                }

                RuneItemInfo runeItemInfo = new RuneItemInfo();
                runeItemInfo.nRuneId  = nRuneId;
                runeItemInfo.nRuneNum = storeItemdata.nRuneNum;

                dicRuneInlayTypeStoreInfo[(int)runeConfig.nRuneInlayType].Add(runeItemInfo);
            }

            // 再压出每个符文页的详细信息
            cmd_count runePagedata   = helper.get <cmd_count>();
            int       nRunePageCount = runePagedata.nCount;

            this.nMaxSortIndex = nRunePageCount;
            for (int i = 0; i < runePagedata.nCount; ++i)
            {
                NewPagePointsItem(i + 1);
                if (uCurRunePageData == null)
                {
                    continue;
                }

                cmd_Rune_Single_PageInfo data = helper.get <cmd_Rune_Single_PageInfo>();
                for (int j = 0; j < data.nRuneGroove.Length; j++)
                {
                    int nRuneId = data.nRuneGroove[j];
                    SetRunePagePointsInfo(j + 1, nRuneId, true);
                }

                if (data.sRunePageName == "")
                {
                    uCurRunePageData.sTempName = "RunePage" + (i + 1);
                }
                else
                {
                    uCurRunePageData.sTempName = data.sRunePageName;
                }

                this.SetRunePageChange(true, true);
                uCurRunePageData.SetSaveData();                                // 必须有数据改变才保存
                this.SetRunePageChange(false, true);
                int nDataBaseIndex = data.nPageIndex;
                lTopButtonDataIndex.Add(nDataBaseIndex);                        // 储存数据库页数 因为数据库创建删除都是根据数据库页数来的,避免重复

                if (nMaxDataIndex < nDataBaseIndex)
                {
                    nMaxDataIndex = nDataBaseIndex;
                }
            }

            uCurRunePageData = runePageDataManager[0];
            CopySelfRunePageDateManagerInfo();
            UpdateRuneInlayTypeLeftStore();
            SetRuneChangeMessage();
            return(true);
        }