Пример #1
0
    public static int GetNeedItemNum(int recruittype)
    {
        int result = 0;
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance == null)
        {
            return(0);
        }
        switch (recruittype)
        {
        case 0:
            result = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_CASHCOUNT_FORONE);
            break;

        case 1:
            result = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_CASHCOUNT_FORTEN);
            break;

        case 13:
            result = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_ESSENCECOUNT_FORONE);
            break;
        }
        return(result);
    }
Пример #2
0
    private void MsgBoxOKEvent(object obj)
    {
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance == null)
        {
            return;
        }
        eSolRecruitType eSolRecruitType = (eSolRecruitType)((int)obj);
        int             itemunique      = 0;

        if (eSolRecruitType == eSolRecruitType.SOLRECRUIT_CASH_ONE || eSolRecruitType == eSolRecruitType.SOLRECRUIT_CASH_TEN)
        {
            itemunique = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_CASH_ITEMUNIQUE);
        }
        else if (eSolRecruitType == eSolRecruitType.SOLRECRUIT_ESSENCE_ONE)
        {
            itemunique = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_ESSENCE_ITEMUNIQUE);
        }
        bool bForceRecruit = false;

        if (eSolRecruitType == eSolRecruitType.SOLRECRUIT_CASH_TEN)
        {
            bForceRecruit = true;
        }
        this.ExcuteTicket(itemunique, (int)eSolRecruitType, 0, bForceRecruit);
    }
Пример #3
0
    private void SendActity()
    {
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsWillSpend())
        {
            return;
        }
        int @int = PlayerPrefs.GetInt(NrPrefsKey.LOCALPUSH_ACTIVITY);

        if (@int != 0)
        {
            NrMyCharInfo            kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
            COMMON_CONSTANT_Manager instance    = COMMON_CONSTANT_Manager.GetInstance();
            long num = kMyCharInfo.m_nMaxActivityPoint;
            if (num == 0L && instance != null)
            {
                num = (long)(instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BASE_ACTIVITY) + (int)NrTSingleton <NrTableVipManager> .Instance.GetVipLevelActivityPointMax());
            }
            TsLog.LogWarning("SetActivityPointMax ActivityPoint = {0}, MaxActivityPoint = {1} MaxActivityPoint = {2}", new object[]
            {
                kMyCharInfo.m_nActivityPoint,
                kMyCharInfo.m_nMaxActivityPoint,
                num
            });
            if (kMyCharInfo.m_nActivityPoint < num)
            {
                float num2 = 600f;
                if (instance != null)
                {
                    if (NrTSingleton <ContentsLimitManager> .Instance.IsVipExp())
                    {
                        num2 = (float)instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_UPDATE_ACTIVITY_MINUTE) * 60f;
                    }
                    else
                    {
                        short vipLevelActivityTime = NrTSingleton <NrTableVipManager> .Instance.GetVipLevelActivityTime();

                        num2 = (float)(instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_UPDATE_ACTIVITY_MINUTE) - (int)vipLevelActivityTime) * 60f;
                    }
                }
                float num3 = num2 * (float)(num - kMyCharInfo.m_nActivityPoint - 1L) + kMyCharInfo.m_fCurrentActivityTime;
                TsLog.LogWarning("ActivtyTime UpdateTime = {0}, m_fCurrentActivityTime = {1}", new object[]
                {
                    num2,
                    kMyCharInfo.m_fCurrentActivityTime
                });
                TsPlatform.Operator.SendLocalPush(11, (long)num3, NrTSingleton <NrTextMgr> .Instance.GetTextFromPush("4"));
            }
            else
            {
                TsPlatform.Operator.CancelLocalPush(11);
            }
        }
    }
Пример #4
0
    public static int GetSolCount(int recruittype)
    {
        int result = 0;
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance == null)
        {
            return(0);
        }
        switch (recruittype)
        {
        case 0:
        case 2:
        case 3:
        case 4:
        case 5:
        case 7:
        case 13:
        case 15:
        case 16:
        case 17:
        case 18:
        case 19:
            result = 1;
            break;

        case 1:
            result = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_SOLCOUNT_FORTEN);
            break;
        }
        return(result);
    }
    public void SetLegend()
    {
        this.e_MythType = MYTH_TYPE.MYTHTYPE_LEGEND;
        base.SetShowLayer(0, true);
        base.SetShowLayer(1, true);
        base.SetShowLayer(2, false);
        base.SetShowLayer(3, false);
        this.m_ToolBar.SetSelectTabIndex(0);
        this.m_Label_Gold.SetText(ANNUALIZED.Convert(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money));
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance != null)
        {
            int  value = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_ESSENCE_ITEMUNIQUE);
            ITEM item  = NkUserInventory.GetInstance().GetItem(value);
            if (item != null)
            {
                this.m_Label_Essence.SetText(ANNUALIZED.Convert(item.m_nItemNum));
            }
            else
            {
                this.m_Label_Essence.SetText("0");
            }
        }
        this.InitMythDataSet();
        this.SetDropDownList_Season();
        this.SetLegendDataSort(0);
        this.SetLegendSolShow(0);
    }
Пример #6
0
    public void OnClickStart(IUIObject obj)
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance == null)
        {
            return;
        }
        if (instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_EXPLORATION_LV) > kMyCharInfo.GetLevel())
        {
            return;
        }
        if (0L >= kMyCharInfo.m_nActivityPoint && NrTSingleton <ContentsLimitManager> .Instance.IsWillSpend())
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("385"));
            return;
        }
        this.SaveSolInfo();
        NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.EXPLORATION_PLAY_DLG);

        this.Close();
    }
Пример #7
0
    public void SetVipInfo(byte i8Level)
    {
        VipSubInfo vipSubInfo = NrTSingleton <NrVipSubInfoManager> .Instance.Get_VipSubInfo(i8Level);

        if (vipSubInfo == null)
        {
            return;
        }
        string empty  = string.Empty;
        string empty2 = string.Empty;
        string empty3 = string.Empty;

        this.m_listVipInfo = NrTSingleton <NrTableVipManager> .Instance.GetValue();

        for (int i = 0; i < this.m_listVipInfo.Count; i++)
        {
            if (this.m_listVipInfo[i].i8VipLevel == i8Level)
            {
                this.m_currVipInfo = this.m_listVipInfo[i];
            }
        }
        if (i8Level == 0)
        {
            this.m_dtVIPMark1.SetTextureFromBundle(string.Format("UI/etc/{0}", vipSubInfo.strIconPath));
        }
        else
        {
            COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
            int num = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BATTLE_REPEAT) + (int)this.m_currVipInfo.i8Battle_Repeat_Add;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3345"),
                "count",
                this.m_currVipInfo.i8FriendSupportNum
            });

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3345"),
                "count",
                this.m_currVipInfo.i16FastBattle
            });

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty3, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3346"),
                "count",
                num
            });

            this.m_dtVIPMark2.SetTextureFromBundle(string.Format("UI/etc/{0}", vipSubInfo.strIconPath));
            this.m_lheart.SetText(empty);
            this.m_lSpeedUp.SetText(empty2);
            this.m_lBabelTower.SetText(empty3);
        }
        this.m_lVip.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox(vipSubInfo.strNote));
        this.m_lVipState.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox(vipSubInfo.strState));
        this.m_lVipTile.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox(vipSubInfo.strTitle));
    }
    public override void SetComponent()
    {
        this.m_btRepeat = (base.GetControl("Button_battlerepeat") as Button);
        Button expr_1C = this.m_btRepeat;

        expr_1C.Click = (EZValueChangedDelegate)Delegate.Combine(expr_1C.Click, new EZValueChangedDelegate(this.OnStopBabelRepeat));
        NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_BATTLE_REPEAT", this.m_btRepeat, this.m_btRepeat.GetSize());

        this.m_lbCount = (base.GetControl("Label_Label1") as Label);
        this.m_dtBg    = (base.GetControl("DrawTexture_DrawTexture3") as DrawTexture);
        this._SetDialogPos();
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
        int num = 0;

        if (instance != null)
        {
            if (NrTSingleton <ContentsLimitManager> .Instance.IsVipExp())
            {
                num = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BATTLE_REPEAT);
            }
            else
            {
                int vipLevelAddBattleRepeat = (int)NrTSingleton <NrTableVipManager> .Instance.GetVipLevelAddBattleRepeat();

                num = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BATTLE_REPEAT) + vipLevelAddBattleRepeat;
            }
        }
        int    num2  = num - (NrTSingleton <NkBabelMacroManager> .Instance.MacroCount + 1);
        string empty = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1198"),
            "count",
            num2.ToString()
        });

        this.m_lbCount.SetText(empty);
        if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_NEWEXPLORATION)
        {
            this.m_lbCount.Visible = false;
            this.m_dtBg.Visible    = false;
        }
    }
