Exemplo n.º 1
0
    public static string GetStrTimeFromSec(long _Sec)
    {
        long   hourFromSec   = PublicMethod.GetHourFromSec(_Sec);
        long   minuteFromSec = PublicMethod.GetMinuteFromSec(_Sec);
        long   time          = _Sec % 60L;
        string empty         = string.Empty;

        return(string.Format("{0} : {1} : {2}", CProgramUtil.GetTimeForm(hourFromSec), CProgramUtil.GetTimeForm(minuteFromSec), CProgramUtil.GetTimeForm(time)));
    }
Exemplo n.º 2
0
    public static string GetStrTotalFromSec(int _Sec)
    {
        string text              = PublicMethod.GetYearFromSec((long)_Sec).ToString();
        string text2             = PublicMethod.GetMonthFromSec((long)_Sec).ToString();
        string text3             = PublicMethod.GetDayFromSec((long)_Sec).ToString();
        string text4             = PublicMethod.GetHourFromSec((long)_Sec).ToString();
        string text5             = PublicMethod.GetMinuteFromSec((long)_Sec).ToString();
        string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1002");

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

        string textFromInterface3 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1004");

        string textFromInterface4 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1005");

        string textFromInterface5 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1006");

        string text6 = string.Empty;

        if (text != "0")
        {
            text6 = text6 + text + textFromInterface + string.Empty;
        }
        if (text2 != "0")
        {
            text6 = text6 + text2 + textFromInterface2 + " ";
        }
        if (text3 != "0")
        {
            text6 = text6 + text3 + textFromInterface3 + " ";
        }
        if (text4 != "0")
        {
            text6 = text6 + text4 + textFromInterface4 + " ";
        }
        if (text5 != "0")
        {
            text6 = text6 + text5 + textFromInterface5;
        }
        if (_Sec == 0)
        {
            text6 = "0" + textFromInterface5;
        }
        return(text6);
    }
Exemplo n.º 3
0
    public string GetTimeToString(long i64Time)
    {
        string empty = string.Empty;

        if (i64Time > 0L)
        {
            long totalDayFromSec = PublicMethod.GetTotalDayFromSec(i64Time);
            long hourFromSec     = PublicMethod.GetHourFromSec(i64Time);
            long minuteFromSec   = PublicMethod.GetMinuteFromSec(i64Time);
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2858"),
                "day",
                totalDayFromSec,
                "hour",
                hourFromSec,
                "min",
                minuteFromSec
            });
        }
        return(empty);
    }
    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);
    }
Exemplo n.º 5
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);
    }
Exemplo n.º 6
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();
        }
    }
