public bool IsHaveReward(eBUNNING_EVENT eBurnningEvent)
    {
        if (eBurnningEvent <= eBUNNING_EVENT.eBUNNING_EVENT_NONE || eBurnningEvent >= eBUNNING_EVENT.eBUNNING_EVENT_MAX)
        {
            return(false);
        }
        bool          flag          = false;
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);
        NrMyCharInfo  kMyCharInfo   = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        sUBDATA_UNION.nSubData = kMyCharInfo.GetCharDetail(15);
        int num = -1;

        if (eBurnningEvent != eBUNNING_EVENT.eBUNNING_EVENT_BABELPARTY)
        {
            if (eBurnningEvent == eBUNNING_EVENT.eBUNNING_EVENT_COLOSSEUM)
            {
                int num2 = (int)sUBDATA_UNION.n8SubData_1;
                num  = num2 % 2;
                flag = (num > 0);
            }
        }
        else
        {
            int num2 = (int)sUBDATA_UNION.n8SubData_0;
            num  = num2 % 2;
            flag = (num > 0);
        }
        return(num >= 0 && flag);
    }
Esempio n. 2
0
    public bool IsAwakeningReset()
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo == null)
        {
            Debug.LogError("m_SelectSol is null");
            return(false);
        }
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);

        sUBDATA_UNION.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_INFO);
        short n16SubData_ = sUBDATA_UNION.n16SubData_0;
        AWAKENING_TRY_INFO awakeningTryInfo = this.GetAwakeningTryInfo((int)n16SubData_, soldierInfo.GetSeason());

        if (awakeningTryInfo == null)
        {
            return(false);
        }
        int num = NkUserInventory.GetInstance().Get_First_ItemCnt(awakeningTryInfo.i32ResetItemUnique);

        if (awakeningTryInfo.i32ResetItemNum > num)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("273"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return(false);
        }
        return(true);
    }
Esempio n. 3
0
    public void GetColosseumBatchKind()
    {
        int          num        = 0;
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        for (int i = 0; i < 3; i++)
        {
            long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_COLOSSEUMBATCH1 + i);
            if (charSubData != 0L)
            {
                SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);
                sUBDATA_UNION.nSubData = charSubData;
                int  n32SubData_  = sUBDATA_UNION.n32SubData_0;
                int  n32SubData_2 = sUBDATA_UNION.n32SubData_1;
                byte b            = 0;
                byte b2           = 0;
                SoldierBatch.GetCalcBattlePos((long)n32SubData_, ref b, ref b2);
                if (b2 >= 0 && b2 < 9)
                {
                    if (n32SubData_2 > 0 && myCharInfo.IsEnableBatchColosseumSoldier(n32SubData_2))
                    {
                        this.m_arColosseumBatchCharKind[num] = n32SubData_2;
                        num++;
                    }
                }
            }
        }
    }
Esempio n. 4
0
    public void ClickStatCalc(IUIObject obj)
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo == null || this.m_SolID == 0L)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("698"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int           num           = NkUserInventory.GetInstance().Get_First_ItemCnt(this.m_iAwakeningItemUnique);
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);

        sUBDATA_UNION.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_INFO);
        short n16SubData_ = sUBDATA_UNION.n16SubData_0;

        if (!this.IsAwakeningStat((int)(n16SubData_ + 1)))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("662"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        int needAwakeningItemNum = this.GetNeedAwakeningItemNum((int)(n16SubData_ + 1), soldierInfo.GetSeason());

        if (num < needAwakeningItemNum)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("683"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        GS_SOLAWAKENING_STAT_REQ gS_SOLAWAKENING_STAT_REQ = new GS_SOLAWAKENING_STAT_REQ();

        gS_SOLAWAKENING_STAT_REQ.i64SolID = soldierInfo.GetSolID();
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SOLAWAKENING_STAT_REQ, gS_SOLAWAKENING_STAT_REQ);
        this.SetCoolTime();
        if (null != this.m_gbWakeup_Start)
        {
            this.m_gbWakeup_Start.SetActive(true);
        }
        if (null != this.m_gbWakeup_Apply)
        {
            this.m_gbWakeup_Apply.SetActive(false);
        }
        if (null != this.m_gbWakeup_Change_1)
        {
            this.m_gbWakeup_Change_1.SetActive(false);
        }
        if (null != this.m_gbWakeup_Change_2)
        {
            this.m_gbWakeup_Change_2.SetActive(false);
        }
        if (null != this.m_gbWakeup_Change_3)
        {
            this.m_gbWakeup_Change_3.SetActive(false);
        }
        this.m_bEffectShow            = true;
        this.m_lbStatRingSlot.Visible = false;
    }
