Пример #1
0
    // Token: 0x06002B9C RID: 11164 RVA: 0x004807E8 File Offset: 0x0047E9E8
    public void UpdateVip()
    {
        if (this.ItemKind - 1 != 12)
        {
            return;
        }
        DataManager instance    = DataManager.Instance;
        VIP_DataTbl recordByKey = instance.VIPLevelTable.GetRecordByKey((ushort)instance.RoleAttr.VIPLevel);
        float       num         = 424.47f / recordByKey.VIPPoint;
        Vector2     sizeDelta   = this.Degree.sizeDelta;

        sizeDelta.x           = num * instance.RoleAttr.VipPoint;
        this.Degree.sizeDelta = sizeDelta;
        this.VipBarStr.ClearString();
        if (instance.RoleAttr.VIPLevel < instance.RoleAttr.VIPLevelMax)
        {
            this.VipBarStr.StringToFormat(instance.mStringTable.GetStringByID(7703u));
            this.VipBarStr.IntToFormat((long)((ulong)instance.RoleAttr.VipPoint), 1, true);
            this.VipBarStr.IntToFormat((long)((ulong)recordByKey.VIPPoint), 1, true);
            this.VipBarStr.AppendFormat("{0}{1} / {2}");
        }
        else
        {
            this.VipBarStr.Append(instance.mStringTable.GetStringByID(7725u));
        }
        this.BarText.text = this.VipBarStr.ToString();
        this.BarText.SetAllDirty();
        this.BarText.cachedTextGenerator.Invalidate();
        this.VipLvStr.ClearString();
        this.VipLvStr.IntToFormat((long)instance.RoleAttr.VIPLevel, 1, false);
        this.VipLvStr.AppendFormat(instance.mStringTable.GetStringByID(7723u));
        this.VipLvText.text = this.VipLvStr.ToString();
        this.VipLvText.SetAllDirty();
        this.VipLvText.cachedTextGenerator.Invalidate();
    }
Пример #2
0
    // Token: 0x060020AE RID: 8366 RVA: 0x003E2424 File Offset: 0x003E0624
    private void UpdateInfo()
    {
        VIP_DataTbl recordByKey = DataManager.Instance.VIPLevelTable.GetRecordByKey((ushort)DataManager.Instance.RoleAttr.VIPLevel);
        UIText      component   = this.AGS_Form.GetChild(2).GetComponent <UIText>();

        this.tmpString[0].ClearString();
        this.tmpString[0].Append(DataManager.Instance.mStringTable.GetStringByID(7701u));
        int num = (int)(recordByKey.loginPoint + recordByKey.dailyAdd * (DataManager.Instance.RoleAttr.SuccessiveLoginDays + 1));

        if (num > 600)
        {
            num = 600;
        }
        this.tmpString[0].IntToFormat((long)num, 1, false);
        this.tmpString[0].AppendFormat("{0}");
        component.text = this.tmpString[0].ToString();
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        component = this.AGS_Form.GetChild(3).GetComponent <UIText>();
        this.tmpString[1].ClearString();
        this.tmpString[1].Append(DataManager.Instance.mStringTable.GetStringByID(7702u));
        this.tmpString[1].IntToFormat((long)(DataManager.Instance.RoleAttr.SuccessiveLoginDays + 1), 1, true);
        this.tmpString[1].AppendFormat("{0}");
        component.text = this.tmpString[1].ToString();
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        component = this.AGS_Form.GetChild(4).GetChild(1).GetComponent <UIText>();
        this.tmpString[2].ClearString();
        if (recordByKey.VIPLevel > this.lastVipLevel)
        {
            this.tmpString[2].Append(DataManager.Instance.mStringTable.GetStringByID(7725u));
        }
        else
        {
            this.tmpString[2].Append(DataManager.Instance.mStringTable.GetStringByID(7703u));
            this.tmpString[2].IntToFormat((long)((ulong)DataManager.Instance.RoleAttr.VipPoint), 1, true);
            this.tmpString[2].IntToFormat((long)((ulong)recordByKey.VIPPoint), 1, true);
            this.tmpString[2].AppendFormat("{0} / {1}");
        }
        component.text = this.tmpString[2].ToString();
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        RectTransform component2 = this.AGS_Form.GetChild(4).GetChild(0).GetComponent <RectTransform>();
        float         num2       = DataManager.Instance.RoleAttr.VipPoint / recordByKey.VIPPoint;

        num2 = Mathf.Min(num2, 1f);
        component2.SetSizeWithCurrentAnchors(RectTransform.Axis.Horizontal, num2 * 422f);
        component = this.AGS_Form.GetChild(7).GetComponent <UIText>();
        this.tmpString[3].ClearString();
        this.tmpString[3].IntToFormat((long)recordByKey.VIPLevel, 1, false);
        this.tmpString[3].AppendFormat("{0}");
        component.text = this.tmpString[3].ToString();
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
    }
