예제 #1
0
    public override bool ParseDataFromNDT(TsDataReader dr)
    {
        NrTSingleton <NkGuildExpManager> .Instance.Init();

        foreach (TsDataReader.Row data in dr)
        {
            GUILD_EXP gUILD_EXP = new GUILD_EXP();
            gUILD_EXP.SetData(data);
            NrTSingleton <NkGuildExpManager> .Instance.Set_Value(gUILD_EXP);
        }
        return(true);
    }
예제 #2
0
 public void Set_Value(GUILD_EXP a_cValue)
 {
     this.m_kGuildLevelUpInfoList.Add(a_cValue.m_nLevel, a_cValue);
 }
예제 #3
0
    public void SetInfo(GS_GUILDWAR_INFO_ACK ACK)
    {
        string text = string.Empty;

        if (NrTSingleton <GuildWarManager> .Instance.CanGetGuildWarReward())
        {
            this.m_boxNotice.Hide(false);
        }
        else
        {
            this.m_boxNotice.Hide(true);
        }
        if (ACK.i64GuildID[1] > 0L)
        {
            base.SetShowLayer(1, true);
            base.SetShowLayer(2, true);
            this.m_lbApplyNoti.Hide(true);
            if (ACK.bGuildWarTimeState == 2)
            {
                this.m_lbGuildWarTimeState.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2979"));
            }
            else if (ACK.bGuildWarTimeState == 3)
            {
                int num;
                if (ACK.i32WarMatchPoint[0] > ACK.i32WarMatchPoint[1])
                {
                    num = 0;
                }
                else if (ACK.i32WarMatchPoint[0] < ACK.i32WarMatchPoint[1])
                {
                    num = 1;
                }
                else
                {
                    num = ((ACK.i32Rank[0] >= ACK.i32Rank[1]) ? 0 : 1);
                }
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2980"),
                    "targetname",
                    TKString.NEWString(ACK.strGuildName[num])
                });

                this.m_lbGuildWarTimeState.SetText(text);
                NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_GUILDWAR_VICTORYMARK", this.m_dtVictoryEffect[num], this.m_dtVictoryEffect[num].GetSize());

                if (num == 0)
                {
                    TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "ETC", "GUILD_WIN", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
                }
                else
                {
                    TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "ETC", "GUILD_LOSE", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay));
                }
            }
            else
            {
                base.SetShowLayer(2, false);
            }
        }
        else
        {
            base.SetShowLayer(1, false);
            base.SetShowLayer(2, false);
            this.m_lbApplyNoti.Hide(false);
        }
        NrTSingleton <GuildWarManager> .Instance.bIsGuildWar = ACK.bIsGuildWar;
        NrTSingleton <GuildWarManager> .Instance.bIsGuildWarCancelReservation = ACK.bIsCancelReservation;
        this.SetApplyButton();
        for (int i = 0; i < 2; i++)
        {
            if (ACK.i64GuildID[i] > 0L)
            {
                this.m_btGuild[i].Data = ACK.i64GuildID[i];
                string guildPortraitURL = NrTSingleton <NkCharManager> .Instance.GetGuildPortraitURL(ACK.i64GuildID[i]);

                WebFileCache.RequestImageWebFile(guildPortraitURL, new WebFileCache.ReqTextureCallback(this.ReqWebImageCallback), this.m_dtGMark[i]);
                text = TKString.NEWString(ACK.strGuildName[i]);
                if (NrTSingleton <GuildWarManager> .Instance.bIsGuildWar && i == 0)
                {
                    text = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), TKString.NEWString(ACK.strGuildName[i]));
                }
                this.m_lbGuildName[i].SetText(text);
                this.m_lbMatchPoint[i].SetText(ACK.i32WarMatchPoint[i].ToString());
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1685"),
                    "count",
                    ACK.i32Rank[i]
                });

                this.m_lbGuildWarRank[i].SetText(text);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1786"),
                    "count",
                    ACK.i16Level[i]
                });

                this.m_lbGuildLevel[i].SetText(text);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1303"),
                    "count1",
                    ACK.i16CurMemberNum[i],
                    "count2",
                    ACK.i16MaxMemberNum[i]
                });

                this.m_lbMemberCount[i].SetText(text);
                long      num2             = 0L;
                long      num3             = 1L;
                GUILD_EXP guildLevelUpInfo = NrTSingleton <NkGuildExpManager> .Instance.GetGuildLevelUpInfo(ACK.i16Level[i]);

                if (guildLevelUpInfo != null)
                {
                    num2 = ACK.i64Exp[i] - guildLevelUpInfo.m_nExp;
                }
                GUILD_EXP guildLevelUpInfo2 = NrTSingleton <NkGuildExpManager> .Instance.GetGuildLevelUpInfo(ACK.i16Level[i] + 1);

                if (guildLevelUpInfo2 != null && guildLevelUpInfo != null)
                {
                    num3 = guildLevelUpInfo2.m_nExp - guildLevelUpInfo.m_nExp;
                    if (0L > num3)
                    {
                        num3 = 0L;
                    }
                }
                float num4 = (float)num2 / (float)num3;
                if (1f < num4)
                {
                    num4 = 1f;
                }
                this.m_dtExpBar[i].SetSize(this.m_fExpWidth[i] * num4, this.m_dtExpBar[i].GetSize().y);
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("603"),
                    "count1",
                    num2,
                    "count2",
                    num3
                });

                this.m_lbExpBarText[i].SetText(text);
                if (ACK.i64BirthDate[i] > 0L)
                {
                    DateTime dueDate = PublicMethod.GetDueDate(ACK.i64BirthDate[i]);
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("602"),
                        "year",
                        dueDate.Year,
                        "month",
                        dueDate.Month,
                        "day",
                        dueDate.Day
                    });

                    this.m_lbGuildBirth[i].SetText(text);
                }
                else
                {
                    this.m_lbGuildBirth[i].SetText(string.Empty);
                }
                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                {
                    NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1041"),
                    "count",
                    ACK.i32WarPoint[i]
                });

                this.m_lbAccrueHonor[i].SetText(text);
            }
        }
    }