Esempio n. 5
0
    public void ClickAwakeningReset(IUIObject obj)
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo == null)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("698"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);

        sUBDATA_UNION.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_INFO);
        short n16SubData_ = sUBDATA_UNION.n16SubData_0;

        if (n16SubData_ <= 0)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("729"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadGroupForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        if (msgBoxUI != null)
        {
            AWAKENING_TRY_INFO awakeningTryInfo = this.GetAwakeningTryInfo((int)n16SubData_, soldierInfo.GetSeason());
            if (awakeningTryInfo == null)
            {
                return;
            }
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("222"),
                "itemname",
                NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(awakeningTryInfo.i32ResetItemUnique),
                "itemnum",
                awakeningTryInfo.i32ResetItemNum
            });

            msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxReset), null, null, null, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("221"), this.m_strText, eMsgType.MB_OK_CANCEL);
        }
    }
    public int GetLimitCount(eBUNNING_EVENT eBurnningEvent)
    {
        int result = -1;

        if (eBurnningEvent <= eBUNNING_EVENT.eBUNNING_EVENT_NONE || eBurnningEvent >= eBUNNING_EVENT.eBUNNING_EVENT_MAX)
        {
            return(result);
        }
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);
        NrMyCharInfo  kMyCharInfo   = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        sUBDATA_UNION.nSubData = kMyCharInfo.GetCharDetail(15);
        EVENT_INFO eventInfoFromType = this.GetEventInfoFromType((int)eBurnningEvent);

        if (eventInfoFromType == null)
        {
            return(result);
        }
        int nMaxLimitCount = eventInfoFromType.m_nMaxLimitCount;
        int num            = nMaxLimitCount * 2;

        if (eBurnningEvent != eBUNNING_EVENT.eBUNNING_EVENT_BABELPARTY)
        {
            if (eBurnningEvent == eBUNNING_EVENT.eBUNNING_EVENT_COLOSSEUM)
            {
                int num2 = (int)sUBDATA_UNION.n8SubData_1;
                result = (num - num2 + 1) / 2;
            }
        }
        else
        {
            int num2 = (int)sUBDATA_UNION.n8SubData_0;
            result = (num - num2 + 1) / 2;
        }
        return(result);
    }
Esempio n. 7
0
    public int GetAwakeningStat(int iStat)
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo == null)
        {
            return(0);
        }
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);

        sUBDATA_UNION.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_STRDEX);
        SUBDATA_UNION sUBDATA_UNION2 = default(SUBDATA_UNION);

        sUBDATA_UNION2.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_VITINT);
        int result = 0;

        switch (iStat)
        {
        case 0:
            result = sUBDATA_UNION.n32SubData_0;
            break;

        case 1:
            result = sUBDATA_UNION.n32SubData_1;
            break;

        case 2:
            result = sUBDATA_UNION2.n32SubData_0;
            break;

        case 3:
            result = sUBDATA_UNION2.n32SubData_1;
            break;
        }
        return(result);
    }
