コード例 #1
0
    protected override void OnClickReincarnate(IUIObject obj)
    {
        if (obj == null)
        {
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo != null)
        {
            long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_LEGENDMAKETIME);
            long curTime     = PublicMethod.GetCurTime();
            if (curTime < charSubData)
            {
                Myth_Evolution_Time_DLG myth_Evolution_Time_DLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MYTH_EVOLUTION_TIME_DLG) as Myth_Evolution_Time_DLG;

                if (myth_Evolution_Time_DLG != null)
                {
                    myth_Evolution_Time_DLG.InitSet(MYTH_TYPE.MYTHTYPE_LEGEND, this.m_CharKind_Legendinfo.i32Element_LegendCharkind, 0L);
                }
                return;
            }
        }
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1706");

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

        MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI;

        msgBoxUI.SetMsg(new YesDelegate(this.OnReincarnateOK), null, textFromInterface, textFromMessageBox, eMsgType.MB_OK_CANCEL, 2);
        NrTSingleton <EventConditionHandler> .Instance.MythEvolutionInfoMsgBox.OnTrigger();

        this.HideTouch(false);
    }
コード例 #2
0
    public void UpdateTime()
    {
        for (int i = 0; i < this.m_nlbNPCList.Count; i++)
        {
            UIListItemContainer item = this.m_nlbNPCList.GetItem(i);
            if (!(item == null))
            {
                if (item.Data != null)
                {
                    AGIT_NPC_SUB_DATA aGIT_NPC_SUB_DATA = item.Data as AGIT_NPC_SUB_DATA;
                    if (aGIT_NPC_SUB_DATA != null)
                    {
                        Label label = item.GetElement(5) as Label;
                        if (label != null)
                        {
                            long i64Time = aGIT_NPC_SUB_DATA.i64NPCEndTime - PublicMethod.GetCurTime();
                            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strTime, new object[]
                            {
                                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1763"),
                                "timestring",
                                this.GetTimeToString(i64Time)
                            });

                            label.SetText(this.m_strTime);
                        }
                    }
                }
            }
        }
    }
コード例 #3
0
    public int GetCurrWeekofDay()
    {
        DateTime dueDate = PublicMethod.GetDueDate(PublicMethod.GetCurTime());

        if (dueDate.Hour <= 5 && dueDate.Minute < 59)
        {
            switch (dueDate.DayOfWeek)
            {
            case DayOfWeek.Sunday:
                return(6);

            case DayOfWeek.Monday:
                return(0);

            case DayOfWeek.Tuesday:
                return(1);

            case DayOfWeek.Wednesday:
                return(2);

            case DayOfWeek.Thursday:
                return(3);

            case DayOfWeek.Friday:
                return(4);

            case DayOfWeek.Saturday:
                return(5);
            }
        }
        return((int)dueDate.DayOfWeek);
    }
コード例 #4
0
    private void ClickTabControl(IUIObject obj)
    {
        Toggle toggle = obj as Toggle;

        if (null == toggle)
        {
            return;
        }
        if (!toggle.Value)
        {
            return;
        }
        long curTime = PublicMethod.GetCurTime();

        if (curTime > this.m_GetRankTime + 1L)
        {
            if (toggle.GetToggleState())
            {
                this.m_ShowType = (InfiBattleDefine.eINFIBATTLE_RANKMODE)((int)toggle.data);
                this.SelectTab();
            }
        }
        else
        {
            toggle.Value = false;
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("270"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE);
        }
    }
コード例 #5
0
    public string GetLeftTime(long time)
    {
        string empty = string.Empty;
        long   num   = time - PublicMethod.GetCurTime();

        if (num >= 0L)
        {
            long   num2 = num / 60L / 60L % 24L;
            long   num3 = num / 60L % 60L;
            long   num4 = num % 60L;
            string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1527");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                textFromInterface,
                "hour",
                num2,
                "min",
                num3,
                "sec",
                num4
            });
        }
        return(empty);
    }