Пример #9
0
    private void MsgBoxOKSolRecruitCashTen(object obj)
    {
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance == null)
        {
            return;
        }
        eSolRecruitType recruittype = (eSolRecruitType)((int)obj);
        int             value       = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_CASH_ITEMUNIQUE);

        this.ExcuteTicket(value, (int)recruittype, 0, true);
    }
Пример #10
0
    private void ClickExploration(IUIObject obj)
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance == null)
        {
            return;
        }
        if (instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_EXPLORATION_LV) > kMyCharInfo.GetLevel())
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("180"),
                "level",
                instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_EXPLORATION_LV)
            });

            Main_UI_SystemMessage.ADDMessage(empty);
            return;
        }
        if (!NrTSingleton <NkClientLogic> .Instance.ShowDownLoadUI(0, 0))
        {
            return;
        }
        DirectionDLG directionDLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_DIRECTION) as DirectionDLG;

        if (directionDLG != null)
        {
            directionDLG.SetDirection(DirectionDLG.eDIRECTIONTYPE.eDIRECTION_EXPLORATION);
            directionDLG.ShowDirection(DirectionDLG.eDIRECTIONTYPE.eDIRECTION_EXPLORATION, 0);
        }
    }
Пример #11
0
    public override bool ParseDataFromNDT(TsDataReader dr)
    {
        foreach (TsDataReader.Row data in dr)
        {
            PointTable pointTable = new PointTable();
            pointTable.SetData(data);
            NrTSingleton <PointManager> .Instance.AddPointTable(pointTable);
        }
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance != null)
        {
            NrTSingleton <PointManager> .Instance.SetItemBuyRate(instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_GET_ITEMPOINT_VALUE));
        }
        return(true);
    }
    public void OnClickStartInfiBattle(IUIObject obj)
    {
        if (SoldierBatch.SOLDIER_BATCH_MODE != eSOLDIER_BATCH_MODE.MODE_INFIBATTLE && SoldierBatch.SOLDIER_BATCH_MODE != eSOLDIER_BATCH_MODE.MODE_PRACTICE_INFIBATTLE)
        {
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_INFIBATTLE_COOLTIME);
        long curTime     = PublicMethod.GetCurTime();

        if (curTime < charSubData)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("862"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance != null)
        {
            int value = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_CHARGEMAX);
            int num   = value - (int)NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetCharDetail(21);

            if (num < 0)
            {
                num = 0;
            }
            if (SoldierBatch.SOLDIER_BATCH_MODE == eSOLDIER_BATCH_MODE.MODE_INFIBATTLE && num <= 0)
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("684"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
        }
        else
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("684"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
        }
        int solBatchNum = SoldierBatch.SOLDIERBATCH.GetSolBatchNum();
        int maxSolArray = SoldierBatch.SOLDIERBATCH.GetMaxSolArray();

        if (solBatchNum < maxSolArray)
        {
            this.ShowMessageBox_NotEnough_SolNumBatch(new YesDelegate(this.OnInfiStartMatch), solBatchNum, maxSolArray);
            return;
        }
        this.OnInfiStartMatch(null);
    }
Пример #13
0
    public CBuyItem()
    {
        this.m_kMenu[0] = new NPC_UI();
        this.m_kMenu[1] = new NPC_UI();
        this.m_kMenu[2] = new NPC_UI();
        this.m_kMenu[3] = new NPC_UI();
        this.m_kMenu[4] = new NPC_UI();
        this.m_kMenu[5] = new NPC_UI();
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2251");

        string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2257");

        this.m_kMenu[0].strMenu     = textFromInterface;
        this.m_kMenu[1].strMenu     = textFromInterface2;
        this.m_kMenu[2].strMenu     = string.Empty;
        this.m_kMenu[3].strMenu     = string.Empty;
        this.m_kMenu[4].strMenu     = string.Empty;
        this.m_kMenu[5].strMenu     = string.Empty;
        this.m_kMenu[0].byMenuType  = NPC_UI.E_NPC_UI_TYPE.E_NPC_UI_TYPE_COMMON;
        this.m_kMenu[1].byMenuType  = NPC_UI.E_NPC_UI_TYPE.E_NPC_UI_TYPE_COMMON;
        this.m_kMenu[2].byMenuType  = NPC_UI.E_NPC_UI_TYPE.E_NPC_UI_TYPE_NONE;
        this.m_kMenu[3].byMenuType  = NPC_UI.E_NPC_UI_TYPE.E_NPC_UI_TYPE_NONE;
        this.m_kMenu[4].byMenuType  = NPC_UI.E_NPC_UI_TYPE.E_NPC_UI_TYPE_NONE;
        this.m_kMenu[5].byMenuType  = NPC_UI.E_NPC_UI_TYPE.E_NPC_UI_TYPE_NONE;
        this.m_kMenu[0].strIconPath = "NPC_I_QuestI11";
        this.m_kMenu[1].strIconPath = "NPC_I_QuestI11";
        this.m_kMenu[2].strIconPath = string.Empty;
        this.m_kMenu[3].strIconPath = string.Empty;
        this.m_kMenu[4].strIconPath = string.Empty;
        this.m_kMenu[5].strIconPath = string.Empty;
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance != null)
        {
            int value = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_POINT_EXCHANGE_LIMIT);
            this.m_kMenu[0].nLimintLevel = (short)value;
            this.m_kMenu[1].nLimintLevel = (short)value;
            this.m_kMenu[2].nLimintLevel = (short)value;
            this.m_kMenu[3].nLimintLevel = (short)value;
            this.m_kMenu[4].nLimintLevel = (short)value;
            this.m_kMenu[5].nLimintLevel = (short)value;
            base.SetUIID(0, G_ID.EXCHANGE_POINT_DLG);
            base.SetUIID(1, G_ID.EXCHANGE_ITEM_DLG);
        }
    }
Пример #14
0
    public override void SetTicketList()
    {
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance == null)
        {
            Debug.LogError("ERROR, SolRecruitDlg_ChallengeQuest.cs, SetTicketList(), pkConstant is null");
            return;
        }
        string text  = string.Empty;
        string empty = string.Empty;

        this.m_TicketList.Clear();
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsLegendHire())
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2862");

            NewListItem newListItem = new NewListItem(this.m_TicketList.ColumnNum, true, string.Empty);
            int         value       = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_ESSENCE_ITEMUNIQUE);
            int         needItemNum = SolRecruitDlg.GetNeedItemNum(13);
            newListItem.SetListItemData(1, NrTSingleton <ItemManager> .Instance.GetItemTexture(value), null, null, null);
            newListItem.SetListItemEnable(3, true);
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                text,
                "targetname",
                NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(value),
                "count1",
                needItemNum,
                "count2",
                SolRecruitDlg.GetSolCount(13)
            });

            newListItem.SetListItemData(2, empty, null, null, null);
            newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("573"), eSolRecruitType.SOLRECRUIT_ESSENCE_ONE, new EZValueChangedDelegate(this.ClickTicketList), null);
            newListItem.SetListItemData(4, false);
            newListItem.SetListItemData(6, false);
            newListItem.Data = eSolRecruitType.SOLRECRUIT_ESSENCE_ONE;
            this.m_TicketList.Add(newListItem);
        }
        this.m_TicketList.RepositionItems();
    }