Esempio n. 8
0
    public void SetAwakening()
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo != null)
        {
            SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);
            sUBDATA_UNION.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_STRDEX);
            SUBDATA_UNION sUBDATA_UNION2 = default(SUBDATA_UNION);
            sUBDATA_UNION2.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_VITINT);
            int statSTR = soldierInfo.GetStatSTR();
            int statDEX = soldierInfo.GetStatDEX();
            int statVIT = soldierInfo.GetStatVIT();
            int statINT = soldierInfo.GetStatINT();
            this.ShowBaseSolStat(this.m_lbCurStat[0], statSTR, sUBDATA_UNION.n32SubData_0, this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[1], statDEX, sUBDATA_UNION.n32SubData_1, this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[2], statVIT, sUBDATA_UNION2.n32SubData_0, this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[3], statINT, sUBDATA_UNION2.n32SubData_1, this.m_strBaseTextColor);
            if (soldierInfo.IsAtbCommonFlag(2L))
            {
                this.m_dtRingSlot.Visible = false;
                this.m_lbCurRingSlot.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2547"));
            }
            else
            {
                this.m_dtRingSlot.Visible = true;
                this.m_lbCurRingSlot.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2548"));
            }
        }
        for (int i = 0; i < 4; i++)
        {
            this.m_iAwakeningStat[i] = 0;
            this.m_lbIncStat[i].SetText(string.Empty);
        }
        this.ShowSolInfo(false);
    }
