Пример #1
0
    private void SetItemBattleSpeed()
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo != null)
        {
            long     charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_BATTLESPEED_COUNT);
            int      value       = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_FASTBATTLE_MAXNUM);
            int      num         = NkUserInventory.GetInstance().Get_First_ItemCnt(this.m_MainBoxItem.m_nItemUnique);
            ITEMINFO itemInfo    = NrTSingleton <ItemManager> .Instance.GetItemInfo(this.m_MainBoxItem.m_nItemUnique);

            if (itemInfo == null)
            {
                return;
            }
            long num2 = (long)value - charSubData;
            this.m_MaxCount = (float)(num2 / (long)itemInfo.m_nParam[0]);
            if (this.m_MaxCount > (float)num)
            {
                this.m_MaxCount = (float)num;
            }
            this.m_nItemOpenCount = (int)this.m_MaxCount;
            this.SetOpenItemNum(this.m_nItemOpenCount);
        }
    }
Пример #2
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();
    }
Пример #3
0
    private int GetMaxItem()
    {
        switch (this.m_eShowType)
        {
        case ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_RANDOMBOX:
            if (this.m_MainBoxItem.m_nItemNum < 12)
            {
                return(this.m_MainBoxItem.m_nItemNum);
            }
            return(12);

        case ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_GOLDBAR:
        case ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_EXCHANGE:
        case ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_BATTLESPEED:
            return(this.m_MainBoxItem.m_nItemNum);

        case ItemBoxContinue_Dlg.SHOW_TYPE.ITEM_TICKET:
        {
            int value  = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_CARD_MULTIPLE_OPEN);
            int result = value;
            if (this.m_MainBoxItem.m_nItemNum < value)
            {
                result = this.m_MainBoxItem.m_nItemNum;
            }
            return(result);
        }

        default:
            return(1);
        }
    }
    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);
    }
Пример #5
0
    public bool IsMythStart()
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return(false);
        }
        int level = kMyCharInfo.GetLevel();
        int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_MYTHRAID_LIMITLEVEL);

        if (level < value)
        {
            string empty          = string.Empty;
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("129");

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

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return(false);
        }
        return(true);
    }
Пример #6
0
    private void SetItemTicket()
    {
        int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_CARD_MULTIPLE_OPEN);

        this.m_MaxCount = (float)value;
        if (this.m_MainBoxItem.m_nItemNum < value)
        {
            this.m_MaxCount = (float)this.m_MainBoxItem.m_nItemNum;
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        int num = 100 - readySolList.GetCount();

        if (num <= 0)
        {
            this.Close();
        }
        if ((float)num < this.m_MaxCount)
        {
            this.m_MaxCount = (float)num;
        }
        this.m_nItemOpenCount = (int)this.m_MaxCount;
        this.SetOpenItemNum(this.m_nItemOpenCount);
        this.m_btAllUse.data = this.m_MainBoxItem;
    }
Пример #7
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);
    }
Пример #8
0
    private void Click_BabelTower(IUIObject Obj)
    {
        this.HideTouch(false);
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        int level = kMyCharInfo.GetLevel();
        int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABELTOWER_LIMITLEVEL);

        if (level < value)
        {
            string empty          = string.Empty;
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("129");

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

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (!NrTSingleton <NkClientLogic> .Instance.ShowDownLoadUI(0, 0))
        {
            return;
        }
        if (kMyCharInfo.m_kFriendInfo.GetFriendCount() > 0 && kMyCharInfo.m_kFriendInfo.GetFriendsBaBelDataCount() == 0)
        {
            GS_FRIENDS_BABELTOWER_CLEARINFO_REQ obj = new GS_FRIENDS_BABELTOWER_CLEARINFO_REQ();
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_FRIENDS_BABELTOWER_CLEARINFO_REQ, obj);
        }
        int value2 = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABEL_HARD_LEVEL);

        if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.BABELTOWERMAIN_DLG))
        {
            if (level < value2)
            {
                DirectionDLG directionDLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_DIRECTION) as DirectionDLG;

                if (directionDLG != null)
                {
                    directionDLG.ShowDirection(DirectionDLG.eDIRECTIONTYPE.eDIRECTION_BABEL, 1);
                }
                this.Close();
            }
            else
            {
                NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.BABELTOWER_MODESELECT_DLG);
            }
        }
        else
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.BABELTOWERMAIN_DLG);
        }
    }
Пример #9
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);
    }
Пример #10
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);
    }
Пример #11
0
    public void Set_GuildButtons()
    {
        base.SetShowLayer(4, false);
        base.SetShowLayer(5, false);
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        int  level = kMyCharInfo.GetLevel();
        int  value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_MYTHRAID_LIMITLEVEL);
        bool flag  = 0L >= NrTSingleton <NewGuildManager> .Instance.GetGuildID();

        bool flag2 = NrTSingleton <ContentsLimitManager> .Instance.IsMineLimit();

        bool bLock = flag || level < value || flag2;

        this.Set_LockButtons(GuildCollect_DLG.eGUILD_LAYER_TYPE.MINE_LOCK, bLock, flag2, flag, value);
        flag2 = !NrTSingleton <ContentsLimitManager> .Instance.IsGuildBoss();

        bool bLock2 = flag || flag2;

        this.Set_LockButtons(GuildCollect_DLG.eGUILD_LAYER_TYPE.GUILDBOSS_LOCK, bLock2, flag2, flag, level);
    }