Пример #15
0
    public void Update()
    {
        if (this.m_bStop)
        {
            return;
        }
        if (Time.realtimeSinceStartup - this.m_fUpdateTime < 0.4f)
        {
            return;
        }
        this.m_fUpdateTime = Time.realtimeSinceStartup;
        switch (this.m_eStatus)
        {
        case eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_INIT:
            this.Init();
            this.m_eStatus = eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_CHECK_BATTLEPOS;
            break;

        case eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_CHECK_BATTLEPOS:
            if (!this.CheckBattlePos())
            {
                this.SetStatus(eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_NONE, 0f);
                return;
            }
            this.m_eStatus = eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_CHECK_INJURY;
            break;

        case eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_CHECK_INJURY:
            if (!this.InjuryCureComplete())
            {
                this.SetStatus(eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_NONE, 0f);
                return;
            }
            this.m_eStatus = eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_WAIT_CURE;
            break;

        case eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_WAIT_CURE:
            if (!this.WaitCure())
            {
                return;
            }
            this.m_eStatus = eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_BATTLE_START;
            break;

        case eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_BATTLE_START:
            if (!this.StartBabelMacroBattle())
            {
                this.SetStatus(eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_NONE, 0f);
                return;
            }
            this.m_eStatus = eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_BATTLE_ING;
            break;

        case eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_BATTLE_SELECT_SPECIAL_RESULT:
            if (Time.realtimeSinceStartup - this.m_fSelectTime > 0.3f && this.m_fSelectTime != 0f)
            {
                Battle_ResultDlg_Content battle_ResultDlg_Content = (Battle_ResultDlg_Content)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_RESULT_CONTENT_DLG);

                if (battle_ResultDlg_Content != null)
                {
                    int iSelectIndex = UnityEngine.Random.Range(0, 4);
                    battle_ResultDlg_Content.ClickRewardCardButton(iSelectIndex);
                    this.m_fSelectTime = 0f;
                }
            }
            break;

        case eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_BATTLE_SELECT_SPECIAL_COMPLETE:
            if (Time.realtimeSinceStartup - this.m_fSelectTime > 1f && this.m_fSelectTime != 0f)
            {
                Battle_ResultDlg_Content battle_ResultDlg_Content2 = (Battle_ResultDlg_Content)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_RESULT_CONTENT_DLG);

                if (battle_ResultDlg_Content2 != null)
                {
                    battle_ResultDlg_Content2.ClickRewardOKButton(null);
                    this.m_fSelectTime = 0f;
                }
            }
            break;

        case eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_BATTLE_END:
        {
            COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
            int num = 0;
            if (instance != null)
            {
                if (NrTSingleton <ContentsLimitManager> .Instance.IsVipExp())
                {
                    num = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BATTLE_REPEAT);
                }
                else
                {
                    int vipLevelAddBattleRepeat = (int)NrTSingleton <NrTableVipManager> .Instance.GetVipLevelAddBattleRepeat();

                    num = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BATTLE_REPEAT) + vipLevelAddBattleRepeat;
                }
            }
            if (this.m_bAutoBattle)
            {
                this.m_bAutoBattle = false;
            }
            else
            {
                this.m_nMacroCount++;
            }
            if (this.m_bBattleSpeedCheck)
            {
                NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
                if (kMyCharInfo != null)
                {
                    long charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_BATTLESPEED_COUNT);
                    if (charSubData > 0L)
                    {
                        int @int = PlayerPrefs.GetInt(NrPrefsKey.AUTOSELLGRADE, 0);
                        int int2 = PlayerPrefs.GetInt(NrPrefsKey.AUTOSELLRANK, 0);
                        TsLog.LogWarning("!!!!!!!!!!!!!!!!!! Macro Grade : {0}", new object[]
                            {
                                @int
                            });
                        TsLog.LogWarning("!!!!!!!!!!!!!!!!!! Macro Rank : {0}", new object[]
                            {
                                int2
                            });
                        if (@int > 0 || int2 > 0)
                        {
                            GS_ITEM_SELL_AUTO_BABEL_REQ gS_ITEM_SELL_AUTO_BABEL_REQ = new GS_ITEM_SELL_AUTO_BABEL_REQ();
                            gS_ITEM_SELL_AUTO_BABEL_REQ.i16BabelAutoSellGrade = (short)@int;
                            gS_ITEM_SELL_AUTO_BABEL_REQ.i16BabelAutoSellRank  = (short)int2;
                            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEM_SELL_AUTO_BABEL_REQ, gS_ITEM_SELL_AUTO_BABEL_REQ);
                        }
                    }
                }
            }
            if (this.m_nMacroCount < num)
            {
                this.m_eStatus = eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_CHECK_BATTLEPOS;
            }
            else
            {
                this.SetStatus(eBABEL_MACRO_STATUS.eBABEL_MACRO_STATUS_NONE, 0f);
                BabelTowerMainDlg babelTowerMainDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.BABELTOWERMAIN_DLG) as BabelTowerMainDlg;

                if (babelTowerMainDlg != null)
                {
                    babelTowerMainDlg.FloorType = this.m_nFloorType;
                    babelTowerMainDlg.ShowList();
                }
                if (PlayerPrefs.GetInt(NrPrefsKey.OPTION_VIBE_ON_OFF) == 1)
                {
                    Handheld.Vibrate();
                }
                this.ShowMacroResult();
            }
            break;
        }
        }
    }
Пример #16
0
    public void SetMyOldRankInfo(int i32Rank, string szCharName, int i32CharLevel, int i32BattleCnt, int i32WinCnt)
    {
        int num = 0;
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance != null)
        {
            num = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_RANKLIMIT);
        }
        string text  = string.Empty;
        string text2 = string.Empty;

        if (num < i32Rank || 0 >= i32Rank)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225");
        }
        else
        {
            text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3202");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                text2,
                "rank",
                i32Rank
            });

            if (i32Rank == 1)
            {
                text = NrTSingleton <CTextParser> .Instance.GetTextColor("1403") + text;
            }
            else if (i32Rank <= 10)
            {
                text = NrTSingleton <CTextParser> .Instance.GetTextColor("1107") + text;
            }
        }
        this.m_lbMyRank.SetText(text);
        if (szCharName.Length > 0)
        {
            this.m_lbMyCharName.SetText(szCharName);
        }
        else
        {
            this.m_lbMyCharName.SetText(string.Empty);
        }
        if (i32CharLevel > 0)
        {
            this.m_lbMyLevel.SetText(i32CharLevel.ToString());
        }
        else
        {
            this.m_lbMyLevel.SetText(string.Empty);
        }
        text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1041");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
        {
            text2,
            "count",
            "0"
        });

        if (i32Rank > 0 && i32Rank < 4)
        {
            this.m_DTMyRankIcon.SetTexture(this.GetRankImg(i32Rank));
        }
        else
        {
            this.m_DTMyRankIcon.SetTexture(string.Empty);
        }
        if (i32BattleCnt > 0)
        {
            float num2 = (float)i32WinCnt / (float)i32BattleCnt;
            text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("672");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                text2,
                "Count",
                (int)(num2 * 100f)
            });
        }
        else
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225");
        }
        this.m_lbMyWinningStreak.SetText(text);
    }