コード例 #6
0
 public void SelectTab()
 {
     InfiBattleDefine.eINFIBATTLE_RANKMODE showType = this.m_ShowType;
     if (showType != InfiBattleDefine.eINFIBATTLE_RANKMODE.eINFIBATTLE_RANKMODE_LASTWEEK)
     {
         this.GetRank((byte)this.m_ShowType - 1, 1);
     }
     else
     {
         for (int i = 0; i < 3; i++)
         {
             if (i == 0)
             {
                 this.m_tgRank[i].SetToggleState(true);
             }
             else
             {
                 this.m_tgRank[i].SetToggleState(false);
             }
         }
         GS_INFIBATTLE_REWARDINFO_REQ gS_INFIBATTLE_REWARDINFO_REQ = new GS_INFIBATTLE_REWARDINFO_REQ();
         gS_INFIBATTLE_REWARDINFO_REQ.i64PersonID = this.m_pkMyCharInfo.m_PersonID;
         SendPacket.GetInstance().SendObject(2011, gS_INFIBATTLE_REWARDINFO_REQ);
         this.m_GetRankTime = PublicMethod.GetCurTime();
     }
 }
コード例 #7
0
    public void BtnClickBabelTower(IUIObject obj)
    {
        if (this.dlgOpenTime + 2L > PublicMethod.GetCurTime())
        {
            return;
        }
        this.Close();
        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 (kMyCharInfo.m_kFriendInfo.GetFriendCount() > 0 && kMyCharInfo.m_kFriendInfo.GetFriendsBaBelDataCount() == 0)
        {
            GS_FRIENDS_BABELTOWER_CLEARINFO_REQ obj2 = new GS_FRIENDS_BABELTOWER_CLEARINFO_REQ();
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_FRIENDS_BABELTOWER_CLEARINFO_REQ, obj2);
        }
        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);
                }
            }
            else
            {
                NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.BABELTOWER_MODESELECT_DLG);
            }
        }
        else
        {
            NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.BABELTOWERMAIN_DLG);
        }
    }
コード例 #8
0
    public void GetRank(byte bType, int i32StartRank)
    {
        this.m_btPractice.Visible = true;
        this.m_btPractice.SetEnabled(false);
        GS_INFIBATTLE_RANK_REQ gS_INFIBATTLE_RANK_REQ = new GS_INFIBATTLE_RANK_REQ();

        gS_INFIBATTLE_RANK_REQ.i8Type       = bType;
        gS_INFIBATTLE_RANK_REQ.i32StartRank = i32StartRank;
        gS_INFIBATTLE_RANK_REQ.i32RankCount = 10;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_INFIBATTLE_RANK_REQ, gS_INFIBATTLE_RANK_REQ);
        this.m_GetRankTime = PublicMethod.GetCurTime();
    }
コード例 #9
0
    public override bool CheckGameGuide()
    {
        if (!NrTSingleton <ContentsLimitManager> .Instance.IsHeroBattle())
        {
            return(false);
        }
        if (this.m_eCheck == GameGuideCheck.LOGIN)
        {
            NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

            if (myCharInfo == null)
            {
                return(false);
            }
            int  level       = myCharInfo.GetLevel();
            long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_RECEIVE_SUPPORT_GOLD_TIME);
            if (charSubData <= 0L)
            {
                return(false);
            }
            long curTime   = PublicMethod.GetCurTime();
            long nPastTime = curTime - charSubData;
            this.m_nReceiveGold = NrTSingleton <NrTable_SupportGold_Manager> .Instance.GetReceiveGold(level, nPastTime);

            return(this.m_nReceiveGold > 0L);
        }
        else
        {
            if (this.m_eCheck != GameGuideCheck.CYCLECAL || Time.realtimeSinceStartup - this.m_nCheckTime <= this.m_nDelayTime)
            {
                return(false);
            }
            NrMyCharInfo myCharInfo2 = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

            if (myCharInfo2 == null)
            {
                return(false);
            }
            int  level2       = myCharInfo2.GetLevel();
            long charSubData2 = myCharInfo2.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_RECEIVE_SUPPORT_GOLD_TIME);
            long curTime2     = PublicMethod.GetCurTime();
            if (charSubData2 <= 0L)
            {
                return(false);
            }
            long nPastTime2 = curTime2 - charSubData2;
            this.m_nReceiveGold = NrTSingleton <NrTable_SupportGold_Manager> .Instance.GetReceiveGold(level2, nPastTime2);

            return(this.m_nReceiveGold > 0L);
        }
    }
