コード例 #1
0
    public void GetCurPageSortIndex(ref int nCurPageIndex)
    {
        if (!Value.IsValueValid(TalentMenuFrame))
        {
            return;
        }

        nCurPageIndex = TalentMenuFrame.Invoke("GetCurPageSortIndex");
    }
コード例 #2
0
    public void ChangeCurPageIndex(int nPageIndex)
    {
        if (!Value.IsValueValid(TalentMenuFrame))
        {
            return;
        }

        if (TalentMenuFrame.Invoke("ChangeCurPageIndex", nPageIndex + 1) == null)
        {
            Trace.LogError("call ChangeCurPageIndex failed");
            return;
        }
    }
コード例 #3
0
    public void SetWaitingRoomState()
    {
        if (!Value.IsValueValid(TalentMenuFrame))
        {
            return;
        }

        if (TalentMenuFrame.Invoke("SetWaitingRoomState") == null)
        {
            Trace.LogError("call SetWaitingRoomState failed");
            return;
        }
    }
コード例 #4
0
    public void SetWaitingRoomStateOutOfTalentPage()
    {
        if (!Value.IsValueValid(TalentMenuFrame))
        {
            return;
        }

        if (TalentMenuFrame.Invoke("SetInitState") == null)
        {
            Trace.LogError("call SetInitState failed");
            return;
        }

        this.LeaveMovie();
    }
コード例 #5
0
    // 所有页的加点数据下发
    public void SetSingleTalentPagePointsInfo(IntPtr ptrParam, int nPtrLen)
    {
        if (!Value.IsValueValid(TalentMenuFrame))
        {
            return;
        }

        Hashtable allTalentPageTable  = (TalentPage.Instance.GetAllTalentPageTable());
        IntPtrVaArgParseHelper helper = new IntPtrVaArgParseHelper(ptrParam, nPtrLen);

        dTalentPageInfo.Clear();

        cmd_count nCountdata = helper.get <cmd_count>();

        for (int i = 0; i < nCountdata.nCount; ++i)
        {
            TalentPageInfo talentPageInfo     = new TalentPageInfo();
            cmd_TalentPage_Points_Single data = helper.get <cmd_TalentPage_Points_Single>();
            string sPoints   = "";
            string sTalentId = "";
            for (int j = 0; j < data.nTalentNum; j++)
            {
                int nPoint    = data.nTalentPoints[j];
                int nTalentId = data.nTalentId[j];
                sPoints   += nPoint.ToString();
                sTalentId += nTalentId.ToString();
                if (j != data.nTalentNum - 1)
                {
                    sTalentId += ";";
                }
                int nTalentType = TalentPage.Instance.GetSingleTalentType(nTalentId);
                if (nTalentType == (int)TalentType.ENUM_TALENTTYPE_ATTACK)
                {
                    talentPageInfo.nAttackPointAll += nPoint;
                }
                else if (nTalentType == (int)TalentType.ENUM_TALENTTYPE_TRICK)
                {
                    talentPageInfo.nTrickPointAll += nPoint;
                }
                else if (nTalentType == (int)TalentType.ENUM_TALENTTYPE_HELP)
                {
                    talentPageInfo.nHelpPointAll += nPoint;
                }
            }

            if (data.szTalentPageName == "")
            {
                data.szTalentPageName = "TalentPage" + (i + 1);
            }

            int nPageIndex = data.nCurPageIndex;
            talentPageInfo.szTalentPageName = data.szTalentPageName;
            dTalentPageInfo[nPageIndex]     = talentPageInfo;
            // 将所有天赋页的加点数据和名字数据名字下发下去,暂定30个可配置点数后期会改
            if (TalentMenuFrame.Invoke("SetSingleTalentPagePointsInfo", nPageIndex, data.szTalentPageName, sTalentId, sPoints, 30, talentPageInfo.nAttackPointAll, talentPageInfo.nTrickPointAll, talentPageInfo.nHelpPointAll) == null)
            {
                Trace.LogError("call SetSingleTalentPagePointsInfo failed");
                continue;
            }
        }

        if (nCountdata.nCount != 0)
        {
            if (TalentMenuFrame.Invoke("SetOnePagePointView", 1) == null)
            {
                Trace.LogError("call SetOnePagePointView failed");
                return;
            }
        }
    }