Пример #3
0
    // Token: 0x060020B2 RID: 8370 RVA: 0x003E3258 File Offset: 0x003E1458
    private int CreateVipText(ushort targetLevel, CString str)
    {
        DataManager instance     = DataManager.Instance;
        int         num          = 0;
        VIP_DataTbl recordByKey  = instance.VIPLevelTable.GetRecordByKey((ushort)instance.RoleAttr.VIPLevel);
        VIP_DataTbl recordByKey2 = instance.VIPLevelTable.GetRecordByKey(targetLevel);
        CString     cstring      = StringManager.Instance.SpawnString(300);
        CString     cstring2     = StringManager.Instance.SpawnString(300);
        string      format;

        if (GUIManager.Instance.IsArabic)
        {
            format = "{0} . {1}\n";
        }
        else
        {
            format = "{0}. {1}\n";
        }
        string format2 = "<color=#00FFFF>{0}</color>";

        str.ClearString();
        if (recordByKey2.QuickCompleteMin > 0)
        {
            cstring.ClearString();
            num++;
            if (recordByKey.QuickCompleteMin == 0)
            {
                cstring2.ClearString();
                cstring2.IntToFormat((long)recordByKey2.QuickCompleteMin, 1, false);
                cstring2.AppendFormat(instance.mStringTable.GetStringByID(7710u));
                cstring.StringToFormat(cstring2);
                cstring.AppendFormat(format2);
            }
            else if (recordByKey2.QuickCompleteMin > recordByKey.QuickCompleteMin)
            {
                cstring2.ClearString();
                cstring2.IntToFormat((long)recordByKey2.QuickCompleteMin, 1, false);
                cstring2.AppendFormat(format2);
                cstring.StringToFormat(cstring2);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7710u));
            }
            else
            {
                cstring.IntToFormat((long)recordByKey2.QuickCompleteMin, 1, false);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7710u));
            }
            str.IntToFormat((long)num, 1, false);
            str.StringToFormat(cstring);
            str.AppendFormat(format);
        }
        if (recordByKey2.moraleBanner > 0)
        {
            cstring.ClearString();
            num++;
            if (recordByKey.moraleBanner == 0)
            {
                if (recordByKey2.moraleBanner == 255)
                {
                    cstring2.ClearString();
                    cstring2.AppendFormat(instance.mStringTable.GetStringByID(7721u));
                    cstring.StringToFormat(cstring2);
                    cstring.AppendFormat(format2);
                }
                else
                {
                    cstring2.ClearString();
                    cstring2.IntToFormat((long)recordByKey2.moraleBanner, 1, false);
                    cstring2.AppendFormat(instance.mStringTable.GetStringByID(7711u));
                    cstring.StringToFormat(cstring2);
                    cstring.AppendFormat(format2);
                }
            }
            else if (recordByKey2.moraleBanner == 255)
            {
                if (recordByKey.moraleBanner != 255)
                {
                    cstring.StringToFormat(instance.mStringTable.GetStringByID(7721u));
                    cstring.AppendFormat(format2);
                }
                else
                {
                    cstring.AppendFormat(instance.mStringTable.GetStringByID(7721u));
                }
            }
            else if (recordByKey2.moraleBanner > recordByKey.moraleBanner)
            {
                cstring2.ClearString();
                cstring2.IntToFormat((long)recordByKey2.moraleBanner, 1, false);
                cstring2.AppendFormat(format2);
                cstring.StringToFormat(cstring2);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7711u));
            }
            else
            {
                cstring.IntToFormat((long)recordByKey2.moraleBanner, 1, false);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7711u));
            }
            str.IntToFormat((long)num, 1, false);
            str.StringToFormat(cstring);
            str.AppendFormat(format);
        }
        if (recordByKey2.DailyResetElite > 0)
        {
            cstring.ClearString();
            num++;
            if (recordByKey.DailyResetElite == 0)
            {
                if (recordByKey2.DailyResetElite == 255)
                {
                    cstring2.ClearString();
                    cstring2.AppendFormat(instance.mStringTable.GetStringByID(7722u));
                    cstring.StringToFormat(cstring2);
                    cstring.AppendFormat(format2);
                }
                else
                {
                    cstring2.ClearString();
                    cstring2.IntToFormat((long)recordByKey2.moraleBanner, 1, false);
                    cstring2.AppendFormat(instance.mStringTable.GetStringByID(7712u));
                    cstring.StringToFormat(cstring2);
                    cstring.AppendFormat(format2);
                }
            }
            else if (recordByKey2.DailyResetElite == 255)
            {
                if (recordByKey.moraleBanner != 255)
                {
                    cstring.StringToFormat(instance.mStringTable.GetStringByID(7722u));
                    cstring.AppendFormat(format2);
                }
                else
                {
                    cstring.AppendFormat(instance.mStringTable.GetStringByID(7722u));
                }
            }
            else if (recordByKey2.DailyResetElite > recordByKey.DailyResetElite)
            {
                cstring2.ClearString();
                cstring2.IntToFormat((long)recordByKey2.DailyResetElite, 1, false);
                cstring2.AppendFormat(format2);
                cstring.StringToFormat(cstring2);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7712u));
            }
            else
            {
                cstring.IntToFormat((long)recordByKey2.DailyResetElite, 1, false);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7712u));
            }
            str.IntToFormat((long)num, 1, false);
            str.StringToFormat(cstring);
            str.AppendFormat(format);
        }
        if (recordByKey2.AutoDailyMission > 0)
        {
            cstring.ClearString();
            num++;
            if (recordByKey.AutoDailyMission == 0)
            {
                cstring.StringToFormat(instance.mStringTable.GetStringByID(7715u));
                cstring.AppendFormat(format2);
                str.IntToFormat((long)num, 1, false);
                str.StringToFormat(cstring);
                str.AppendFormat(format);
            }
            else
            {
                str.IntToFormat((long)num, 1, false);
                str.StringToFormat(instance.mStringTable.GetStringByID(7715u));
                str.AppendFormat(format);
            }
        }
        if (recordByKey2.AutoDailyAlliMission > 0)
        {
            cstring.ClearString();
            num++;
            if (recordByKey.AutoDailyAlliMission == 0)
            {
                cstring.StringToFormat(instance.mStringTable.GetStringByID(7716u));
                cstring.AppendFormat(format2);
                str.IntToFormat((long)num, 1, false);
                str.StringToFormat(cstring);
                str.AppendFormat(format);
            }
            else
            {
                str.IntToFormat((long)num, 1, false);
                str.StringToFormat(instance.mStringTable.GetStringByID(7716u));
                str.AppendFormat(format);
            }
        }
        if ((recordByKey2.UnlockBuySkill & 1) == 1)
        {
            cstring.ClearString();
            num++;
            if ((recordByKey.UnlockBuySkill & 1) != 1)
            {
                cstring.StringToFormat(instance.mStringTable.GetStringByID(7714u));
                cstring.AppendFormat(format2);
                str.IntToFormat((long)num, 1, false);
                str.StringToFormat(cstring);
                str.AppendFormat(format);
            }
            else
            {
                str.IntToFormat((long)num, 1, false);
                str.StringToFormat(instance.mStringTable.GetStringByID(7714u));
                str.AppendFormat(format);
            }
        }
        if (recordByKey2.AutoFightMission > 0)
        {
            cstring.ClearString();
            num++;
            if (recordByKey.AutoFightMission == 0)
            {
                cstring.StringToFormat(instance.mStringTable.GetStringByID(7717u));
                cstring.AppendFormat(format2);
            }
            else if (recordByKey2.AutoFightMission > recordByKey.AutoFightMission)
            {
                cstring2.ClearString();
                cstring2.IntToFormat((long)recordByKey2.AutoFightMission, 1, false);
                cstring2.AppendFormat(format2);
                cstring.StringToFormat(cstring2);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7717u));
            }
            else
            {
                cstring.IntToFormat((long)recordByKey2.AutoFightMission, 1, false);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7717u));
            }
            str.IntToFormat((long)num, 1, false);
            str.StringToFormat(cstring);
            str.AppendFormat(format);
        }
        if (recordByKey2.VipMission > 0)
        {
            cstring.ClearString();
            num++;
            if (recordByKey.VipMission == 0)
            {
                cstring2.ClearString();
                cstring2.IntToFormat((long)recordByKey2.VipMission, 1, false);
                cstring2.AppendFormat(instance.mStringTable.GetStringByID(7718u));
                cstring.StringToFormat(cstring2);
                cstring.AppendFormat(format2);
            }
            else if (recordByKey2.VipMission > recordByKey.VipMission)
            {
                cstring2.ClearString();
                cstring2.IntToFormat((long)recordByKey2.VipMission, 1, false);
                cstring2.AppendFormat(format2);
                cstring.StringToFormat(cstring2);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7718u));
            }
            else
            {
                cstring.IntToFormat((long)recordByKey2.VipMission, 1, false);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7718u));
            }
            str.IntToFormat((long)num, 1, false);
            str.StringToFormat(cstring);
            str.AppendFormat(format);
        }
        if (recordByKey2.DailyMission > 0)
        {
            cstring.ClearString();
            num++;
            if (recordByKey.DailyMission == 0)
            {
                cstring2.ClearString();
                cstring2.IntToFormat((long)recordByKey2.DailyMission, 1, false);
                cstring2.AppendFormat(instance.mStringTable.GetStringByID(7719u));
                cstring.StringToFormat(cstring2);
                cstring.AppendFormat(format2);
            }
            else if (recordByKey2.DailyMission > recordByKey.DailyMission)
            {
                cstring2.ClearString();
                cstring2.IntToFormat((long)recordByKey2.DailyMission, 1, false);
                cstring2.AppendFormat(format2);
                cstring.StringToFormat(cstring2);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7719u));
            }
            else
            {
                cstring.IntToFormat((long)recordByKey2.DailyMission, 1, false);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7719u));
            }
            str.IntToFormat((long)num, 1, false);
            str.StringToFormat(cstring);
            str.AppendFormat(format);
        }
        if (recordByKey2.AlliMission > 0)
        {
            cstring.ClearString();
            num++;
            if (recordByKey.AlliMission == 0)
            {
                cstring2.ClearString();
                cstring2.IntToFormat((long)recordByKey2.AlliMission, 1, false);
                cstring2.AppendFormat(instance.mStringTable.GetStringByID(7719u));
                cstring.StringToFormat(cstring2);
                cstring.AppendFormat(format2);
            }
            else if (recordByKey2.AlliMission > recordByKey.AlliMission)
            {
                cstring2.ClearString();
                cstring2.IntToFormat((long)recordByKey2.AlliMission, 1, false);
                cstring2.AppendFormat(format2);
                cstring.StringToFormat(cstring2);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7720u));
            }
            else
            {
                cstring.IntToFormat((long)recordByKey2.AlliMission, 1, false);
                cstring.AppendFormat(instance.mStringTable.GetStringByID(7720u));
            }
            str.IntToFormat((long)num, 1, false);
            str.StringToFormat(cstring);
            str.AppendFormat(format);
        }
        for (int i = 0; i < 15; i++)
        {
            int num2 = i * 2;
            if (recordByKey2.Effects[num2] > 0)
            {
                Effect recordByKey3 = DataManager.Instance.EffectData.GetRecordByKey(recordByKey2.Effects[num2]);
                cstring.ClearString();
                num++;
                int num3 = (int)recordByKey2.Effects[num2 + 1];
                if (recordByKey3.ValueID == 4378)
                {
                    num3 /= 100;
                }
                if (recordByKey.Effects[num2 + 1] == 0)
                {
                    cstring2.ClearString();
                    cstring2.Append(instance.mStringTable.GetStringByID((uint)recordByKey3.String_infoID));
                    cstring2.IntToFormat((long)num3, 1, false);
                    cstring2.AppendFormat("{0}");
                    cstring2.Append(instance.mStringTable.GetStringByID((uint)recordByKey3.ValueID));
                    cstring.StringToFormat(cstring2);
                    cstring.AppendFormat(format2);
                }
                else if (recordByKey2.Effects[num2 + 1] > recordByKey.Effects[num2 + 1])
                {
                    cstring2.ClearString();
                    cstring2.IntToFormat((long)num3, 1, false);
                    cstring2.AppendFormat(format2);
                    cstring.Append(instance.mStringTable.GetStringByID((uint)recordByKey3.String_infoID));
                    cstring.Append(cstring2);
                    cstring.Append(instance.mStringTable.GetStringByID((uint)recordByKey3.ValueID));
                }
                else
                {
                    cstring.Append(instance.mStringTable.GetStringByID((uint)recordByKey3.String_infoID));
                    cstring.IntToFormat((long)num3, 1, false);
                    cstring.AppendFormat("{0}");
                    cstring.Append(instance.mStringTable.GetStringByID((uint)recordByKey3.ValueID));
                }
                str.IntToFormat((long)num, 1, false);
                str.StringToFormat(cstring);
                str.AppendFormat(format);
            }
        }
        StringManager.Instance.DeSpawnString(cstring2);
        StringManager.Instance.DeSpawnString(cstring);
        return(num);
    }