コード例 #10
0
    public void On_ClickSetPos(IUIObject a_cObject)
    {
        if (this.m_i16TreasureReward != -1)
        {
            DateTime dueDate = PublicMethod.GetDueDate(PublicMethod.GetCurTime());
            GS_TREASUREBOX_SHARING_REQ gS_TREASUREBOX_SHARING_REQ = new GS_TREASUREBOX_SHARING_REQ();
            gS_TREASUREBOX_SHARING_REQ.i32Day            = dueDate.Day;
            gS_TREASUREBOX_SHARING_REQ.i16TreasureUnique = this.m_i16TreasureReward;
            SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_TREASUREBOX_SHARING_REQ, gS_TREASUREBOX_SHARING_REQ);
            string textFromNotify = NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("663");

            Main_UI_SystemMessage.ADDMessage(textFromNotify, SYSTEM_MESSAGE_TYPE.NORMAL_MESSAGE);
        }
    }
コード例 #11
0
    public override void SetComponent()
    {
        this.m_dtEffect = (base.GetControl("DrawTexture_Effect") as DrawTexture);
        this.m_lbFloor  = (base.GetControl("NewListBox_floor") as NewListBox);
        this.m_lbFloor.AddRightMouseDelegate(new EZValueChangedDelegate(this.BtClickFloor));
        this.m_lbFloor.Reserve     = false;
        this.m_lbFloor.SelectStyle = "Com_B_Transparent";
        this.m_lbFloor.AutoScroll  = true;
        this.upButton   = (base.GetControl("Button_slideup") as Button);
        this.downButton = (base.GetControl("Button_slidedown") as Button);
        BoxCollider boxCollider = (BoxCollider)this.upButton.gameObject.GetComponent(typeof(BoxCollider));

        if (boxCollider != null)
        {
            boxCollider.size = new Vector3(0f, 0f, 0f);
        }
        boxCollider = (BoxCollider)this.downButton.gameObject.GetComponent(typeof(BoxCollider));
        if (boxCollider != null)
        {
            boxCollider.size = new Vector3(0f, 0f, 0f);
        }
        this.up   = (base.GetControl("DrawTexture_SlideBG01") as DrawTexture);
        this.down = (base.GetControl("DrawTexture_SlideBG02") as DrawTexture);
        this.downButton.SetLocation(this.downButton.GetLocation().x, this.down.GetLocationY() + 36f, this.downButton.GetLocation().z - 1.1f);
        this.upButton.Visible = false;
        this.up.Visible       = false;
        this.m_btClose        = (base.GetControl("Button_close") as Button);
        this.m_btClose.AddValueChangedDelegate(new EZValueChangedDelegate(this.BtClickClose));
        this.m_btDlgClose = (base.GetControl("CloseButton") as Button);
        this.m_btDlgClose.AddValueChangedDelegate(new EZValueChangedDelegate(this.BtClickClose));
        this.m_dtNotice         = (base.GetControl("DT_Notice") as DrawTexture);
        this.m_dtNotice.Visible = false;
        this.m_bReward          = (base.GetControl("Button_reward") as Button);
        this.m_bReward.AddValueChangedDelegate(new EZValueChangedDelegate(this.BtnClickReward));
        this.m_bBabelTower = (base.GetControl("Button_BabelTower") as Button);
        this.m_bBabelTower.AddValueChangedDelegate(new EZValueChangedDelegate(this.BtnClickBabelTower));
        base.SetScreenCenter();
        UIDataManager.MuteSound(true);
        TsAudioManager.Instance.AudioContainer.RequestAudioClip("BGM", "CHAOSTOWER", "START", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
        NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_BABEL_MAIN", this.m_dtEffect, this.m_dtEffect.GetSize());

        NrTSingleton <NewGuildManager> .Instance.Send_GS_NEWGUILD_INFO_REQ(0);

        base.SetLayerZ(1, -3f);
        base.SetLayerZ(2, -4f);
        base.SetLayerZ(3, -5f);
        base.SetLayerZ(4, -6f);
        this.m_btDlgClose.SetLocationZ(this.m_btDlgClose.GetLocation().z - 6.5f);
        this.dlgOpenTime = PublicMethod.GetCurTime();
    }
コード例 #12
0
    private bool SetButtonLegendTime()
    {
        bool         result     = true;
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo != null)
        {
            long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_LEGENDMAKETIME);
            long curTime     = PublicMethod.GetCurTime();
            if (curTime < charSubData)
            {
                result = false;
            }
        }
        return(result);
    }