Пример #17
0
    public void ShowRank(GS_INFIBATTLE_RANK_ACK ACK)
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo != null)
        {
            charPersonInfo.InfiBattlePersonID = 0L;
            charPersonInfo.InfiBattleRank     = 0;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        this.m_eRankMode = (InfiBattleDefine.eINFIBATTLE_RANKMODE)ACK.ui8Type;
        this.m_nlbRankList.Clear();
        string text  = string.Empty;
        string text2 = string.Empty;

        for (int i = 0; i < this.m_RankInfoList.Count; i++)
        {
            NewListItem newListItem = new NewListItem(this.m_nlbRankList.ColumnNum, true, string.Empty);
            this.m_strCharName = TKString.NEWString(this.m_RankInfoList[i].strName);
            this.m_strLevel    = this.m_RankInfoList[i].i16Level.ToString();
            newListItem.SetListItemData(0, this.m_strCharName, null, null, null);
            newListItem.SetListItemData(1, this.m_strLevel, null, null, null);
            if (this.m_RankInfoList[i].i32Rank != 0)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3202");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strRank, new object[]
                {
                    text,
                    "rank",
                    this.m_RankInfoList[i].i32Rank
                });

                if (this.m_RankInfoList[i].i32Rank == 1)
                {
                    this.m_strRank = NrTSingleton <CTextParser> .Instance.GetTextColor("1403") + this.m_strRank;
                }
                else if (this.m_RankInfoList[i].i32Rank <= 10)
                {
                    this.m_strRank = NrTSingleton <CTextParser> .Instance.GetTextColor("1107") + this.m_strRank;
                }
                newListItem.SetListItemData(5, this.GetRankImg(this.m_RankInfoList[i].i32Rank), null, null, null);
            }
            else
            {
                this.m_strRank = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("48");
            }
            newListItem.SetListItemData(3, this.m_strRank, null, null, null);
            if (this.m_RankInfoList[i].i32BattleTotalCount > 0)
            {
                float num = (float)this.m_RankInfoList[i].i32BattleWinCount / (float)this.m_RankInfoList[i].i32BattleTotalCount;
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("672");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                {
                    text,
                    "Count",
                    (int)(num * 100f)
                });
            }
            else
            {
                text2 = string.Empty;
            }
            newListItem.SetListItemData(4, text2, null, null, null);
            newListItem.Data = this.m_RankInfoList[i].i64PersonID;
            this.m_nlbRankList.Add(newListItem);
        }
        this.m_nlbRankList.RepositionItems();
        if (ACK.ui8Type == 2)
        {
            int         index        = this.m_RankInfoList.Count;
            NewListItem newListItem2 = new NewListItem(this.m_nlbRankList.ColumnNum, true, string.Empty);
            if (charPersonInfo != null)
            {
                this.m_strCharName = charPersonInfo.GetCharName();
                this.m_strLevel    = myCharInfo.GetLevel().ToString();
                this.m_strRank     = myCharInfo.InfinityBattle_Rank.ToString();
                if (myCharInfo.InfinityBattle_Rank > 0)
                {
                    for (int i = 0; i < this.m_RankInfoList.Count; i++)
                    {
                        if (this.m_RankInfoList[i].i32Rank > myCharInfo.InfinityBattle_Rank)
                        {
                            index = i;
                            break;
                        }
                        if (this.m_RankInfoList[i].i32Rank == 0)
                        {
                            index = i;
                            break;
                        }
                        newListItem2.SetListItemData(5, this.GetRankImg(this.m_RankInfoList[i].i32Rank), null, null, null);
                    }
                }
                else
                {
                    this.m_strRank = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("48");

                    for (int i = 0; i < this.m_RankInfoList.Count; i++)
                    {
                        if (this.m_RankInfoList[i].i32Rank == myCharInfo.InfinityBattle_Rank)
                        {
                            index = i;
                            break;
                        }
                    }
                }
            }
            else
            {
                this.m_strCharName = string.Empty;
                this.m_strLevel    = "0";
                this.m_strRank     = "0";
            }
            newListItem2.SetListItemData(0, this.m_strCharName, null, null, null);
            newListItem2.SetListItemData(1, this.m_strLevel, null, null, null);
            newListItem2.SetListItemData(3, this.m_strRank, null, null, null);
            if (myCharInfo.InifBattle_TotalCount > 0)
            {
                float num = (float)myCharInfo.InifBattle_WinCount / (float)myCharInfo.InifBattle_TotalCount;
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("672");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                {
                    text,
                    "Count",
                    (int)(num * 100f)
                });
            }
            else
            {
                text2 = string.Empty;
            }
            newListItem2.SetListItemData(4, text2, null, null, null);
            newListItem2.Data = charPersonInfo.GetPersonID();
            this.m_nlbRankList.InsertAdd(index, newListItem2);
            this.m_nlbRankList.RepositionItems();
        }
        int num2 = 0;
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance != null)
        {
            num2 = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_RANKLIMIT);
        }
        if (num2 < myCharInfo.InfinityBattle_Rank || 0 >= myCharInfo.InfinityBattle_Rank)
        {
            text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225");
        }
        else
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3202");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
            {
                text,
                "rank",
                myCharInfo.InfinityBattle_Rank
            });

            if (myCharInfo.InfinityBattle_Rank == 1)
            {
                text2 = NrTSingleton <CTextParser> .Instance.GetTextColor("1403") + text2;
            }
            else if (myCharInfo.InfinityBattle_Rank <= 10)
            {
                text2 = NrTSingleton <CTextParser> .Instance.GetTextColor("1107") + text2;
            }
        }
        this.m_DTMyRankIcon.SetTexture(this.GetRankImg(myCharInfo.InfinityBattle_Rank));
        this.m_lbMyRank.SetText(text2);
        if (charPersonInfo != null)
        {
            this.m_lbMyCharName.SetText(charPersonInfo.GetCharName());
        }
        this.m_iCurrentPage = ACK.i32StartRank / 10 + 1;
        this.m_iMaxPage     = ACK.i32MaxRankCount / 10 + 1;
        this.m_lbMyLevel.SetText(myCharInfo.GetLevel().ToString());
        this.m_lbMyWinnig.SetText(myCharInfo.InfiBattleStraightWin.ToString());
        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1041");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
        {
            text,
            "count",
            "0"
        });

        if (myCharInfo.InifBattle_TotalCount > 0)
        {
            float num = (float)myCharInfo.InifBattle_WinCount / (float)myCharInfo.InifBattle_TotalCount;
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("672");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
            {
                text,
                "Count",
                (int)(num * 100f)
            });
        }
        else
        {
            text2 = string.Empty;
        }
        this.m_lbMyWinningStreak.SetText(text2);
        string text3 = "/ " + this.m_iMaxPage.ToString();

        this.m_lbPage.SetText(text3);
        this.m_btPageSet.SetText(this.m_iCurrentPage.ToString());
    }
Пример #18
0
    public void ShowinfiBattleInfo()
    {
        string       text       = string.Empty;
        string       text2      = string.Empty;
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
        int num = 0;

        if (instance != null)
        {
            num = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_RANKLIMIT);
        }
        if (num < myCharInfo.InfinityBattle_Rank || 0 >= myCharInfo.InfinityBattle_Rank)
        {
            text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225");
        }
        else
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2093");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
            {
                text,
                "rank",
                myCharInfo.InfinityBattle_Rank
            });
        }
        this.m_dtRankIcon.SetTexture(this.GetRankImg(myCharInfo.InfinityBattle_Rank));
        this.m_Label_infiniterank2.SetText(text2);
        num = 0;
        if (instance != null)
        {
            num = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_RANKLIMIT);
        }
        if (num < myCharInfo.InfinityBattle_OldRank || 0 >= myCharInfo.InfinityBattle_OldRank)
        {
            text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225");
        }
        else
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2093");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
            {
                text,
                "rank",
                myCharInfo.InfinityBattle_OldRank
            });
        }
        this.m_Label_latelyrank2.SetText(text2);
        this.m_dtLateRankIcon.SetTexture(this.GetRankImg(myCharInfo.InfinityBattle_OldRank));
        if (myCharInfo.InifBattle_WinCount > 0)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2759");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
            {
                text,
                "count",
                myCharInfo.InifBattle_WinCount
            });

            this.m_Label_winningstreak2.SetText(text2);
        }
        else
        {
            this.m_Label_winningstreak2.SetText(string.Empty);
        }
        float num2 = (float)myCharInfo.InifBattle_WinCount / (float)myCharInfo.InifBattle_TotalCount;

        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2936");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
        {
            text,
            "count",
            (int)(num2 * 100f)
        });

        this.m_Label_winningrate.SetText(text2);
        this.ShowinfiBattleList();
    }