Esempio n. 9
0
    public void ShowSolInfo(bool bStatCalc)
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo == null)
        {
            return;
        }
        if (soldierInfo.GetCharKindInfo() == null)
        {
            return;
        }
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("290"),
            "targetname",
            soldierInfo.GetName(),
            "count1",
            soldierInfo.GetLevel(),
            "count2",
            soldierInfo.GetSolMaxLevel()
        });

        this.m_lbSolName.SetText(this.m_strText);
        this.m_dtSolImage.SetUVMask(new Rect(4f / this.TEX_SIZE, 0f, 504f / this.TEX_SIZE, 448f / this.TEX_SIZE));
        string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(soldierInfo);

        this.m_dtSolImage.SetTexture(eCharImageType.LARGE, soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade(), costumePortraitPath);
        UIBaseInfoLoader solLargeGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade());

        if (solLargeGradeImg != null)
        {
            this.m_dtSolGrade.Hide(false);
            if (0 < NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade()))
            {
                this.m_dtSolGrade.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height);
            }
            this.m_dtSolGrade.SetTexture(solLargeGradeImg);
        }
        else
        {
            this.m_dtSolGrade.Hide(true);
        }
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);

        sUBDATA_UNION.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_STRDEX);
        SUBDATA_UNION sUBDATA_UNION2 = default(SUBDATA_UNION);

        sUBDATA_UNION2.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_VITINT);
        SUBDATA_UNION sUBDATA_UNION3 = default(SUBDATA_UNION);

        sUBDATA_UNION3.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_INFO);
        short n16SubData_ = sUBDATA_UNION3.n16SubData_0;
        int   statSTR     = soldierInfo.GetStatSTR();
        int   statDEX     = soldierInfo.GetStatDEX();
        int   statVIT     = soldierInfo.GetStatVIT();
        int   statINT     = soldierInfo.GetStatINT();

        this.ShowBaseSolStatAwakening(this.m_lbBaseStat[0], statSTR, sUBDATA_UNION.n32SubData_0);
        this.ShowBaseSolStatAwakening(this.m_lbBaseStat[1], statDEX, sUBDATA_UNION.n32SubData_1);
        this.ShowBaseSolStatAwakening(this.m_lbBaseStat[2], statVIT, sUBDATA_UNION2.n32SubData_0);
        this.ShowBaseSolStatAwakening(this.m_lbBaseStat[3], statINT, sUBDATA_UNION2.n32SubData_1);
        if (this.IsAwakening())
        {
            for (int i = 0; i < 4; i++)
            {
                this.m_lbSolStat_2[i].Hide(false);
            }
            this.ShowBaseSolStat(this.m_lbCurStat[0], statSTR, sUBDATA_UNION.n32SubData_0, this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[1], statDEX, sUBDATA_UNION.n32SubData_1, this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[2], statVIT, sUBDATA_UNION2.n32SubData_0, this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[3], statINT, sUBDATA_UNION2.n32SubData_1, this.m_strBaseTextColor);
        }
        else
        {
            for (int i = 0; i < 4; i++)
            {
                this.m_lbSolStat_2[i].Hide(true);
                this.m_lbCurStat[i].SetText(string.Empty);
            }
        }
        if (bStatCalc)
        {
            for (int i = 0; i < 4; i++)
            {
                this.m_lbSolStat_2[i].Hide(true);
                this.m_lbCurStat[i].Hide(true);
            }
        }
        int needAwakeningItemNum = this.GetNeedAwakeningItemNum((int)(n16SubData_ + 1), soldierInfo.GetSeason());

        this.m_lbNeedAwakeningItemNum.SetText(needAwakeningItemNum.ToString());
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strStat, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2289"),
            "count",
            (int)(n16SubData_ + 1)
        });

        this.m_btStatCalc.SetText(this.m_strStat);
    }
    private void OnCompleteBatch(object a_oObject)
    {
        byte         nMode        = 0;
        long         nObjBatch    = 0L;
        eSOL_SUBDATA eSOL_SUBDATA = eSOL_SUBDATA.SOL_SUBDATA_STATUSVALUE;

        if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_ATTACK_MAKEUP)
        {
            StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_ATTACK_MAKEUP;
            nMode        = 0;
            eSOL_SUBDATA = eSOL_SUBDATA.SOL_SUBDATA_ATTACK_BATTLEPOS;
        }
        else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_DEFENCE_MAKEUP)
        {
            StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_DEFENCE_MAKEUP;
            nMode        = 1;
            nObjBatch    = SoldierBatch.SOLDIERBATCH.GetObjectDataToSubData().nSubData;
            eSOL_SUBDATA = eSOL_SUBDATA.SOL_SUBDATA_DEFENCE_BATTLEPOS;
        }
        else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP)
        {
            StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP;
            nMode        = 2;
            eSOL_SUBDATA = eSOL_SUBDATA.SOL_SUBDATA_PVP_BATTLEPOS;
        }
        else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_ATTACK_INFIBATTLE_MAKEUP || SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_DEFENSE_INFIBATTLE_MAKEUP)
        {
            StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_ATTACK_INFIBATTLE_MAKEUP;
            nMode        = 3;
            eSOL_SUBDATA = eSOL_SUBDATA.SOL_SUBDATA_ATTACK_INFIBATTLE;
        }
        else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PRACTICE_INFIBATTLE)
        {
            StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_ATTACK_INFIBATTLE_MAKEUP;
            nMode        = 5;
            eSOL_SUBDATA = eSOL_SUBDATA.SOL_SUBDATA_ATTACK_INFIBATTLE;
        }
        else if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP2)
        {
            SoldierBatch.SOLDIERBATCH.SavePvpMakeup2SolInfo();
            NrTSingleton <NkClientLogic> .Instance.SetClearMiddleStage();

            StageWorld.BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP2;
            nMode = 6;
        }
        GS_PLUNDER_SET_SOLMAKEUP_REQ gS_PLUNDER_SET_SOLMAKEUP_REQ = new GS_PLUNDER_SET_SOLMAKEUP_REQ();

        gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nMode     = nMode;
        gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nObjBatch = nObjBatch;
        if (SoldierBatch.SOLDIER_BATCH_MODE != eSOLDIER_BATCH_MODE.MODE_PVP_MAKEUP2)
        {
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            if (charPersonInfo == null)
            {
                return;
            }
            Dictionary <int, long> dictionary = new Dictionary <int, long>();
            int           num         = 0;
            NrSoldierList soldierList = charPersonInfo.GetSoldierList();
            if (soldierList == null)
            {
                return;
            }
            NkSoldierInfo[] kSolInfo = soldierList.m_kSolInfo;
            for (int i = 0; i < kSolInfo.Length; i++)
            {
                NkSoldierInfo nkSoldierInfo = kSolInfo[i];
                if (nkSoldierInfo.GetSolSubData(eSOL_SUBDATA) > 0L)
                {
                    gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nSolID[num]      = nkSoldierInfo.GetSolID();
                    gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nSolSubData[num] = nkSoldierInfo.GetSolSubData(eSOL_SUBDATA);
                    if (eSOL_SUBDATA == eSOL_SUBDATA.SOL_SUBDATA_PVP_BATTLEPOS)
                    {
                        if (dictionary.ContainsKey(nkSoldierInfo.GetCharKind()))
                        {
                            return;
                        }
                        dictionary.Add(nkSoldierInfo.GetCharKind(), nkSoldierInfo.GetSolID());
                    }
                    num++;
                }
            }
            NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

            if (readySolList == null)
            {
                return;
            }
            foreach (NkSoldierInfo current in readySolList.GetList().Values)
            {
                if (current.GetSolSubData(eSOL_SUBDATA) > 0L)
                {
                    gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nSolID[num]      = current.GetSolID();
                    gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nSolSubData[num] = current.GetSolSubData(eSOL_SUBDATA);
                    if (eSOL_SUBDATA == eSOL_SUBDATA.SOL_SUBDATA_PVP_BATTLEPOS)
                    {
                        if (dictionary.ContainsKey(current.GetCharKind()))
                        {
                            return;
                        }
                        dictionary.Add(current.GetCharKind(), current.GetSolID());
                    }
                    num++;
                }
            }
        }
        else
        {
            Dictionary <int, long> dictionary2 = new Dictionary <int, long>();
            int          num2       = 0;
            NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

            if (myCharInfo == null)
            {
                return;
            }
            for (int j = 0; j < 3; j++)
            {
                long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_COLOSSEUMBATCH1 + j);
                if (charSubData != 0L)
                {
                    SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);
                    sUBDATA_UNION.nSubData = charSubData;
                    int  n32SubData_  = sUBDATA_UNION.n32SubData_0;
                    int  n32SubData_2 = sUBDATA_UNION.n32SubData_1;
                    byte b            = 0;
                    byte b2           = 0;
                    SoldierBatch.GetCalcBattlePos((long)n32SubData_, ref b, ref b2);
                    if (b2 >= 0 && b2 < 9)
                    {
                        if (n32SubData_2 > 0)
                        {
                            if (dictionary2.ContainsKey(n32SubData_2))
                            {
                                return;
                            }
                            dictionary2.Add(n32SubData_2, (long)n32SubData_2);
                            gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nSolID[num2]      = (long)n32SubData_2;
                            gS_PLUNDER_SET_SOLMAKEUP_REQ.m_nSolSubData[num2] = charSubData;
                            num2++;
                        }
                    }
                }
            }
        }
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PLUNDER_SET_SOLMAKEUP_REQ, gS_PLUNDER_SET_SOLMAKEUP_REQ);
        NrTSingleton <NkClientLogic> .Instance.SetClearMiddleStage();
    }