コード例 #13
0
    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);
    }
コード例 #14
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);
            }
        }
    }
コード例 #15
0
    public void UpdateTime()
    {
        AGIT_NPC_SUB_DATA agitNPCSubDataFromNPCType = NrTSingleton <NewGuildManager> .Instance.GetAgitNPCSubDataFromNPCType(1);

        if (agitNPCSubDataFromNPCType != null)
        {
            long i64Time = agitNPCSubDataFromNPCType.i64NPCEndTime - PublicMethod.GetCurTime();
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strTime, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1763"),
                "timestring",
                this.GetTimeToString(i64Time)
            });

            this.m_lbTime.SetText(this.m_strTime);
        }
    }
コード例 #16
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);
    }
コード例 #17
0
ファイル: VipInfoDlg.cs プロジェクト: parikharsh/GLOH_Source
 public override void Update()
 {
     if (this.m_bVipLevelUp)
     {
         if (this.m_VipLevelUpdateTime == 0L)
         {
             this.m_VipLevelUpdateTime = PublicMethod.GetCurTime();
         }
         else if (PublicMethod.GetCurTime() > this.m_VipLevelUpdateTime + 5L)
         {
             GameObject obj = GameObject.Find("fx_firework");
             UnityEngine.Object.Destroy(obj);
             this.m_VipLevelUpdateTime = 0L;
             this.m_bVipLevelUp        = false;
             return;
         }
     }
 }
コード例 #18
0
    public string GetTimeToString(long i64Time)
    {
        long num = i64Time - PublicMethod.GetCurTime();

        this.m_strTemp_1 = string.Empty;
        if (i64Time > 0L)
        {
            long totalHourFromSec = PublicMethod.GetTotalHourFromSec(num);
            long minuteFromSec    = PublicMethod.GetMinuteFromSec(num);
            long num2             = num % 60L;
            this.m_strTemp_1 = string.Format("{0}:{1}:{2}", totalHourFromSec.ToString("00"), minuteFromSec.ToString("00"), num2.ToString("00"));
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1763"),
                "timestring",
                this.m_strTemp_1
            });
        }
        return(this.m_strTemp_1);
    }
コード例 #19
0
    public bool GetBountyInfoDataTime(short iBountyHuntUnique)
    {
        BountyInfoData bountyInfoDataFromUnique = this.GetBountyInfoDataFromUnique(iBountyHuntUnique);

        if (bountyInfoDataFromUnique == null)
        {
            return(false);
        }
        DateTime dueDate = PublicMethod.GetDueDate(PublicMethod.GetCurTime());

        if ((short)dueDate.DayOfWeek == bountyInfoDataFromUnique.i16Week)
        {
            return(dueDate.Hour >= (int)bountyInfoDataFromUnique.i16Hour);
        }
        short num = bountyInfoDataFromUnique.i16Week + 1;

        if (num > 6)
        {
            num = 0;
        }
        return((short)dueDate.DayOfWeek == num && dueDate.Hour < (int)bountyInfoDataFromUnique.i16Hour);
    }