Пример #12
0
    public void OnAgree2(IUIObject obj)
    {
        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        if (msgBoxUI == null)
        {
            return;
        }
        string empty = string.Empty;
        int    num   = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PROTECT_TIME_BUY2) / 60;
        int    value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PROTECT_TIME_PRICE2);

        if (value > NkUserInventory.GetInstance().Get_First_ItemCnt(70000))
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("273"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        byte b = 1;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("151"),
            "timestring",
            num.ToString(),
            "num",
            value.ToString()
        });

        string textFromMessageBox = NrTSingleton <NrTextMgr> .Instance.GetTextFromMessageBox("150");

        msgBoxUI.SetMsg(new YesDelegate(this.MsgBoxOKAgree), b, textFromMessageBox, empty, eMsgType.MB_OK_CANCEL, 2);
    }
Пример #13
0
    private void Click_MythRaid(IUIObject Obj)
    {
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo != null)
        {
            int value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_MYTHRAID_LIMITLEVEL);
            if (myCharInfo.GetLevel() < value)
            {
                string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("908");

                if (string.IsNullOrEmpty(textFromNotify))
                {
                    return;
                }
                Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
        }
        DirectionDLG directionDLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.DLG_DIRECTION) as DirectionDLG;

        if (directionDLG != null)
        {
            directionDLG.ShowDirection(DirectionDLG.eDIRECTIONTYPE.eDIRECTION_MYTHRAID, 0);
        }
    }
Пример #14
0
        private void InitMoneyNum()
        {
            int  value  = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_COSTUME_PRICE_ITEM_UNIQUE_1);
            int  value2 = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_COSTUME_PRICE_ITEM_UNIQUE_2);
            ITEM item   = NkUserInventory.instance.GetItem(value);

            if (item != null)
            {
                this._owner._variables._lbSoulGem.Text = string.Format("{0:##,##0}", item.m_nItemNum);
            }
            else
            {
                this._owner._variables._lbSoulGem.Text = "0";
            }
            ITEM item2 = NkUserInventory.instance.GetItem(value2);

            if (item2 != null)
            {
                this._owner._variables._lbMythElixir.Text = string.Format("{0:##,##0}", item2.m_nItemNum);
            }
            else
            {
                this._owner._variables._lbMythElixir.Text = "0";
            }
        }
Пример #15
0
    public void On_ClickOK(IUIObject a_cObject)
    {
        if (this.m_TextField_NameInput.Text.Length <= 0)
        {
            return;
        }
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        if (this.m_TextField_NameInput.Text == nrCharUser.GetCharName())
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("51"), SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
            return;
        }
        if (COMMON_CONSTANT_Manager.GetInstance() == null)
        {
            TsLog.LogWarning("!!!!!!!!!!!!!!!!!!!!! NOT Error Common_Constant", new object[0]);
            return;
        }
        SupporterDlg supporterDlg = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.SUPPORTER_DLG) as SupporterDlg;

        if (supporterDlg != null)
        {
            string charName = supporterDlg.GetCharName();
            if (charName != string.Empty)
            {
                WS_SUPPORTER_ADD_REQ wS_SUPPORTER_ADD_REQ = new WS_SUPPORTER_ADD_REQ();
                TKString.StringChar(this.m_TextField_NameInput.Text, ref wS_SUPPORTER_ADD_REQ.szCharName_Target);
                SendPacket.GetInstance().SendObject(16777287, wS_SUPPORTER_ADD_REQ);
            }
        }
    }
Пример #16
0
    private void Set_AdventureButtons()
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        if (kMyCharInfo == null)
        {
            return;
        }
        bool flag  = false;
        int  level = kMyCharInfo.GetLevel();
        int  value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BABELTOWER_LIMITLEVEL);
        bool flag2 = Launcher.Instance.IsPatchLevelMax();

        if (flag || level < value || !flag2)
        {
            this.Set_LockButtons(AdventureCollect_DLG.eADVENTURE_LAYER_TYPE.BABELTOWER_LOCK, flag, value, flag2);
        }
        value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_HUNT_LIMITLEVEL);
        flag  = NrTSingleton <ContentsLimitManager> .Instance.IsBountyHunt();

        if (flag || level < value || !flag2)
        {
            this.Set_LockButtons(AdventureCollect_DLG.eADVENTURE_LAYER_TYPE.HUNT_LOCK, flag, value, flag2);
        }
        value = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_DAILYDUNGEON_LIMITLEVEL);
        flag  = NrTSingleton <ContentsLimitManager> .Instance.IsDailyDungeonLimit();

        if (flag || level < value || !flag2)
        {
            this.Set_LockButtons(AdventureCollect_DLG.eADVENTURE_LAYER_TYPE.DAILYDUNGEON_LOCK, flag, value, flag2);
        }
    }