Пример #4
0
    // Token: 0x060020B1 RID: 8369 RVA: 0x003E2AA0 File Offset: 0x003E0CA0
    private void SetShowVip(ushort _targetLevel)
    {
        ushort viplevel = (ushort)DataManager.Instance.RoleAttr.VIPLevel;

        if (_targetLevel == 0)
        {
            _targetLevel = viplevel;
        }
        if (_targetLevel > this.lastVipLevel)
        {
            _targetLevel = this.lastVipLevel;
        }
        if (this.targetLevel == _targetLevel)
        {
            return;
        }
        this.targetLevel = _targetLevel;
        this.AGS_Form.GetChild(17).gameObject.SetActive(this.targetLevel != 1);
        this.AGS_Form.GetChild(18).gameObject.SetActive(this.targetLevel != this.lastVipLevel);
        DataManager instance     = DataManager.Instance;
        VIP_DataTbl recordByKey  = instance.VIPLevelTable.GetRecordByKey(this.targetLevel);
        VIP_DataTbl recordByKey2 = instance.VIPLevelTable.GetRecordByKey(this.targetLevel + 1);
        UIText      component    = this.AGS_Form.GetChild(14).GetChild(2).GetComponent <UIText>();

        this.tmpString[4].ClearString();
        this.tmpString[4].Append(DataManager.Instance.mStringTable.GetStringByID(7705u));
        this.tmpString[4].IntToFormat((long)recordByKey.VIPLevel, 1, false);
        this.tmpString[4].AppendFormat(" {0}");
        component.text = this.tmpString[4].ToString();
        if (recordByKey.VIPLevel > viplevel)
        {
            component.color = new Color(0.6f, 0.58f, 0.38f);
        }
        else
        {
            component.color = new Color(1f, 0.97f, 0.63f);
        }
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        component = this.AGS_Form.GetChild(15).GetChild(2).GetComponent <UIText>();
        this.tmpString[5].ClearString();
        this.tmpString[5].Append(DataManager.Instance.mStringTable.GetStringByID(7705u));
        this.tmpString[5].IntToFormat((long)recordByKey2.VIPLevel, 1, false);
        this.tmpString[5].AppendFormat(" {0}");
        component.text = this.tmpString[5].ToString();
        if (recordByKey2.VIPLevel > viplevel)
        {
            component.color = new Color(0.6f, 0.58f, 0.38f);
        }
        else
        {
            component.color = new Color(1f, 0.97f, 0.63f);
        }
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        component = this.AGS_Form.GetChild(14).GetChild(3).GetComponent <UIText>();
        if (recordByKey.VIPLevel > viplevel)
        {
            component.color = new Color(0.6f, 0.58f, 0.38f);
        }
        else
        {
            component.color = new Color(1f, 0.97f, 0.63f);
        }
        component = this.AGS_Form.GetChild(15).GetChild(3).GetComponent <UIText>();
        if (recordByKey2.VIPLevel > viplevel)
        {
            component.color = new Color(0.6f, 0.58f, 0.38f);
        }
        else
        {
            component.color = new Color(1f, 0.97f, 0.63f);
        }
        Image component2 = this.AGS_Form.GetChild(14).GetChild(1).GetComponent <Image>();

        if (recordByKey.VIPLevel > viplevel)
        {
            component2.color = new Color(0.5f, 0.5f, 0.5f);
        }
        else
        {
            component2.color = new Color(1f, 1f, 1f);
        }
        component2 = this.AGS_Form.GetChild(15).GetChild(1).GetComponent <Image>();
        if (recordByKey2.VIPLevel > viplevel)
        {
            component2.color = new Color(0.5f, 0.5f, 0.5f);
        }
        else
        {
            component2.color = new Color(1f, 1f, 1f);
        }
        component2 = this.AGS_Form.GetChild(14).GetChild(4).GetComponent <Image>();
        if (recordByKey.VIPLevel > viplevel)
        {
            component2.color = new Color(0.5f, 0.5f, 0.5f);
        }
        else
        {
            component2.color = new Color(1f, 1f, 1f);
        }
        component2 = this.AGS_Form.GetChild(15).GetChild(4).GetComponent <Image>();
        if (recordByKey2.VIPLevel > viplevel)
        {
            component2.color = new Color(0.5f, 0.5f, 0.5f);
        }
        else
        {
            component2.color = new Color(1f, 1f, 1f);
        }
        component = this.AGS_Form.GetChild(16).GetChild(0).GetChild(0).GetComponent <UIText>();
        if (recordByKey.VIPLevel > viplevel)
        {
            component.color = new Color(0.7f, 0.7f, 0.7f);
        }
        else
        {
            component.color = new Color(1f, 1f, 1f);
        }
        this.CreateVipText(recordByKey.VIPLevel, this.Ltext);
        component.text = this.Ltext.ToString();
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        component.cachedTextGeneratorForLayout.Invalidate();
        float         preferredHeight = component.preferredHeight;
        RectTransform component3      = this.AGS_Form.GetChild(16).GetChild(0).GetChild(0).GetComponent <RectTransform>();

        component3.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, preferredHeight);
        component = this.AGS_Form.GetChild(16).GetChild(0).GetChild(1).GetComponent <UIText>();
        if (recordByKey2.VIPLevel > viplevel)
        {
            component.color = new Color(0.7f, 0.7f, 0.7f);
        }
        else
        {
            component.color = new Color(1f, 1f, 1f);
        }
        this.CreateVipText(recordByKey2.VIPLevel, this.Rtext);
        component.text = this.Rtext.ToString();
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        component.cachedTextGeneratorForLayout.Invalidate();
        preferredHeight = component.preferredHeight;
        component3      = this.AGS_Form.GetChild(16).GetChild(0).GetChild(1).GetComponent <RectTransform>();
        component3.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, preferredHeight);
        component3 = this.AGS_Form.GetChild(16).GetChild(0).GetComponent <RectTransform>();
        component3.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, preferredHeight);
        component = this.AGS_Form.GetChild(14).GetChild(3).GetComponent <UIText>();
        if (recordByKey.VIPLevel > viplevel)
        {
            component.text = DataManager.Instance.mStringTable.GetStringByID(7707u);
            component.gameObject.SetActive(true);
        }
        else if (recordByKey.VIPLevel == viplevel)
        {
            component.text = DataManager.Instance.mStringTable.GetStringByID(7706u);
            component.gameObject.SetActive(true);
        }
        else
        {
            component.gameObject.SetActive(false);
        }
        component = this.AGS_Form.GetChild(15).GetChild(3).GetComponent <UIText>();
        if (recordByKey2.VIPLevel > viplevel)
        {
            component.text = DataManager.Instance.mStringTable.GetStringByID(7707u);
            component.gameObject.SetActive(true);
        }
        else if (recordByKey2.VIPLevel == viplevel)
        {
            component.text = DataManager.Instance.mStringTable.GetStringByID(7706u);
            component.gameObject.SetActive(true);
        }
        else
        {
            component.gameObject.SetActive(false);
        }
    }