コード例 #20
0
    public string GetExpeditionState(EXPEDITION_CURRENT_STATE_INFO info)
    {
        string result = string.Empty;

        if (info.i64Time - PublicMethod.GetCurTime() <= 0L)
        {
            if (info.ui8ExpeditionState == 1)
            {
                info.ui8ExpeditionState = 2;
            }
            info.i64CheckBattleTime = 0L;
        }
        if (info.i64Time == info.i64CheckBattleTime)
        {
            result = string.Format("{0} {1}", this.GetExpeditionTextFromState(info), this.GetLeftTime(info.i64Time));
        }
        else
        {
            result = this.GetExpeditionTextFromState(info);
        }
        return(result);
    }
コード例 #21
0
    public virtual bool GetTimeToString()
    {
        bool         result     = false;
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo != null)
        {
            long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_LEGENDMAKETIME);
            long curTime     = PublicMethod.GetCurTime();
            if (curTime < charSubData)
            {
                base.SetShowLayer(1, true);
                string empty           = string.Empty;
                long   iSec            = charSubData - curTime;
                long   totalDayFromSec = PublicMethod.GetTotalDayFromSec(iSec);
                long   hourFromSec     = PublicMethod.GetHourFromSec(iSec);
                long   minuteFromSec   = PublicMethod.GetMinuteFromSec(iSec);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2858"),
                    "day",
                    totalDayFromSec,
                    "hour",
                    hourFromSec,
                    "min",
                    minuteFromSec
                });

                this.m_Label_LegendTime.SetText(empty);
            }
            else
            {
                base.SetShowLayer(1, false);
                result = true;
            }
        }
        return(result);
    }
コード例 #22
0
    private static bool TreasureRewardTimeCheck(string strText, ref int iDay)
    {
        string   value   = string.Empty;
        int      num     = strText.IndexOf("(");
        int      num2    = strText.IndexOf(".");
        int      num3    = strText.IndexOf(")");
        DateTime dueDate = PublicMethod.GetDueDate(PublicMethod.GetCurTime());

        if (num != -1 && num2 != -1 && num3 != -1)
        {
            value = strText.Substring(num + 1, num2 - (num + 1));
            int num4 = (int)Convert.ToInt16(value);
            value = strText.Substring(num2 + 1, num3 - (num2 + 1));
            iDay  = (int)Convert.ToInt16(value);
            return(dueDate.Day == iDay && num4 == dueDate.Month);
        }
        if (100 <= NrTSingleton <NkCharManager> .Instance.m_kCharAccountInfo.m_nMasterLevel)
        {
            iDay = dueDate.Day;
            return(true);
        }
        return(false);
    }