Пример #17
0
    public void SetData()
    {
        short num = (short)COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BOUNTY_REQUIRE);
        byte  b   = (byte)COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_BOUNTY_REQUIRE_RANK);
        byte  babelSubFloorRankInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetBabelSubFloorRankInfo(num, 4, 1);

        if (b <= babelSubFloorRankInfo)
        {
            base.ShowLayer(2);
            short num2 = NrTSingleton <BountyHuntManager> .Instance.GetPage(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.BountyHuntUnique);

            if (num2 < 1)
            {
                num2 = 1;
            }
            this.ShowEpisod(num2);
        }
        else
        {
            base.ShowLayer(1);
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2323"),
                "floor",
                num,
                "rank",
                BATTLE_DEFINE.RANK_STRING[(int)b]
            });

            this.m_lbBaloonText.SetText(empty);
        }
    }
Пример #18
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));
    }
Пример #19
0
    public void OnClickWillCharge(IUIObject obj)
    {
        long num = (long)COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_CHARGE_ACTIVITY_MAX);

        if (this.m_nCurrentActivity >= num)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("135"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.WILLCHARGE_DLG);
    }
Пример #20
0
    public long MaxResetCount()
    {
        long         num        = (long)COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_DAILYDUNGEON_LIMIT);
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_VIP_EXP);
        byte levelExp    = NrTSingleton <NrTableVipManager> .Instance.GetLevelExp((long)((int)charSubData));

        byte dailyDungeonResetByVipLevel = NrTSingleton <NrTableVipManager> .Instance.GetDailyDungeonResetByVipLevel(levelExp);

        return(num + (long)dailyDungeonResetByVipLevel);
    }
Пример #21
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);
            }
        }
    }
Пример #22
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);
    }
Пример #23
0
    public override string GetGameGuideText()
    {
        long   num             = (long)COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_AGREE_GOLD);
        string empty           = string.Empty;
        string textFromToolTip = NrTSingleton <NrTextMgr> .Instance.GetTextFromToolTip(this.m_strTalkKey);

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            textFromToolTip,
            "gold",
            ANNUALIZED.Convert(num)
        });

        return(empty);
    }
Пример #24
0
    public bool IsWillCharge()
    {
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsWillSpend())
        {
            return(false);
        }
        long num = (long)COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_CHARGE_ACTIVITY_MAX);

        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_nActivityPoint >= num)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("135"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return(false);
        }
        return(true);
    }
Пример #25
0
    public long GetReceiveGold(int nCharLevel, long nPastTime)
    {
        PLUNDER_SUPPORT_GOLD pLUNDER_SUPPORT_GOLD = this.Get_Value(nCharLevel);

        if (pLUNDER_SUPPORT_GOLD == null)
        {
            return(0L);
        }
        long nSupportGold = pLUNDER_SUPPORT_GOLD.m_nSupportGold;
        long nMaxGold     = pLUNDER_SUPPORT_GOLD.m_nMaxGold;
        int  value        = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_SUPPORTTIME);
        int  num          = (int)(nPastTime / 60L / (long)value);
        long val          = (long)num * nSupportGold;

        return(Math.Min(val, nMaxGold));
    }
Пример #26
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);
    }
Пример #27
0
    private void BattleMatch(IUIObject obj)
    {
        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 = COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_INFIBATTLE_LEVEL);
            if (myCharInfo.GetLevel() < value)
            {
                string empty = string.Empty;
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("129"),
                    "level",
                    value
                });

                Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
                return;
            }
            long num = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_INFIBATTLECOUNT);
            if (num < 0L)
            {
                num = 0L;
            }
            if (num > 0L)
            {
                TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "REMIT", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
                SoldierBatch.SOLDIER_BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_INFIBATTLE;
                FacadeHandler.PushStage(Scene.Type.SOLDIER_BATCH);
            }
            else
            {
                Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("684"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            }
        }
    }
    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);
    }
Пример #29
0
    public void OnPlunderStart(IUIObject obj)
    {
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_PLUNDER_DELAYTIME);
        long curTime     = PublicMethod.GetCurTime();
        long num         = charSubData - curTime;

        if (num > 0L)
        {
            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("136"),
                "timestring",
                PublicMethod.ConvertTime(num)
            });

            Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
            return;
        }
        if (myCharInfo != null)
        {
            int  level = myCharInfo.GetLevel();
            long num2;
            if (level > 50)
            {
                num2 = (long)(level * (level - COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_MATCHGOLD2)));
            }
            else
            {
                num2 = (long)(level * COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_PLUNDER_MATCHGOLD));
            }
            if (num2 > myCharInfo.m_Money)
            {
                string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89");

                Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
                return;
            }
        }
        TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "PLUNDER", "REMIT", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        SoldierBatch.SOLDIER_BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_PLUNDER;
        FacadeHandler.PushStage(Scene.Type.SOLDIER_BATCH);
    }
Пример #30
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);
        }
    }