Пример #19
0
    public void SetTargetInfoInfiBattle(bool bTargetShow, string strEnemyName, short iLevel, int iRank, int iStraightWin)
    {
        if (bTargetShow)
        {
            this.m_lCharName.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3176");

            this.m_lCharLevel.SetText(string.Empty);
            this.m_lbRank.SetText(string.Empty);
            this.m_lbStraightWin.SetText(string.Empty);
            COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
            string empty = string.Empty;
            if (instance != null)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("850"),
                    "time",
                    instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_BLIND_MATCH_TIME)
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            }
        }
        else
        {
            this.m_lCharName.Text  = strEnemyName;
            this.m_lCharLevel.Text = "Lv. " + iLevel.ToString();
            string text = string.Empty;
            if (0 < iRank)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1413"),
                    "rank",
                    iRank
                });
            }
            else
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225");
            }
            this.m_lbRank.SetText(text);
            if (0 <= iStraightWin)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2221"),
                    "count",
                    iStraightWin
                });

                this.m_lbStraightWin.SetText(text);
            }
            if (iLevel == 0)
            {
                NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.InfiBattleCharLevel = 1;
            }
            else
            {
                NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.InfiBattleCharLevel = (int)iLevel;
            }
        }
        SoldierBatch.SOLDIERBATCH.SetEnemyUserName(this.m_lCharName.Text);
    }
Пример #20
0
    public void OnClickRepeat(IUIObject obj)
    {
        if (Scene.CurScene == Scene.Type.BATTLE)
        {
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
        int num  = 0;
        int num2 = 0;

        if (myCharInfo.ColosseumMatching)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("615"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        if (instance != null)
        {
            if (NrTSingleton <ContentsLimitManager> .Instance.IsVipExp())
            {
                num2 = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BATTLE_REPEAT);
            }
            else
            {
                short vipLevelAddBattleRepeat = NrTSingleton <NrTableVipManager> .Instance.GetVipLevelAddBattleRepeat();

                num2 = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BATTLE_REPEAT) + (int)vipLevelAddBattleRepeat;
            }
            num = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABEL_REPEAT);
        }
        if (myCharInfo.GetLevel() < num)
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("781"),
                "level",
                num
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        string text   = " ";
        int    nFloor = (int)this.m_nFloor;
        int    num3   = (int)this.m_nsubFloor;

        if (nFloor <= 0 || num3 < 0)
        {
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("614");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        num3++;
        MsgBoxTwoCheckUI msgBoxTwoCheckUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_TWOCHECK_DLG) as MsgBoxTwoCheckUI;

        if (this.m_nFloorType == 2)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2784");
        }
        string empty2 = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("186"),
            "type",
            text,
            "floor",
            nFloor.ToString(),
            "subfloor",
            num3.ToString(),
            "count",
            num2.ToString()
        });

        msgBoxTwoCheckUI.SetCheckBoxState(1, false);
        msgBoxTwoCheckUI.SetCheckBoxState(2, false);
        msgBoxTwoCheckUI.SetMsg(new YesDelegate(BabelTowerMainDlg.RepeatBabelStart), msgBoxTwoCheckUI, null, null, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("185"), empty2, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("354"), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("263"), new CheckBox2Delegate(BabelTowerMainDlg.CheckBattleSpeedCount), eMsgType.MB_CHECK12_OK_CANCEL);
        MsgBoxTwoCheckUI expr_22F = msgBoxTwoCheckUI;

        expr_22F.m_YesDelegatePriority = (YesDelegate)Delegate.Combine(expr_22F.m_YesDelegatePriority, new YesDelegate(this.SaveBabelFloor));
    }
Пример #21
0
    private void _SetSolInfo()
    {
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance == null)
        {
            return;
        }
        int value = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_EXPLORATION_EXP);
        int num   = 0;
        List <NkSoldierInfo> solInfo = NrTSingleton <ExplorationManager> .Instance.GetSolInfo();

        foreach (NkSoldierInfo current in solInfo)
        {
            if (NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(current.GetCharKind()) != null)
            {
                NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

                if (charPersonInfo == null)
                {
                    return;
                }
                NewListItem newListItem = new NewListItem(this.m_nlSolInfo.ColumnNum, true, string.Empty);
                string      text        = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("471"),
                    "targetname",
                    current.GetName(),
                    "count",
                    current.GetLevel()
                });

                int num2 = 0;
                if (!current.IsMaxLevel())
                {
                    num2 = value * (int)current.GetLevel() * NrTSingleton <ExplorationManager> .Instance.GetExpCount();
                }
                string text2 = text;
                text = string.Concat(new string[]
                {
                    text2,
                    " ",
                    NrTSingleton <CTextParser> .Instance.GetTextColor("1107"),
                    "+",
                    num2.ToString()
                });
                newListItem.SetListItemData(1, current.GetListSolInfo(false), null, null, null);
                newListItem.SetListItemData(2, text, null, null, null);
                NkSoldierInfo soldierInfoFromSolID = charPersonInfo.GetSoldierInfoFromSolID(current.GetSolID());
                if (soldierInfoFromSolID != null)
                {
                    float  num3  = soldierInfoFromSolID.GetExpPercent();
                    string empty = string.Empty;
                    if (num3 < 0f)
                    {
                        num3 = 0f;
                    }
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("672"),
                        "Count",
                        ((int)(num3 * 100f)).ToString()
                    });

                    newListItem.SetListItemData(4, "Com_T_GauWaPr4", 400f * num3, null, null);
                    newListItem.SetListItemData(5, empty, null, null, null);
                }
                this.m_nlSolInfo.Add(newListItem);
                num++;
            }
        }
        this.m_nlSolInfo.RepositionItems();
    }
Пример #22
0
    public void OnClickUse(IUIObject obj)
    {
        if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_RANDOMBOX)
        {
            GS_BOX_USE_REQ gS_BOX_USE_REQ = new GS_BOX_USE_REQ();
            gS_BOX_USE_REQ.m_nItemID     = this.m_MainBoxItem.m_nItemID;
            gS_BOX_USE_REQ.m_nItemUnique = this.m_MainBoxItem.m_nItemUnique;
            gS_BOX_USE_REQ.m_nPosType    = this.m_MainBoxItem.m_nPosType;
            gS_BOX_USE_REQ.m_nItemPos    = this.m_MainBoxItem.m_nItemPos;
            gS_BOX_USE_REQ.m_nArrayIndex = 0;
            gS_BOX_USE_REQ.m_byAllOpen   = 1;
            gS_BOX_USE_REQ.m_nItemCount  = this.m_nItemOpenCount;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_BOX_USE_REQ, gS_BOX_USE_REQ);
        }
        else if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_GOLDBAR || this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_EXCHANGE || this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_BATTLESPEED)
        {
            NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

            NkSoldierInfo userSoldierInfo = nrCharUser.GetUserSoldierInfo();
            long          solID           = userSoldierInfo.GetSolID();
            if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_BATTLESPEED && this.m_MaxCount <= 0f)
            {
                COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
                if (instance == null)
                {
                    return;
                }
                int    value          = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_FASTBATTLE_MAXNUM);
                string empty          = string.Empty;
                string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("801");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    textFromNotify,
                    "count",
                    value
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
                return;
            }
            else
            {
                GS_ITEM_SUPPLY_USE_REQ gS_ITEM_SUPPLY_USE_REQ = new GS_ITEM_SUPPLY_USE_REQ();
                gS_ITEM_SUPPLY_USE_REQ.m_nItemUnique = this.m_MainBoxItem.m_nItemUnique;
                gS_ITEM_SUPPLY_USE_REQ.m_nDestSolID  = solID;
                gS_ITEM_SUPPLY_USE_REQ.m_shItemNum   = this.m_nItemOpenCount;
                gS_ITEM_SUPPLY_USE_REQ.m_byPosType   = this.m_MainBoxItem.m_nPosType;
                gS_ITEM_SUPPLY_USE_REQ.m_shPosItem   = this.m_MainBoxItem.m_nItemPos;
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_ITEM_SUPPLY_USE_REQ, gS_ITEM_SUPPLY_USE_REQ);
                this.Close();
            }
        }
        else if (this.m_eShowType == ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_TICKET)
        {
            if (!(obj.Data is ITEM))
            {
                return;
            }
            ITEM iTEM = obj.Data as ITEM;
            if (iTEM == null)
            {
                return;
            }
            NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

            if (readySolList == null || readySolList.GetCount() >= 100)
            {
                string textFromNotify2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("507");

                Main_UI_SystemMessage.ADDMessage(textFromNotify2, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
                return;
            }
            if (NrTSingleton <ItemManager> .Instance.GetItemInfo(iTEM.m_nItemUnique) == null)
            {
                return;
            }
            SolRecruitDlg solRecruitDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLRECRUIT_DLG) as SolRecruitDlg;

            if (solRecruitDlg != null)
            {
                solRecruitDlg.SetRecruitButtonEnable(false);
            }
            NrTSingleton <NkClientLogic> .Instance.SetCanOpenTicket(false);

            if (this.m_nItemOpenCount == 1)
            {
                Protocol_Item.Item_Use(iTEM);
                return;
            }
            GS_SOLDIER_RECRUIT_REQ gS_SOLDIER_RECRUIT_REQ = default(GS_SOLDIER_RECRUIT_REQ);
            gS_SOLDIER_RECRUIT_REQ.ItemUnique  = iTEM.m_nItemUnique;
            gS_SOLDIER_RECRUIT_REQ.RecruitType = 20;
            gS_SOLDIER_RECRUIT_REQ.SubData     = this.m_nItemOpenCount;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_SOLDIER_RECRUIT_REQ, gS_SOLDIER_RECRUIT_REQ);
        }
    }