Пример #5
0
    // Token: 0x060020B8 RID: 8376 RVA: 0x003E41DC File Offset: 0x003E23DC
    public override void OnOpen(int arg1, int arg2)
    {
        GUIManager.Instance.UIQueueLock(EGUIQueueLock.UIQL_UI_notAllowPopUps);
        byte b = (byte)arg1;

        this.LevelText = StringManager.Instance.SpawnString(50);
        this.LevelText.ClearString();
        this.LevelText.IntToFormat((long)b, 1, false);
        this.LevelText.AppendFormat("{0}");
        this.LevelUpText = StringManager.Instance.SpawnString(50);
        this.PointText   = StringManager.Instance.SpawnString(50);
        this.PointText2  = StringManager.Instance.SpawnString(50);
        Font ttffont = GUIManager.Instance.GetTTFFont();

        this.AGS_Form    = base.transform;
        this.Light       = this.AGS_Form.GetChild(0).GetComponent <Image>();
        this.Light.color = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, 176);
        this.BG_Rt       = (this.AGS_Form.GetChild(1) as RectTransform);
        UIButton component = this.AGS_Form.GetChild(2).GetComponent <UIButton>();

        component.m_Handler    = this;
        component.m_EffectType = e_EffectType.e_Scale;
        this.CloseBtn          = component;
        UIText component2 = this.AGS_Form.GetChild(3).GetComponent <UIText>();

        component2.font = ttffont;
        component2.text = DataManager.Instance.mStringTable.GetStringByID(5797u);
        this.Light      = this.AGS_Form.GetChild(4).GetComponent <Image>();
        component2      = this.AGS_Form.GetChild(5).GetChild(0).GetComponent <UIText>();
        component2.font = ttffont;
        component2.text = this.LevelText.ToString();
        component2.SetAllDirty();
        component2.cachedTextGenerator.Invalidate();
        if (GUIManager.Instance.IsArabic)
        {
            RectTransform component3 = this.AGS_Form.GetChild(5).GetComponent <RectTransform>();
            component3.localScale       = new Vector3(-1f, 1f, 1f);
            component3.anchoredPosition = new Vector2(component3.anchoredPosition.x + 142f, component3.anchoredPosition.y);
            component3 = this.AGS_Form.GetChild(5).GetChild(0).GetComponent <RectTransform>();
            component3.localEulerAngles = new Vector3(0f, 180f, 0f);
        }
        switch (arg2)
        {
        case 0:
        {
            this.AGS_Form.GetChild(6).gameObject.SetActive(true);
            this.AGS_Form.GetChild(7).gameObject.SetActive(false);
            this.AGS_Form.GetChild(8).gameObject.SetActive(false);
            int num = arg1 >> 16;
            b = (byte)(arg1 & 65535);
            this.LevelUpText.ClearString();
            this.LevelUpText.IntToFormat((long)num, 1, false);
            this.LevelUpText.IntToFormat((long)b, 1, false);
            if (GUIManager.Instance.IsArabic)
            {
                this.LevelUpText.AppendFormat("<color=#35F76CFF>{1} VIP ←</color>{0} VIP ");
            }
            else
            {
                this.LevelUpText.AppendFormat("VIP {0} <color=#35F76CFF>→ VIP {1}</color>");
            }
            component2      = this.AGS_Form.GetChild(6).GetChild(1).GetComponent <UIText>();
            component2.font = ttffont;
            component2.text = this.LevelUpText.ToString();
            component2.SetAllDirty();
            component2.cachedTextGenerator.Invalidate();
            component              = this.AGS_Form.GetChild(6).GetChild(2).GetComponent <UIButton>();
            component.m_Handler    = this;
            component.m_EffectType = e_EffectType.e_Scale;
            component.m_BtnID1     = 1;
            component2             = this.AGS_Form.GetChild(6).GetChild(2).GetChild(0).GetComponent <UIText>();
            component2.font        = ttffont;
            component2.text        = DataManager.Instance.mStringTable.GetStringByID(7706u);
            if (GUIManager.Instance.IsArabic)
            {
                RectTransform component4 = this.AGS_Form.GetChild(6).GetChild(0).GetComponent <RectTransform>();
                component4.localScale       = new Vector3(-1f, 1f, 1f);
                component4.anchoredPosition = new Vector2(component4.anchoredPosition.x + 52f, component4.anchoredPosition.y);
            }
            break;
        }

        case 1:
        {
            component2      = this.AGS_Form.GetChild(3).GetComponent <UIText>();
            component2.text = DataManager.Instance.mStringTable.GetStringByID(7705u);
            this.AGS_Form.GetChild(6).gameObject.SetActive(false);
            this.AGS_Form.GetChild(7).gameObject.SetActive(true);
            this.AGS_Form.GetChild(8).gameObject.SetActive(false);
            VIP_DataTbl recordByKey = DataManager.Instance.VIPLevelTable.GetRecordByKey((ushort)DataManager.Instance.RoleAttr.VIPLevel);
            int         num2        = (int)(recordByKey.loginPoint + recordByKey.dailyAdd * DataManager.Instance.RoleAttr.SuccessiveLoginDays);
            if (num2 > 600)
            {
                num2 = 600;
            }
            this.PointText.ClearString();
            this.PointText.IntToFormat((long)num2, 1, false);
            this.PointText.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(7742u));
            num2 += (int)recordByKey.dailyAdd;
            if (num2 > 600)
            {
                num2 = 600;
            }
            this.PointText2.ClearString();
            this.PointText2.IntToFormat((long)num2, 1, false);
            this.PointText2.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(7740u));
            this.LevelUpText.ClearString();
            this.LevelUpText.IntToFormat((long)(DataManager.Instance.RoleAttr.SuccessiveLoginDays + 1), 1, false);
            this.LevelUpText.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(7741u));
            component2      = this.AGS_Form.GetChild(7).GetChild(0).GetComponent <UIText>();
            component2.font = ttffont;
            component2.text = this.PointText.ToString();
            component2.SetAllDirty();
            component2.cachedTextGenerator.Invalidate();
            component2      = this.AGS_Form.GetChild(7).GetChild(1).GetComponent <UIText>();
            component2.font = ttffont;
            component2.text = this.LevelUpText.ToString();
            component2.SetAllDirty();
            component2.cachedTextGenerator.Invalidate();
            component2      = this.AGS_Form.GetChild(7).GetChild(2).GetComponent <UIText>();
            component2.font = ttffont;
            component2.text = this.PointText2.ToString();
            component2.SetAllDirty();
            component2.cachedTextGenerator.Invalidate();
            component2      = this.AGS_Form.GetChild(7).GetChild(3).GetComponent <UIText>();
            component2.font = ttffont;
            component2.text = DataManager.Instance.mStringTable.GetStringByID(7743u);
            break;
        }

        case 2:
        {
            this.AGS_Form.GetChild(6).gameObject.SetActive(false);
            this.AGS_Form.GetChild(7).gameObject.SetActive(false);
            this.AGS_Form.GetChild(8).gameObject.SetActive(true);
            this.LevelUpText.ClearString();
            this.LevelUpText.IntToFormat((long)(b - 1), 1, false);
            this.LevelUpText.IntToFormat((long)b, 1, false);
            if (GUIManager.Instance.IsArabic)
            {
                this.LevelUpText.AppendFormat("<color=#35F76CFF>{1} VIP ←</color>{0} VIP ");
            }
            else
            {
                this.LevelUpText.AppendFormat("VIP {0} <color=#35F76CFF>→ VIP {1}</color>");
            }
            VIP_DataTbl recordByKey2 = DataManager.Instance.VIPLevelTable.GetRecordByKey((ushort)(DataManager.Instance.RoleAttr.VIPLevel - 1));
            int         num3         = (int)(recordByKey2.loginPoint + recordByKey2.dailyAdd * DataManager.Instance.RoleAttr.SuccessiveLoginDays);
            if (num3 > 600)
            {
                num3 = 600;
            }
            this.PointText.ClearString();
            this.PointText.IntToFormat((long)num3, 1, false);
            this.PointText.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(7742u));
            component2      = this.AGS_Form.GetChild(8).GetChild(1).GetComponent <UIText>();
            component2.font = ttffont;
            component2.text = this.LevelUpText.ToString();
            component2.SetAllDirty();
            component2.cachedTextGenerator.Invalidate();
            component2      = this.AGS_Form.GetChild(8).GetChild(2).GetComponent <UIText>();
            component2.font = ttffont;
            component2.text = this.PointText.ToString();
            component2.SetAllDirty();
            component2.cachedTextGenerator.Invalidate();
            component2      = this.AGS_Form.GetChild(8).GetChild(3).GetComponent <UIText>();
            component2.font = ttffont;
            component2.text = DataManager.Instance.mStringTable.GetStringByID(7743u);
            if (GUIManager.Instance.IsArabic)
            {
                RectTransform component5 = this.AGS_Form.GetChild(8).GetChild(0).GetComponent <RectTransform>();
                component5.localScale       = new Vector3(-1f, 1f, 1f);
                component5.anchoredPosition = new Vector2(component5.anchoredPosition.x + 52f, component5.anchoredPosition.y);
            }
            break;
        }
        }
        if (GUIManager.Instance.bOpenOnIPhoneX)
        {
            RectTransform component6 = this.AGS_Form.GetChild(0).GetComponent <RectTransform>();
            component6.offsetMin = new Vector2(-GUIManager.Instance.IPhoneX_DeltaX, 0f);
            component6.offsetMax = new Vector2(GUIManager.Instance.IPhoneX_DeltaX, 0f);
        }
        AudioManager.Instance.PlayUISFX(UIKind.DominanceLevelup);
        GUIManager.Instance.mStartV2 = new Vector2(GUIManager.Instance.m_SpeciallyEffect.mCanvasRT.sizeDelta.x / 2f, GUIManager.Instance.m_SpeciallyEffect.mCanvasRT.sizeDelta.y / 2f);
        GUIManager.Instance.m_SpeciallyEffect.AddIconShow(false, GUIManager.Instance.mStartV2, SpeciallyEffect_Kind.AddVIP_Point, 0, 0, true, 2f);
        GUIManager.Instance.LoadLvUpLight(base.transform.GetChild(0));
    }