コード例 #23
0
    private void OnClickMythEvolution_OK(IUIObject obj)
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo(this.m_i64SolID);

        if (soldierInfo == null)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("508"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo != null)
        {
            long charSubData = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_MYTH_EVOLUTION_TIME);
            long curTime     = PublicMethod.GetCurTime();
            if (curTime > charSubData)
            {
                MYTH_EVOLUTION myth_EvolutionSeason = NrTSingleton <NrTableMyth_EvolutionManager> .Instance.GetMyth_EvolutionSeason((byte)(soldierInfo.GetSeason() + 1));

                if (myth_EvolutionSeason != null)
                {
                    string empty = string.Empty;
                    if (NkUserInventory.GetInstance().Get_First_ItemCnt(myth_EvolutionSeason.m_i32SpendItemUnique1) < myth_EvolutionSeason.m_i32SpendItemNum1)
                    {
                        string itemNameByItemUnique = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(myth_EvolutionSeason.m_i32SpendItemUnique1);

                        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                        {
                            NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("780"),
                            "target",
                            itemNameByItemUnique
                        });

                        Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
                        return;
                    }
                    if (NkUserInventory.GetInstance().Get_First_ItemCnt(myth_EvolutionSeason.m_i32SpendItemUnique2) < myth_EvolutionSeason.m_i32SpendItemNum2)
                    {
                        string itemNameByItemUnique2 = NrTSingleton <ItemManager> .Instance.GetItemNameByItemUnique(myth_EvolutionSeason.m_i32SpendItemUnique2);

                        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                        {
                            NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("780"),
                            "target",
                            itemNameByItemUnique2
                        });

                        Main_UI_SystemMessage.ADDMessage(empty, SYSTEM_MESSAGE_TYPE.NORMAL_SYSTEM_MESSAGE);
                        return;
                    }
                    if (soldierInfo.GetGrade() >= 6 && soldierInfo.GetGrade() < 10)
                    {
                        GS_MYTH_EVOLUTION_SOL_REQ gS_MYTH_EVOLUTION_SOL_REQ = new GS_MYTH_EVOLUTION_SOL_REQ();
                        gS_MYTH_EVOLUTION_SOL_REQ.i64SolID = this.m_i64SolID;
                        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_MYTH_EVOLUTION_SOL_REQ, gS_MYTH_EVOLUTION_SOL_REQ);
                        this.Close();
                    }
                }
            }
        }
    }
コード例 #24
0
    public void MakeNPCItem(AGIT_NPC_SUB_DATA NPCSubData)
    {
        if (NPCSubData == null)
        {
            return;
        }
        AgitNPCData agitNPCData = NrTSingleton <NrBaseTableManager> .Instance.GetAgitNPCData(NPCSubData.ui8NPCType.ToString());

        if (agitNPCData == null)
        {
            return;
        }
        NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode(agitNPCData.strCharCode);

        if (charKindInfoFromCode == null)
        {
            return;
        }
        NkListSolInfo nkListSolInfo = new NkListSolInfo();

        nkListSolInfo.SolCharKind = charKindInfoFromCode.GetCharKind();
        nkListSolInfo.SolGrade    = -1;
        nkListSolInfo.SolLevel    = NPCSubData.i16NPCLevel;
        NewListItem newListItem = new NewListItem(this.m_nlbNPCList.ColumnNum, true, string.Empty);

        newListItem.SetListItemData(1, nkListSolInfo, null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1435"),
            "charname",
            charKindInfoFromCode.GetName()
        });

        newListItem.SetListItemData(2, this.m_strText, null, null, null);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1031"),
            "count",
            NPCSubData.i16NPCLevel
        });

        newListItem.SetListItemData(3, this.m_strText, null, null, null);
        NewGuildMember memberInfoFromPersonID = NrTSingleton <NewGuildManager> .Instance.GetMemberInfoFromPersonID(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID);

        if (memberInfoFromPersonID == null)
        {
            return;
        }
        if (memberInfoFromPersonID.GetRank() >= NewGuildDefine.eNEWGUILD_MEMBER_RANK.eNEWGUILD_MEMBER_RANK_OFFICER)
        {
            newListItem.SetListItemData(4, string.Empty, NPCSubData, new EZValueChangedDelegate(this.ClickAgieDelNPC), null);
        }
        else
        {
            newListItem.SetListItemData(4, false);
        }
        long i64Time = NPCSubData.i64NPCEndTime - PublicMethod.GetCurTime();

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strTime, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1763"),
            "timestring",
            this.GetTimeToString(i64Time)
        });

        newListItem.SetListItemData(5, this.m_strTime, null, null, null);
        newListItem.Data = NPCSubData;
        this.m_nlbNPCList.Add(newListItem);
    }