Exemplo n.º 7
0
    private void SetItemText()
    {
        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);
            }
            else if (this.m_MythType == MYTH_TYPE.MYTHTYPE_EVOLUTION)
            {
                num = myCharInfo.GetCharSubData(eCHAR_SUBDATA.CHAR_SUBDATA_MYTH_EVOLUTION_TIME);
            }
            long num2 = num - PublicMethod.GetCurTime();
            if (num2 <= 0L)
            {
                base.CloseNow();
                return;
            }
            long   totalDayFromSec = PublicMethod.GetTotalDayFromSec(num2);
            long   hourFromSec     = PublicMethod.GetHourFromSec(num2);
            long   minuteFromSec   = PublicMethod.GetMinuteFromSec(num2);
            string empty           = string.Empty;
            if (this.m_MythType == MYTH_TYPE.MYTHTYPE_LEGEND)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3449"),
                    "day",
                    totalDayFromSec,
                    "hour",
                    hourFromSec,
                    "min",
                    minuteFromSec,
                    "count",
                    this.m_CurItemUseNum,
                    "minusday",
                    this.m_CurItemUseNum
                });

                this.m_LB_LegendEvolutionTime.SetText(empty);
            }
            else if (this.m_MythType == MYTH_TYPE.MYTHTYPE_EVOLUTION)
            {
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3450"),
                    "day",
                    totalDayFromSec,
                    "hour",
                    hourFromSec,
                    "min",
                    minuteFromSec,
                    "count",
                    this.m_CurItemUseNum,
                    "minusday",
                    (float)this.m_CurItemUseNum * 0.5f
                });

                this.m_LB_MythEvolutionTime.SetText(empty);
            }
            this.m_Label_Count.SetText(this.m_CurItemUseNum.ToString());
        }
    }
    public void SetBaseSol(long i64SolID)
    {
        this.m_i64BaseSolID = i64SolID;
        NkSoldierInfo soldierInfo = this.GetSoldierInfo(i64SolID);

        if (soldierInfo == null)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("508"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return;
        }
        this.SetEvolutionSkillImage(true);
        int    grade               = (int)soldierInfo.GetGrade();
        int    solgrade            = (int)(soldierInfo.GetGrade() + 4);
        string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(soldierInfo);

        this.m_DT_BaseSolimg.SetTexture(eCharImageType.LARGE, soldierInfo.GetCharKind(), grade, costumePortraitPath);
        this.m_DT_ResultSolimg.SetTexture(eCharImageType.LARGE, soldierInfo.GetCharKind(), solgrade, costumePortraitPath);
        short legendType = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(soldierInfo.GetCharKind(), grade);

        UIBaseInfoLoader solLargeGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(soldierInfo.GetCharKind(), grade);

        if (solLargeGradeImg != null)
        {
            this.m_DT_BaseSolRank.Visible = true;
            if (0 < legendType)
            {
                this.m_DT_BaseSolRank.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height);
            }
            this.m_DT_BaseSolRank.SetTexture(solLargeGradeImg);
            this.m_DT_ResultSolRank.Visible = false;
        }
        legendType = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(soldierInfo.GetCharKind(), solgrade);

        solLargeGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(soldierInfo.GetCharKind(), solgrade);

        if (solLargeGradeImg != null)
        {
            this.m_DT_ResultSolRank.Visible = true;
            if (0 < legendType)
            {
                this.m_DT_ResultSolRank.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height);
            }
            this.m_DT_ResultSolRank.SetTexture(solLargeGradeImg);
        }
        string text = string.Empty;

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("290"),
            "targetname",
            soldierInfo.GetName(),
            "count1",
            soldierInfo.GetLevel().ToString(),
            "count2",
            soldierInfo.GetSolMaxLevel().ToString()
        });

        this.m_LB_BaseSolName.SetText(text);
        this.m_LB_ResultSolName.SetText(text);
        int num = soldierInfo.GetSeason() + 1;

        if (num != 0)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3274"),
                "season",
                num
            });
        }
        this.m_Label_BaseSeason.SetText(text);
        this.m_Label_ResultSeason.SetText(text);
        MYTH_EVOLUTION myth_EvolutionSeason = NrTSingleton <NrTableMyth_EvolutionManager> .Instance.GetMyth_EvolutionSeason((byte)num);

        if (myth_EvolutionSeason != null)
        {
            this.m_Label_MythEvolution_Essence_Num2.SetText(ANNUALIZED.Convert(myth_EvolutionSeason.m_i32SpendItemNum1));
            this.m_Label_MythEvolution_DragonHeart_Num2.SetText(ANNUALIZED.Convert(myth_EvolutionSeason.m_i32SpendItemNum2));
            int charKindbyMythSkillUnique = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindbyMythSkillUnique(soldierInfo.GetCharKind(), 0);

            if (charKindbyMythSkillUnique > 0)
            {
                BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(charKindbyMythSkillUnique);

                if (battleSkillBase != null)
                {
                    text = battleSkillBase.m_waSkillName;
                    this.m_LB_MythSkillname1.SetText(text);
                    this.m_LB_MythSkillname2.SetText(text);
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3551"),
                        "skilllevel",
                        0
                    });

                    this.m_LB_MythSkillLevel1.SetText(text);
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3551"),
                        "skilllevel",
                        1
                    });

                    this.m_LB_MythSkillLevel2.SetText(text);
                }
                UIBaseInfoLoader battleSkillIconTexture = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(charKindbyMythSkillUnique);

                if (battleSkillIconTexture != null)
                {
                    this.m_DT_MythSkillIcon1_2.SetTexture(battleSkillIconTexture);
                    this.m_DT_MythSkillIcon2_2.SetTexture(battleSkillIconTexture);
                }
            }
        }
        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)
            {
                base.SetShowLayer(3, true);
                long iSec            = charSubData - curTime;
                long totalDayFromSec = PublicMethod.GetTotalDayFromSec(iSec);
                long hourFromSec     = PublicMethod.GetHourFromSec(iSec);
                long minuteFromSec   = PublicMethod.GetMinuteFromSec(iSec);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("3443"),
                    "day",
                    totalDayFromSec,
                    "hour",
                    hourFromSec,
                    "min",
                    minuteFromSec
                });

                this.m_LB_MythTime.SetText(text);
            }
            else
            {
                base.SetShowLayer(3, false);
            }
        }
    }
Exemplo n.º 9
0
    public void DrawTime()
    {
        string text  = PublicMethod.GetMonthFromSec(this.m_TotalPlayTimeCount).ToString();
        string text2 = PublicMethod.GetDayFromSec(this.m_TotalPlayTimeCount).ToString();
        string text3 = PublicMethod.GetHourFromSec(this.m_TotalPlayTimeCount).ToString();
        string text4 = PublicMethod.GetMinuteFromSec(this.m_TotalPlayTimeCount).ToString();
        string empty = string.Empty;

        if ("0" == text)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1626"),
                "day",
                text2,
                "hour",
                text3,
                "min",
                text4
            });
        }
        else
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2322"),
                "month",
                text,
                "day",
                text2,
                "hour",
                text3,
                "min",
                text4
            });
        }
        this.m_lbPlayTime.SetText(empty);
        string text5  = PublicMethod.GetMonthFromSec(this.m_RealPlayTimeCount).ToString();
        string text6  = PublicMethod.GetDayFromSec(this.m_RealPlayTimeCount).ToString();
        string text7  = PublicMethod.GetHourFromSec(this.m_RealPlayTimeCount).ToString();
        string text8  = PublicMethod.GetMinuteFromSec(this.m_RealPlayTimeCount).ToString();
        string empty2 = string.Empty;

        if ("0" == text5)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1626"),
                "day",
                text6,
                "hour",
                text7,
                "min",
                text8
            });
        }
        else
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2322"),
                "month",
                text5,
                "day",
                text6,
                "hour",
                text7,
                "min",
                text8
            });
        }
        this.m_lbRealTime.SetText(empty2);
    }