Пример #23
0
    public override void Update()
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        if (this.oldMoney != kMyCharInfo.m_Money)
        {
            this.oldMoney  = kMyCharInfo.m_Money;
            this.gold.Text = ANNUALIZED.Convert(kMyCharInfo.m_Money);
        }
        if (NrTSingleton <ContentsLimitManager> .Instance.IsWillSpend())
        {
            COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
            if (Time.realtimeSinceStartup >= kMyCharInfo.m_fCurrentActivityTime && kMyCharInfo.m_fCurrentActivityTime != 0f)
            {
                float num = 600f;
                if (instance != null)
                {
                    if (NrTSingleton <ContentsLimitManager> .Instance.IsVipExp())
                    {
                        num = (float)instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_UPDATE_ACTIVITY_MINUTE) * 60f;
                    }
                    else
                    {
                        short vipLevelActivityTime = NrTSingleton <NrTableVipManager> .Instance.GetVipLevelActivityTime();

                        num = (float)(instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_UPDATE_ACTIVITY_MINUTE) - (int)vipLevelActivityTime) * 60f;
                    }
                }
                kMyCharInfo.m_fCurrentActivityTime = num + kMyCharInfo.m_fCurrentActivityTime;
                if (kMyCharInfo.m_nActivityPoint < kMyCharInfo.m_nMaxActivityPoint)
                {
                    kMyCharInfo.AddActivityPoint(1L);
                }
            }
            if (this.m_nCurrentActivity != kMyCharInfo.m_nActivityPoint || this.m_nMaxActivity != kMyCharInfo.m_nMaxActivityPoint)
            {
                this.m_nCurrentActivity = kMyCharInfo.m_nActivityPoint;
                this.m_nMaxActivity     = kMyCharInfo.m_nMaxActivityPoint;
                this.SetActivityPointUI();
            }
            if (this.m_fActivityUpdateTime < Time.realtimeSinceStartup)
            {
                float num2 = kMyCharInfo.m_fCurrentActivityTime - Time.realtimeSinceStartup;
                int   num3 = (int)(num2 / 3600f);
                int   num4 = (int)((num2 - (float)num3 * 3600f) / 60f);
                int   num5 = (int)((num2 - (float)num3 * 3600f - (float)num4 * 60f) % 60f);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_szStrActivityTime, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("89"),
                    "min",
                    num4.ToString("00"),
                    "sec",
                    num5.ToString("00")
                });

                this.m_lbActivityTime.SetText(this.m_szStrActivityTime);
                this.m_fActivityUpdateTime = Time.realtimeSinceStartup + 1f;
            }
        }
        if (this.m_iHeartsNum != NkUserInventory.GetInstance().Get_First_ItemCnt(70000))
        {
            this.m_iHeartsNum = NkUserInventory.GetInstance().Get_First_ItemCnt(70000);
            this.m_lbHearts.SetText(ANNUALIZED.Convert(this.m_iHeartsNum));
        }
        if (this.m_iSoulGemsNum != NkUserInventory.GetInstance().Get_First_ItemCnt(70002))
        {
            this.m_iSoulGemsNum = NkUserInventory.GetInstance().Get_First_ItemCnt(70002);
            this.m_lbSoulGems.SetText(ANNUALIZED.Convert(this.m_iSoulGemsNum));
        }
        if (NrTSingleton <ContentsLimitManager> .Instance.IsTimeShop())
        {
            this.Update_TimeShopRemainTime();
        }
    }
Пример #24
0
    public void _LinkBasicDataInfiBattle()
    {
        ushort num  = (ushort)(this.m_InfiBattleInfo.fBattleTime / 3600f);
        ushort num2 = (ushort)((this.m_InfiBattleInfo.fBattleTime - (float)(num * 3600)) / 60f);
        ushort num3 = (ushort)(this.m_InfiBattleInfo.fBattleTime - (float)(num * 3600) - (float)(num2 * 60));

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strBattleTime, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("976"),
            "hour",
            string.Format("{0:D2}", num),
            "min",
            string.Format("{0:D2}", num2),
            "sec",
            string.Format("{0:D2}", num3)
        });

        this.m_fBattleTime = this.m_InfiBattleInfo.fBattleTime;
        if (Battle.BATTLE == null)
        {
            Debug.LogError("Battle Result dialog : Battle.BATTLE Is NULL");
            return;
        }
        int num4 = 3;
        int num5 = 3;

        for (int i = 0; i < 3; i++)
        {
            if (this.m_InfiBattleInfo.bAttackDeadStartPos[i])
            {
                this.m_lbAttackerDeadStartPos[i].SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("235"));
                this.m_lbDefencerDeadStartPos[i].SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("234"));
                num4--;
            }
            else
            {
                this.m_lbAttackerDeadStartPos[i].SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("234"));
                this.m_lbDefencerDeadStartPos[i].SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("235"));
                num5--;
            }
        }
        this.m_bWin = false;
        if (this.m_InfiBattleInfo.i8WinAlly == 0)
        {
            this.m_bWin = true;
        }
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo != null)
        {
            kMyCharInfo.PlunderMoney     = 0L;
            kMyCharInfo.PlunderCharName  = string.Empty;
            kMyCharInfo.PlunderCharLevel = 0;
        }
        this.m_lbAttacker.SetText(NrTSingleton <NkCharManager> .Instance.GetCharName());
        this.m_lbDefencer.SetText(TKString.NEWString(this.m_InfiBattleInfo.strDefencerName));
        string text  = string.Empty;
        string empty = string.Empty;

        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2937");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            text,
            "count1",
            kMyCharInfo.InfiBattleStraightWin,
            "count2",
            kMyCharInfo.InfinityBattle_OldRank
        });

        this.m_lbWin.SetText(num4.ToString());
        this.m_lbLose.SetText(num5.ToString());
        string text2 = string.Empty;
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
        int num6 = -1;

        if (instance != null)
        {
            num6 = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_RANKLIMIT);
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (this.m_bWin)
        {
            if (num4 >= 3)
            {
                this.m_strWin = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("307");
            }
            else
            {
                this.m_strWin = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("308");
            }
            if (this.m_InfiBattleInfo.i32RewardItemUnique > 0)
            {
                UIBaseInfoLoader itemTexture = NrTSingleton <ItemManager> .Instance.GetItemTexture(this.m_InfiBattleInfo.i32RewardItemUnique);

                this.m_itInfiBattleRewardItem.SetTexture(itemTexture);
                text2 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(this.m_InfiBattleInfo.i32RewardItemUnique);

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1827"),
                    "itemname",
                    text2,
                    "num",
                    this.m_InfiBattleInfo.i32RewardItemNum.ToString()
                });

                int num7 = this.m_InfiBattleInfo.i32StraightLoseItemNum + this.m_InfiBattleInfo.i32StraightWinItemNum;
                if (num7 > 0)
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2233"),
                        "itemname",
                        text2,
                        "num",
                        this.m_InfiBattleInfo.i32RewardItemNum.ToString(),
                        "num2",
                        num7.ToString()
                    });
                }
                this.m_lbInfiBattleReward_2.SetText(text);
            }
            else
            {
                this.m_lbInfiBattleReward_2.SetText(string.Empty);
            }
            int num8 = (this.m_InfiBattleInfo.i32AttackRank <= this.m_InfiBattleInfo.i32DefenseRank) ? this.m_InfiBattleInfo.i32AttackRank : this.m_InfiBattleInfo.i32DefenseRank;
            if (num6 < num8 || 0 >= num8)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225");
            }
            else
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("447"),
                    "rank",
                    num8.ToString()
                });
            }
            this.m_lbInfiBattleRank_2.SetText(text);
            myCharInfo.InfiBattleStraightWin = this.m_InfiBattleInfo.i32AttackWinCount;
            string  str     = "Effect/Instant/fx_victory_ui" + NrTSingleton <UIDataManager> .Instance.AddFilePath;
            WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName);
            wWWItem.SetItemType(ItemType.USER_ASSETB);
            wWWItem.SetCallback(new PostProcPerItem(this.BattleRankEffect), null);
            TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true);
        }
        else
        {
            myCharInfo.InfiBattleStraightWin = this.m_InfiBattleInfo.i32AttackWinCount;
            this.m_strWin = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("311");

            this.m_lbInfiBattleReward_1.SetText(string.Empty);
            this.m_lbInfiBattleRank_1.SetText(string.Empty);
            this.m_lbInfiBattleReward_2.SetText(string.Empty);
            int i32AttackRank = this.m_InfiBattleInfo.i32AttackRank;
            if (num6 < i32AttackRank || 0 >= i32AttackRank)
            {
                text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2225");
            }
            else
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("447"),
                    "rank",
                    i32AttackRank.ToString()
                });
            }
            this.m_lbInfiBattleRank_2.SetText(text);
        }
        if (instance != null)
        {
            if (kMyCharInfo.InfinityBattle_Rank < instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_RANK))
            {
                this.m_lbInfiBattleWin.SetText("0");
            }
            else
            {
                this.m_lbInfiBattleWin.SetText(string.Empty);
            }
        }
    }