コード例 #25
0
    public void InitSet(MYTH_TYPE e_MythType, int i32CharKind, long i64SolID)
    {
        this.m_MythType    = e_MythType;
        this.m_i32CharKind = i32CharKind;
        this.m_i64SolID    = i64SolID;
        string textureFromBundle = "ui/itemshop/itemshop_elixir01";

        this.m_DT_elixir.SetTextureFromBundle(textureFromBundle);
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo != null)
        {
            long num = 0L;
            if (this.m_MythType == MYTH_TYPE.MYTHTYPE_LEGEND)
            {
                num = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_LEGENDMAKETIME);
                base.SetShowLayer(1, true);
                base.SetShowLayer(2, false);
            }
            else if (this.m_MythType == MYTH_TYPE.MYTHTYPE_EVOLUTION)
            {
                num = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_MYTH_EVOLUTION_TIME);
                base.SetShowLayer(1, false);
                base.SetShowLayer(2, true);
            }
            long curTime = PublicMethod.GetCurTime();
            if (curTime > num)
            {
                base.CloseNow();
                return;
            }
            long iSec        = num - curTime;
            int  num2        = NkUserInventory.GetInstance().Get_First_ItemCnt(50317);
            long num3        = PublicMethod.GetTotalDayFromSec(iSec);
            long hourFromSec = PublicMethod.GetHourFromSec(iSec);
            if (this.m_MythType == MYTH_TYPE.MYTHTYPE_LEGEND)
            {
                base.SetShowLayer(1, true);
                base.SetShowLayer(2, false);
                if (hourFromSec > 0L)
                {
                    num3 += 1L;
                }
                if ((long)num2 < num3)
                {
                    this.m_MaxItemUseNum = num2;
                }
                else
                {
                    this.m_MaxItemUseNum = (int)num3;
                }
            }
            else if (this.m_MythType == MYTH_TYPE.MYTHTYPE_EVOLUTION)
            {
                num3 *= 2L;
                base.SetShowLayer(1, false);
                base.SetShowLayer(2, true);
                if (hourFromSec > 0L)
                {
                    if (hourFromSec > 12L)
                    {
                        num3 += 2L;
                    }
                    else
                    {
                        num3 += 1L;
                    }
                }
                this.m_MaxItemUseNum = (int)num3;
            }
            this.SetItemText();
        }
    }
コード例 #26
0
    public static bool CurrentLocationName(NewGuildMember GuildMember, ref string strName, ref string ColorNum)
    {
        bool   result            = false;
        short  num               = GuildMember.GetChannelID();
        int    mapUnique         = GuildMember.GetMapUnique();
        string mapNameFromUnique = NrTSingleton <MapManager> .Instance.GetMapNameFromUnique(mapUnique);

        if (0 >= num || 0 >= mapUnique || mapNameFromUnique == string.Empty)
        {
            string text = string.Empty;
            if (0L < GuildMember.GetLogOffTime())
            {
                long iSec            = PublicMethod.GetCurTime() - GuildMember.GetLogOffTime();
                long totalDayFromSec = PublicMethod.GetTotalDayFromSec(iSec);
                long hourFromSec     = PublicMethod.GetHourFromSec(iSec);
                long minuteFromSec   = PublicMethod.GetMinuteFromSec(iSec);
                if (totalDayFromSec > 0L)
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2173");

                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref strName, new object[]
                    {
                        text,
                        "count",
                        totalDayFromSec
                    });
                }
                else if (hourFromSec > 0L)
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2172");

                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref strName, new object[]
                    {
                        text,
                        "count",
                        hourFromSec
                    });
                }
                else
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2171");

                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref strName, new object[]
                    {
                        text,
                        "count",
                        minuteFromSec
                    });
                }
            }
            else
            {
                strName = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2421");
            }
            if (GuildMember.GetConnected())
            {
                GS_NEWGUILD_MEMBER_LOG_REQ gS_NEWGUILD_MEMBER_LOG_REQ = new GS_NEWGUILD_MEMBER_LOG_REQ();
                gS_NEWGUILD_MEMBER_LOG_REQ.i16ChannelID = num;
                gS_NEWGUILD_MEMBER_LOG_REQ.i32MapUnique = mapUnique;
                TKString.StringChar(mapNameFromUnique, ref gS_NEWGUILD_MEMBER_LOG_REQ.strMapName);
                SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_NEWGUILD_MEMBER_LOG_REQ, gS_NEWGUILD_MEMBER_LOG_REQ);
            }
        }
        else
        {
            string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1777");

            byte b = 200;
            num = (short)((byte)(num - (short)b));
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
            {
                textFromInterface,
                "count",
                num
            });

            strName  = string.Format("{0}({1})", mapNameFromUnique, textFromInterface);
            ColorNum = "1104";
            result   = true;
        }
        return(result);
    }