예제 #4
0
    public void SetDetailInfo(GS_NEWGUILD_DETAILINFO_ACK ACK)
    {
        this.m_lGuildID     = ACK.i64GuildID;
        this.m_strGuildName = TKString.NEWString(ACK.strGuildName);
        if (ACK.bGuildWar)
        {
            this.m_strGuildName = string.Format("{0}{1}", NrTSingleton <CTextParser> .Instance.GetTextColor("1401"), this.m_strGuildName);
        }
        this.m_lbGuildName.Text = this.m_strGuildName;
        this.Send_GS_DECLAREWAR_LIST_REQ();
        int i16Rank = (int)ACK.i16Rank;

        if (0 < i16Rank)
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1689"),
                "count",
                i16Rank,
                "count2",
                ACK.i32Point
            });
        }
        else
        {
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1851"),
                "count",
                ACK.i32Point
            });
        }
        this.m_lbRank.SetText(this.m_strText);
        long      num              = 0L;
        long      num2             = 1L;
        GUILD_EXP guildLevelUpInfo = NrTSingleton <NkGuildExpManager> .Instance.GetGuildLevelUpInfo(ACK.i16Level);

        if (guildLevelUpInfo != null)
        {
            num = ACK.i64Exp - guildLevelUpInfo.m_nExp;
        }
        GUILD_EXP guildLevelUpInfo2 = NrTSingleton <NkGuildExpManager> .Instance.GetGuildLevelUpInfo(ACK.i16Level + 1);

        if (guildLevelUpInfo2 != null && guildLevelUpInfo != null)
        {
            num2 = guildLevelUpInfo2.m_nExp - guildLevelUpInfo.m_nExp;
            if (0L > num2)
            {
                num2 = 0L;
            }
        }
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1786"),
            "count",
            ACK.i16Level
        });

        this.m_lbLevel.SetText(this.m_strText);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("603"),
            "count1",
            num,
            "count2",
            num2
        });

        this.m_lbExpText.SetText(this.m_strText);
        float num3 = (float)num / (float)num2;

        if (1f < num3)
        {
            num3 = 1f;
        }
        this.m_dtExp.SetSize(this.m_fExpWidth * num3, this.m_dtExp.GetSize().y);
        this.m_lbMasterName.SetText(TKString.NEWString(ACK.strMasterName));
        this.m_strText = TKString.NEWString(ACK.strSubMasterName);
        if (string.Empty == this.m_strText)
        {
            this.m_strText = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("48");
        }
        this.m_lbSubMasterName.SetText(this.m_strText);
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1303"),
            "count1",
            ACK.i16CurMemberNum,
            "count2",
            ACK.i16MaxMemberNum
        });

        this.m_lbMemberNum.SetText(this.m_strText);
        this.m_lbGuildMessage.SetText(TKString.NEWString(ACK.strGuildMessage));
        if (0 < ACK.i16ApplicantNum && 0L < this.m_lGuildID && this.m_lGuildID == NrTSingleton <NewGuildManager> .Instance.GetGuildID() && NrTSingleton <NewGuildManager> .Instance.IsDischargeMember(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_PersonID))
        {
            this.m_bxApplicantNum.Hide(false);
            this.m_bxApplicantNum.SetText(ACK.i16ApplicantNum.ToString());
        }
        else
        {
            this.m_bxApplicantNum.Hide(true);
        }
        if (0L < ACK.i64CreateDate)
        {
            DateTime dueDate = PublicMethod.GetDueDate(ACK.i64CreateDate);
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
            {
                NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("602"),
                "year",
                dueDate.Year,
                "month",
                dueDate.Month,
                "day",
                dueDate.Day
            });

            this.m_lbGuildCreateDate.SetText(this.m_strText);
        }
        else
        {
            this.m_lbGuildCreateDate.SetText(string.Empty);
        }
        this.m_bIsDeclareWarTarget = ACK.bIsDeclareWarTarget;
        this.SetButton();
        this.m_lbFund.SetText(ANNUALIZED.Convert(ACK.i64Fund));
        switch (i16Rank)
        {
        case 1:
            this.m_dtMedal.Hide(false);
            this.m_dtMedal.SetTexture("Win_I_Rank03");
            break;

        case 2:
            this.m_dtMedal.Hide(false);
            this.m_dtMedal.SetTexture("Win_I_Rank02");
            break;

        case 3:
            this.m_dtMedal.Hide(false);
            this.m_dtMedal.SetTexture("Win_I_Rank01");
            break;

        default:
            this.m_dtMedal.Hide(true);
            break;
        }
        if (0L < this.m_lGuildID)
        {
            string guildPortraitURL = NrTSingleton <NkCharManager> .Instance.GetGuildPortraitURL(this.m_lGuildID);

            WebFileCache.RequestImageWebFile(guildPortraitURL, new WebFileCache.ReqTextureCallback(this.ReqWebImageCallback), null);
        }
    }