Пример #25
0
    public virtual void SetTicketList()
    {
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance == null)
        {
            return;
        }
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2016");

        string empty = string.Empty;

        this.m_TicketList.Clear();
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsLegendHire())
        {
            textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2862");

            NewListItem newListItem = new NewListItem(this.m_TicketList.ColumnNum, true, string.Empty);
            int         value       = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_ESSENCE_ITEMUNIQUE);
            int         needItemNum = SolRecruitDlg.GetNeedItemNum(13);
            ITEM        item        = NkUserInventory.GetInstance().GetItem(value);
            if (item != null)
            {
                newListItem.SetListItemData(1, item, null, null, null);
                if (item.m_nItemNum >= needItemNum)
                {
                    newListItem.SetListItemEnable(3, true);
                }
                else
                {
                    newListItem.SetListItemEnable(3, false);
                }
            }
            else
            {
                newListItem.SetListItemData(1, NrTSingleton <ItemManager> .Instance.GetItemTexture(value), null, null, null);
                newListItem.SetListItemEnable(3, false);
            }
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                textFromInterface,
                "targetname",
                NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(value),
                "count1",
                needItemNum,
                "count2",
                SolRecruitDlg.GetSolCount(13)
            });

            newListItem.SetListItemData(2, empty, null, null, null);
            newListItem.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("573"), eSolRecruitType.SOLRECRUIT_ESSENCE_ONE, new EZValueChangedDelegate(this.ClickTicketList), null);
            newListItem.SetListItemData(4, false);
            newListItem.SetListItemData(6, false);
            newListItem.Data = eSolRecruitType.SOLRECRUIT_ESSENCE_ONE;
            this.m_TicketList.Add(newListItem);
        }
        this.AddTicketSellInfo();
        List <ITEM> functionItemsByInvenType = NkUserInventory.instance.GetFunctionItemsByInvenType(6, eITEM_SUPPLY_FUNCTION.SUPPLY_GETSOLDIER);

        foreach (ITEM current in functionItemsByInvenType)
        {
            if (NrTSingleton <ItemManager> .Instance.IsItemATB(current.m_nItemUnique, 2048L))
            {
                NewListItem newListItem2 = new NewListItem(this.m_TicketList.ColumnNum, true, string.Empty);
                string      name         = NrTSingleton <ItemManager> .Instance.GetName(current);

                newListItem2.SetListItemData(1, current, null, null, null);
                newListItem2.SetListItemData(2, name, null, null, null);
                newListItem2.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("573"), current, new EZValueChangedDelegate(this.ClickTicketList), null);
                newListItem2.SetListItemData(4, false);
                newListItem2.SetListItemData(5, string.Empty, current.m_nItemID, new EZValueChangedDelegate(this.ClickTicketItemToolTip), null);
                newListItem2.SetListItemData(6, false);
                newListItem2.Data = current.m_nItemUnique;
                this.m_TicketList.Add(newListItem2);
            }
        }
        foreach (ITEM current2 in functionItemsByInvenType)
        {
            if (!NrTSingleton <ItemManager> .Instance.IsItemATB(current2.m_nItemUnique, 2048L))
            {
                NewListItem newListItem3 = new NewListItem(this.m_TicketList.ColumnNum, true, string.Empty);
                string      name2        = NrTSingleton <ItemManager> .Instance.GetName(current2);

                newListItem3.SetListItemData(1, current2, null, null, null);
                newListItem3.SetListItemData(2, name2, null, null, null);
                newListItem3.SetListItemData(3, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("573"), current2, new EZValueChangedDelegate(this.ClickTicketList), null);
                newListItem3.SetListItemData(4, false);
                newListItem3.SetListItemData(5, string.Empty, current2.m_nItemID, new EZValueChangedDelegate(this.ClickTicketItemToolTip), null);
                newListItem3.SetListItemData(6, false);
                this.m_TicketList.Add(newListItem3);
            }
        }
        this.m_TicketList.RepositionItems();
        this.SetLastSelectItemScrol();
    }
Пример #26
0
    public void CheckLimitTime()
    {
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        string empty = string.Empty;
        int    num   = 0;
        long   num2  = 0L;
        long   num3  = 0L;
        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();

        if (instance != null)
        {
            num  = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_CHARGEMAX);
            num2 = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_INFIBATTLECOUNT);
            num3 = (long)instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_CHARGETIME);
            if (num2 < 0L)
            {
                num2 = 0L;
            }
            if (num3 < 0L)
            {
                num3 = 0L;
            }
        }
        else
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("684"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
        }
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2235"),
            "count1",
            num2,
            "count2",
            num
        });

        this.m_Label_LimitCount.SetText(empty);
        long   curTime = PublicMethod.GetCurTime();
        string text    = string.Empty;

        if ((long)num == num2)
        {
            this.m_Label_chargetime.Visible = false;
            this.m_ProgressBar.Value        = 0f;
            return;
        }
        long  charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_INFIBATTLEADDCOUNT_TIME);
        float value;

        if (curTime <= charSubData)
        {
            this.m_Label_chargetime.Visible = true;
            text = PublicMethod.ConvertTime(charSubData - curTime);
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2933"),
                "timestring",
                text
            });

            this.m_Label_chargetime.SetText(empty);
            value = 1f - (float)(charSubData - curTime) / ((float)num3 * 60f);
        }
        else
        {
            this.m_Label_chargetime.Visible = false;
            value = 1f;
        }
        this.m_ProgressBar.Value = value;
    }