コード例 #27
0
    public override void Update()
    {
        int noticeCount = this.GetNoticeCount();

        if (0 < noticeCount)
        {
            if (this.count != noticeCount)
            {
                int num = noticeCount;
                this.menuNotice.Visible = true;
                this.menuNotice.Text    = num.ToString();
                this.count = num;
            }
        }
        else if (this.menuNotice.Visible)
        {
            this.menuNotice.Visible = false;
        }
        List <ITEM_MALL_ITEM> group = NrTSingleton <ItemMallItemManager> .Instance.GetGroup(50);

        if (group == null)
        {
            return;
        }
        bool flag = false;

        for (int i = 0; i < group.Count; i++)
        {
            ITEM_MALL_ITEM iTEM_MALL_ITEM = group[i];
            if (iTEM_MALL_ITEM != null)
            {
                ITEM_VOUCHER_DATA itemVoucherDataFromItemID = NrTSingleton <ItemMallItemManager> .Instance.GetItemVoucherDataFromItemID(iTEM_MALL_ITEM.m_Idx);

                if (itemVoucherDataFromItemID != null)
                {
                    eVOUCHER_TYPE ui8VoucherType    = (eVOUCHER_TYPE)itemVoucherDataFromItemID.ui8VoucherType;
                    long          voucherRemainTime = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetVoucherRemainTime(ui8VoucherType, itemVoucherDataFromItemID.i64ItemMallID);

                    if (voucherRemainTime > 0L && NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.IsUseVoucher(ui8VoucherType, itemVoucherDataFromItemID.i64ItemMallID))
                    {
                        flag = true;
                        break;
                    }
                }
            }
        }
        if (!flag)
        {
            NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;
            long         charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_FREETICKET_PREMINUM_TIME);
            if (PublicMethod.GetCurTime() > charSubData)
            {
                flag = true;
            }
            charSubData = kMyCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_FREETICKET_HEARTS_TIME);
            if (PublicMethod.GetCurTime() > charSubData)
            {
                flag = true;
            }
        }
        if (flag && this.btShopMenu.Visible)
        {
            this.ShopNotice.Visible = true;
        }
        else
        {
            this.ShopNotice.Visible = false;
        }
    }
コード例 #28
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;
    }
コード例 #29
0
    private void Update_TimeShopRemainTime()
    {
        if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
        {
            return;
        }
        this.m_i64RemainTime = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.NextRefreshTime - PublicMethod.GetCurTime();
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strRemainTime, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3302"),
            "timestring",
            NrTSingleton <NrTableTimeShopManager> .Instance.GetTimeToString(this.m_i64RemainTime)
        });

        this.m_lbTimeShopRemain.SetText(this.m_strRemainTime);
    }
コード例 #30
0
 private void Update_RemainTime()
 {
     if (NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo == null)
     {
         return;
     }
     this.m_i64RemainTime = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.NextRefreshTime - PublicMethod.GetCurTime();
     this.m_lbRemainTime.SetText(NrTSingleton <NrTableTimeShopManager> .Instance.GetTimeToString(this.m_i64RemainTime));
 }