Esempio n. 11
0
    private void SetSolDetailInfo()
    {
        if (this.pkSolinfo == null)
        {
            return;
        }
        this.SetCostumeButton();
        this.pkSolinfo.UpdateSoldierStatInfo();
        NrCharKindInfo charKindInfo = this.pkSolinfo.GetCharKindInfo();

        if (charKindInfo == null)
        {
            return;
        }
        this.m_SolInterfaceTool.m_kSelectCharKindInfo = charKindInfo;
        this.m_SolInterfaceTool.SetHeroEventLabel(this.pkSolinfo.GetGrade() + 1);
        string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(this.m_selectedSolCostumeUnique);

        this.m_SolInterfaceTool.SetCharImg(this.pkSolinfo.GetGrade(), costumePortraitPath);
        this.m_SolInterfaceTool.m_Label_Rank2.Visible = false;
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsReincarnation())
        {
            if (charKindInfo.IsATB(1L))
            {
                this.m_SolInterfaceTool.m_DrawTexture_rank.Visible = false;
            }
            else
            {
                this.m_SolInterfaceTool.m_DrawTexture_rank.Visible = true;
            }
        }
        else
        {
            this.m_SolInterfaceTool.m_DrawTexture_rank.Visible = true;
        }
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);

        sUBDATA_UNION.nSubData = this.pkSolinfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_STRDEX);
        SUBDATA_UNION sUBDATA_UNION2 = default(SUBDATA_UNION);

        sUBDATA_UNION2.nSubData = this.pkSolinfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_VITINT);
        int statSTR = this.pkSolinfo.GetStatSTR();
        int statDEX = this.pkSolinfo.GetStatDEX();
        int statVIT = this.pkSolinfo.GetStatVIT();
        int statINT = this.pkSolinfo.GetStatINT();

        this.ShowBaseSolStatAwakening(this.SolSTR, statSTR, sUBDATA_UNION.n32SubData_0);
        this.ShowBaseSolStatAwakening(this.SolDEX, statDEX, sUBDATA_UNION.n32SubData_1);
        this.ShowBaseSolStatAwakening(this.SolVIT, statVIT, sUBDATA_UNION2.n32SubData_0);
        this.ShowBaseSolStatAwakening(this.SolINT, statINT, sUBDATA_UNION2.n32SubData_1);
        string text = string.Empty;

        if (charKindInfo.GetCHARKIND_ATTACKINFO().ATTACKTYPE == this.pkSolinfo.GetAttackInfo().ATTACKTYPE)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(charKindInfo.GetCHARKIND_INFO().SoldierSpec1);
        }
        else
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(charKindInfo.GetCHARKIND_INFO().SoldierSpec2);
        }
        this.m_lbSoldierSpec.SetText(text);
        this.SolExplain.SetScrollLabel(charKindInfo.GetDesc());
        int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_TRADECOUNT_USE);

        this.TradeCount.Hide(true);
        if (value == 1)
        {
            this.TradeCount.Hide(true);
            this.TradeCountName.Hide(false);
            byte tradeRank = this.pkSolinfo.GetCharKindInfo().GetTradeRank((int)this.pkSolinfo.GetGrade());
            if (tradeRank == 0 || this.pkSolinfo.GetGrade() < tradeRank - 1)
            {
                if (tradeRank == 0)
                {
                    this.TradeCountName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1980"));
                }
                else if (!this.pkSolinfo.IsAwakening())
                {
                    string empty = string.Empty;
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1979"),
                        "count",
                        tradeRank
                    });

                    this.TradeCountName.SetText(empty);
                }
                else
                {
                    this.TradeCountName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2346"));
                }
            }
            else if (!this.pkSolinfo.IsAwakening())
            {
                this.TradeCountName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1206"));
                long solSubData = this.pkSolinfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_TRADE_COUNT);
                this.TradeCount.SetText(solSubData.ToString());
                this.TradeCount.Hide(false);
            }
            else
            {
                this.TradeCountName.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2346"));
            }
        }
        else
        {
            this.TradeCountName.Hide(true);
        }
        this.IntroMovieButton.Visible = false;
        this.IntroMoveieText.Visible  = false;
        this.m_btnSolPreview.Visible  = false;
        if (charKindInfo.IsATB(1L))
        {
            this.IntroMovieButton.Visible = true;
            this.IntroMoveieText.Visible  = true;
        }
        else
        {
            this.m_btnSolPreview.Visible = true;
        }
        this.SetInitiativeValue();
        if (this.pkSolinfo.IsAtbCommonFlag(8L))
        {
            this.m_cOnlySkill.SetCheckState(1);
        }
        else
        {
            this.m_cOnlySkill.SetCheckState(0);
        }
    }