Пример #27
0
    public void ShowList()
    {
        this.m_bLoadComplete = false;
        this.m_kFloorInfo.Clear();
        this.m_lbFloor.Clear();
        bool  flag = true;
        short num;

        if (this.m_nFloorType == 2)
        {
            TsAudioManager.Instance.AudioContainer.RequestAudioClip("BGM", "CHAOSTOWER", "HARDMODE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, true);
            TsAudioManager.Instance.AudioContainer.RequestAudioClip("AMB", "CHAOSTOWER", "HARDMODE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, true);
            num = (short)PlayerPrefs.GetInt(NrPrefsKey.LASTPLAY_BABELFLOOR_HARD, 1);
            this.m_laTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2782"));
            NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_BABEL_MAIN_HARD", this.m_dtEffect, this.m_dtEffect.GetSize());
        }
        else
        {
            TsAudioManager.Instance.AudioContainer.RequestAudioClip("BGM", "CHAOSTOWER", "START", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay), string.Empty, true);
            num = (short)PlayerPrefs.GetInt(NrPrefsKey.LASTPLAY_BABELFLOOR, 1);
            this.m_laTitle.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1377"));
            NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_BABEL_MAIN", this.m_dtEffect, this.m_dtEffect.GetSize());
        }
        short num2 = NrTSingleton <BabelTowerManager> .Instance.GetLastFloor(this.m_nFloorType);

        int babelTowerLastFloor = NrTSingleton <ContentsLimitManager> .Instance.GetBabelTowerLastFloor(this.m_nFloorType);

        if (0 < babelTowerLastFloor && babelTowerLastFloor < (int)num2)
        {
            num2 = (short)babelTowerLastFloor;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        COMMON_CONSTANT_Manager instance = COMMON_CONSTANT_Manager.GetInstance();
        int num3 = 0;

        if (instance != null)
        {
            num3 = instance.GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABEL_REPEAT);
        }
        if (myCharInfo.GetLevel() < num3)
        {
            this.m_dtLock.Visible = true;
        }
        else
        {
            this.m_dtLock.Visible = false;
        }
        short        num4        = num2 / 5;
        string       text        = string.Empty;
        string       text2       = string.Empty;
        string       text3       = string.Empty;
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        for (short num5 = num4; num5 > 0; num5 -= 1)
        {
            string text4 = string.Empty;
            if (flag)
            {
                text4 = string.Format("Mobile/DLG/BabelTower/newlistbox_floor_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath);
            }
            else
            {
                text4 = string.Format("Mobile/DLG/BabelTower/newlistbox_floor1_columndata{0}", NrTSingleton <UIDataManager> .Instance.AddFilePath);
            }
            this.m_lbFloor.SetColumnData(text4);
            NewListItem newListItem = new NewListItem(this.m_lbFloor.ColumnNum, true, string.Empty);
            newListItem.m_szColumnData = text4;
            if (!flag)
            {
                if (this.m_nFloorType == 2)
                {
                    newListItem.SetListItemData(0, "UI/BabelTower/babel_hard_main1", true, null, null);
                }
                else
                {
                    newListItem.SetListItemData(0, "UI/BabelTower/babel_main1", true, null, null);
                }
            }
            else if (this.m_nFloorType == 2)
            {
                newListItem.SetListItemData(0, "UI/BabelTower/babel_hard_main2", true, null, null);
            }
            else
            {
                newListItem.SetListItemData(0, "UI/BabelTower/babel_main2", true, null, null);
            }
            for (int i = 4; i >= 0; i--)
            {
                List <FRIEND_BABEL_CLEARINFO> babelFloor_FriendList = kMyCharInfo.m_kFriendInfo.GetBabelFloor_FriendList(num2, this.m_nFloorType);
                if (babelFloor_FriendList != null)
                {
                    for (int j = 0; j < 3; j++)
                    {
                        if (babelFloor_FriendList.Count >= j + 1)
                        {
                            USER_FRIEND_INFO friend = kMyCharInfo.m_kFriendInfo.GetFriend(babelFloor_FriendList[j].i64FriendPersonID);
                            if (friend != null)
                            {
                                Texture2D friendTexture = kMyCharInfo.GetFriendTexture(babelFloor_FriendList[j].i64FriendPersonID);
                                if (friendTexture == null)
                                {
                                    NkListSolInfo nkListSolInfo = new NkListSolInfo();
                                    nkListSolInfo.SolCharKind            = friend.i32FaceCharKind;
                                    nkListSolInfo.SolGrade               = -1;
                                    nkListSolInfo.SolLevel               = friend.i16Level;
                                    nkListSolInfo.SolCostumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(friend.i32FaceCharCostumeUnique);

                                    newListItem.SetListItemData(i * 6 + 7 + j * 2, nkListSolInfo, num2, new EZValueChangedDelegate(this.BtClickFloorFriendList), null);
                                }
                                else
                                {
                                    newListItem.SetListItemData(i * 6 + 7 + j * 2, friendTexture, num2, null, new EZValueChangedDelegate(this.BtClickFloorFriendList), null);
                                }
                                newListItem.SetListItemData(i * 6 + 6 + j * 2, !flag);
                                newListItem.SetListItemData(i * 6 + 7 + j * 2, !flag);
                            }
                        }
                        else
                        {
                            newListItem.SetListItemData(i * 6 + 6 + j * 2, false);
                            newListItem.SetListItemData(i * 6 + 7 + j * 2, false);
                        }
                    }
                }
                else
                {
                    newListItem.SetListItemData(i * 6 + 6, false);
                    newListItem.SetListItemData(i * 6 + 6 + 2, false);
                    newListItem.SetListItemData(i * 6 + 6 + 4, false);
                    newListItem.SetListItemData(i * 6 + 7, false);
                    newListItem.SetListItemData(i * 6 + 7 + 2, false);
                    newListItem.SetListItemData(i * 6 + 7 + 4, false);
                }
                newListItem.SetListItemData(i + 36, false);
                newListItem.SetListItemData(i + 41, false);
                newListItem.SetListItemData(i + 5 + 41, false);
                if (num2 / 100 >= 1)
                {
                    short num6 = num2 / 100;
                    short num7 = num2 / 10 % 10;
                    short num8 = num2 % 10;
                    text  = "Win_Number_" + num6;
                    text2 = "Win_Number_" + num7;
                    text3 = "Win_Number_" + num8;
                    newListItem.SetListItemData(i + 6 + 41, true);
                    newListItem.SetListItemData(i + 6 + 41, text, null, null, null);
                    newListItem.SetListItemData(i + 41, true);
                    newListItem.SetListItemData(i + 41, text2, null, null, null);
                    newListItem.SetListItemData(i + 5 + 41, true);
                    newListItem.SetListItemData(i + 5 + 41, text3, null, null, null);
                }
                else if (num2 / 10 <= 0 && num2 % 10 > 0)
                {
                    text = "Win_Number_" + num2;
                    newListItem.SetListItemData(i + 36, true);
                    newListItem.SetListItemData(i + 36, text, null, null, null);
                }
                else
                {
                    short num9  = num2 / 10;
                    short num10 = num2 % 10;
                    text  = "Win_Number_" + num9;
                    text2 = "Win_Number_" + num10;
                    newListItem.SetListItemData(i + 41, true);
                    newListItem.SetListItemData(i + 41, text, null, null, null);
                    newListItem.SetListItemData(i + 5 + 41, true);
                    newListItem.SetListItemData(i + 5 + 41, text2, null, null, null);
                }
                byte             babelFloorRankInfo = kMyCharInfo.GetBabelFloorRankInfo(num2, this.m_nFloorType);
                bool             treasure           = kMyCharInfo.IsBabelTreasure(num2, this.m_nFloorType);
                UIBaseInfoLoader loader             = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(NrTSingleton <BabelTowerManager> .Instance.GetBabelRankImgText(babelFloorRankInfo, treasure));

                newListItem.SetListItemData(i + 1, loader, num2, new EZValueChangedDelegate(this.BtClickFloor), null);
                if (num2 == num)
                {
                    this.m_nSelectindex = num4 - num5;
                }
                num2 -= 1;
            }
            newListItem.Data = (int)(num5 - 1);
            flag             = !flag;
            this.m_lbFloor.Add(newListItem);
            this.m_kFloorInfo.Add((int)num5);
        }
        this.m_lbFloor.RepositionItems();
        if (!this.m_lbFloor.ReUse)
        {
            this.m_lbFloor.SetSelectedItem((int)this.m_nSelectindex);
        }
    }