Exemple #1
0
    // Token: 0x06001DEB RID: 7659 RVA: 0x00386954 File Offset: 0x00384B54
    public override void OnOpen(int arg1, int arg2)
    {
        this.door = (Door)GUIManager.Instance.FindMenu(EGUIWindow.Door);
        this.DM   = DataManager.Instance;
        if (this.DM.mLordEquip == null)
        {
            this.DM.mLordEquip = LordEquipData.Instance();
        }
        this.SPHeight = new List <float>();
        Font ttffont = GUIManager.Instance.GetTTFFont();

        this.AGS_Form = base.transform;
        UIText component = this.AGS_Form.GetChild(0).GetChild(1).GetComponent <UIText>();

        component.font = ttffont;
        component.text = string.Empty;
        component.SetCheckArabic(true);
        this.AllTextObject[0] = component;
        Image component2 = this.AGS_Form.GetChild(1).GetComponent <Image>();

        component2.sprite   = this.door.LoadSprite("UI_main_close_base");
        component2.material = this.door.LoadMaterial();
        component2.enabled  = !GUIManager.Instance.bOpenOnIPhoneX;
        component2          = this.AGS_Form.GetChild(1).GetChild(0).GetComponent <Image>();
        component2.sprite   = this.door.LoadSprite("UI_main_close");
        component2.material = this.door.LoadMaterial();
        UIButton component3 = this.AGS_Form.GetChild(1).GetChild(0).GetComponent <UIButton>();

        component3.m_Handler    = this;
        component3.m_BtnID1     = 99;
        component3.m_EffectType = e_EffectType.e_Scale;
        component3.transition   = Selectable.Transition.None;
        component3              = this.AGS_Form.GetChild(2).GetComponent <UIButton>();
        component3.m_Handler    = this;
        component3.m_BtnID1     = 4;
        component3.m_EffectType = e_EffectType.e_Scale;
        component3              = this.AGS_Form.GetChild(4).GetChild(0).GetComponent <UIButton>();
        component3.m_Handler    = this;
        component3.m_BtnID1     = 2;
        component3.m_EffectType = e_EffectType.e_Scale;
        component               = this.AGS_Form.GetChild(4).GetChild(0).GetChild(0).GetComponent <UIText>();
        component.font          = ttffont;
        component.text          = this.DM.mStringTable.GetStringByID(9702u);
        this.AllTextObject[1]   = component;
        component3              = this.AGS_Form.GetChild(4).GetChild(1).GetComponent <UIButton>();
        component3.m_Handler    = this;
        component3.m_BtnID1     = 1;
        component3.m_EffectType = e_EffectType.e_Scale;
        component               = this.AGS_Form.GetChild(4).GetChild(1).GetChild(0).GetComponent <UIText>();
        component.font          = ttffont;
        component.text          = this.DM.mStringTable.GetStringByID(929u);
        this.AllTextObject[2]   = component;
        component3              = this.AGS_Form.GetChild(5).GetChild(8).GetComponent <UIButton>();
        component3.m_Handler    = this;
        component3.transition   = Selectable.Transition.None;
        component3.m_EffectType = e_EffectType.e_Scale;
        GameConstants.SetPivot(this.AGS_Form.GetChild(5).GetChild(8).GetComponent <RectTransform>(), new Vector2(0.5f, 0.5f));
        component3              = this.AGS_Form.GetChild(5).GetChild(9).GetComponent <UIButton>();
        component3.m_Handler    = this;
        component3.transition   = Selectable.Transition.None;
        component3.m_EffectType = e_EffectType.e_Scale;
        GameConstants.SetPivot(this.AGS_Form.GetChild(5).GetChild(9).GetComponent <RectTransform>(), new Vector2(0.5f, 0.5f));
        component3              = this.AGS_Form.GetChild(5).GetChild(10).GetComponent <UIButton>();
        component3.m_Handler    = this;
        component3.transition   = Selectable.Transition.None;
        component3.m_EffectType = e_EffectType.e_Scale;
        GameConstants.SetPivot(this.AGS_Form.GetChild(5).GetChild(10).GetComponent <RectTransform>(), new Vector2(0.5f, 0.5f));
        component3              = this.AGS_Form.GetChild(5).GetChild(11).GetComponent <UIButton>();
        component3.m_Handler    = this;
        component3.transition   = Selectable.Transition.None;
        component3.m_EffectType = e_EffectType.e_Scale;
        GameConstants.SetPivot(this.AGS_Form.GetChild(5).GetChild(11).GetComponent <RectTransform>(), new Vector2(0.5f, 0.5f));
        component3              = this.AGS_Form.GetChild(5).GetChild(12).GetComponent <UIButton>();
        component3.m_Handler    = this;
        component3.transition   = Selectable.Transition.None;
        component3.m_EffectType = e_EffectType.e_Scale;
        GameConstants.SetPivot(this.AGS_Form.GetChild(5).GetChild(12).GetComponent <RectTransform>(), new Vector2(0.5f, 0.5f));
        component3              = this.AGS_Form.GetChild(5).GetChild(13).GetComponent <UIButton>();
        component3.m_Handler    = this;
        component3.transition   = Selectable.Transition.None;
        component3.m_EffectType = e_EffectType.e_Scale;
        GameConstants.SetPivot(this.AGS_Form.GetChild(5).GetChild(13).GetComponent <RectTransform>(), new Vector2(0.5f, 0.5f));
        component3              = this.AGS_Form.GetChild(5).GetChild(14).GetComponent <UIButton>();
        component3.m_Handler    = this;
        component3.transition   = Selectable.Transition.None;
        component3.m_EffectType = e_EffectType.e_Scale;
        GameConstants.SetPivot(this.AGS_Form.GetChild(5).GetChild(14).GetComponent <RectTransform>(), new Vector2(0.5f, 0.5f));
        component3              = this.AGS_Form.GetChild(5).GetChild(15).GetComponent <UIButton>();
        component3.m_Handler    = this;
        component3.transition   = Selectable.Transition.None;
        component3.m_EffectType = e_EffectType.e_Scale;
        GameConstants.SetPivot(this.AGS_Form.GetChild(5).GetChild(15).GetComponent <RectTransform>(), new Vector2(0.5f, 0.5f));
        for (int i = 0; i < 8; i++)
        {
            UILEBtn component4 = this.AGS_Form.GetChild(5).GetChild(16 + i).GetComponent <UILEBtn>();
            component4.m_Handler = this;
            component4.gameObject.SetActive(false);
            this.LEquipLight[i] = this.AGS_Form.GetChild(5).GetChild(i + 8).GetChild(0).GetComponent <Image>();
        }
        component               = this.AGS_Form.GetChild(6).GetChild(1).GetComponent <UIText>();
        component.font          = ttffont;
        component.text          = this.DM.mStringTable.GetStringByID(1048u);
        this.AllTextObject[3]   = component;
        this.AGS_ScrollPanel    = this.AGS_Form.GetChild(6).GetChild(2).GetComponent <ScrollPanel>();
        component               = this.AGS_Form.GetChild(6).GetChild(3).GetChild(0).GetComponent <UIText>();
        component.font          = ttffont;
        component.text          = string.Empty;
        this.AllTextObject[4]   = component;
        component               = this.AGS_Form.GetChild(6).GetChild(3).GetChild(1).GetComponent <UIText>();
        component.font          = ttffont;
        component.text          = string.Empty;
        this.AllTextObject[5]   = component;
        component               = this.AGS_Form.GetChild(6).GetChild(3).GetChild(2).GetComponent <UIText>();
        component.font          = ttffont;
        component.text          = string.Empty;
        component.alignment     = TextAnchor.UpperLeft;
        this.AllTextObject[6]   = component;
        component3              = this.AGS_Form.GetChild(6).GetChild(3).GetChild(3).GetComponent <UIButton>();
        component3.m_Handler    = this;
        component3.transition   = Selectable.Transition.None;
        component3.m_EffectType = e_EffectType.e_Normal;
        component3.m_BtnID1     = 101;
        UIButtonHint uibuttonHint = component3.gameObject.AddComponent <UIButtonHint>();

        uibuttonHint.m_eHint   = EUIButtonHint.DownUpHandler;
        uibuttonHint.m_Handler = this;
        this.AGS_Forging       = this.AGS_Form.GetChild(7).GetChild(0).GetComponent <UISpritesArray>();
        this.ForgingIcon       = this.AGS_Form.GetChild(7).GetComponent <RectTransform>();
        this.ForgingIcon.GetComponent <Image>().color = new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, 120);
        GameObject gameObject = new GameObject("TextSizeCount");

        this.BestHeight          = gameObject.AddComponent <UIText>();
        this.BestHeight.font     = ttffont;
        this.BestHeight.fontSize = 17;
        this.BestHeight.text     = string.Empty;
        this.BestHeight.rectTransform.transform.position = new Vector3(1000f, 0f, 0f);
        if (UILordEquipSetEdit.showingSet == null)
        {
            UILordEquipSetEdit.showingSet = new LordEquipSet();
        }
        if (UILordEquipSetEdit.SetDataIndex == null)
        {
            UILordEquipSetEdit.SetDataIndex = new int[8];
        }
        this.isLoading = true;
        LordEquipData.CheckEquipExpired();
    }
Exemple #2
0
    // Token: 0x06002BA9 RID: 11177 RVA: 0x004818E0 File Offset: 0x0047FAE0
    public override void SendPack(UIButton sender)
    {
        if (sender.m_BtnID2 == (int)this.GenRemoveData.FreeRemove)
        {
            GUIManager.Instance.OpenOKCancelBox(GUIManager.Instance.FindMenu(EGUIWindow.UI_BagFilter), DataManager.Instance.mStringTable.GetStringByID(this.GenRemoveData.ConfirmTitle), DataManager.Instance.mStringTable.GetStringByID(this.GenRemoveData.ConfirmMainText), 0, 0, null, null);
            return;
        }
        switch (sender.m_BtnID1)
        {
        case 1002:
            if (DataManager.Instance.EquipTable.GetRecordByKey((ushort)sender.m_BtnID2).Color < LordEquipData.Instance().LordEquip[(int)this.itemPos].GemColor[(int)this.gemPos])
            {
                return;
            }
            DataManager.Instance.UseItem((ushort)sender.m_BtnID2, 1, (ushort)this.gemPos, 0, 0, DataManager.Instance.mLordEquip.LordEquip[(int)this.itemPos].SerialNO, string.Empty, true);
            break;

        case 1004:
            if (DataManager.Instance.EquipTable.GetRecordByKey((ushort)sender.m_BtnID2).Color < LordEquipData.Instance().LordEquip[(int)this.itemPos].GemColor[(int)this.gemPos])
            {
                return;
            }
            this.CheckBuy(1, (ushort)sender.m_BtnID3, (ushort)sender.m_BtnID2, true, GUIManager.Instance.FindMenu(EGUIWindow.UI_BagFilter), (int)this.gemPos, 0, DataManager.Instance.mLordEquip.LordEquip[(int)this.itemPos].SerialNO);
            break;
        }
    }
Exemple #3
0
    // Token: 0x06001DFB RID: 7675 RVA: 0x00387EFC File Offset: 0x003860FC
    public void reflashItem()
    {
        if (UILordEquipSetEdit.SetName == null)
        {
            UILordEquipSetEdit.SetName = StringManager.Instance.SpawnString(30);
        }
        UILordEquipSetEdit.SetName.ClearString();
        if (UILordEquipSetEdit.showingSet.Name.Length == 0)
        {
            UILordEquipSetEdit.SetName.IntToFormat((long)(UILordEquipSetEdit.SetIdx + 1), 1, false);
            UILordEquipSetEdit.SetName.AppendFormat(DataManager.Instance.mStringTable.GetStringByID(928u));
        }
        else
        {
            UILordEquipSetEdit.SetName.Append(UILordEquipSetEdit.showingSet.Name);
        }
        UIText component = this.AGS_Form.GetChild(0).GetChild(1).GetComponent <UIText>();

        component.text = UILordEquipSetEdit.SetName.ToString();
        component.SetAllDirty();
        component.cachedTextGenerator.Invalidate();
        component.cachedTextGeneratorForLayout.Invalidate();
        int           num        = (int)component.preferredWidth / 2 + 30;
        RectTransform component2 = this.AGS_Form.GetChild(2).GetComponent <RectTransform>();

        component2.anchoredPosition = new Vector2((float)num, component2.anchoredPosition.y);
        this.effectCompareList.Clear();
        List <LordEquipEffectSet> effList = new List <LordEquipEffectSet>();

        for (int i = 0; i < 8; i++)
        {
            if (UILordEquipSetEdit.showingSet.SerialNO[i] != 0u)
            {
                for (int j = 0; j < (int)DataManager.Instance.RoleAttr.LordEquipBagSize; j++)
                {
                    if (LordEquipData.Instance().LordEquip[j].SerialNO == UILordEquipSetEdit.showingSet.SerialNO[i])
                    {
                        UILordEquipSetEdit.SetDataIndex[i] = j;
                    }
                }
                LordEquipData.GetEffectList(LordEquipData.Instance().LordEquip[UILordEquipSetEdit.SetDataIndex[i]], effList, 0, (byte)Math.Min(5, i), true);
            }
        }
        LordEquipData.effectListAddToEffectCompareList(effList, this.effectCompareList);
        LordEquipData.EffectTitleListCreater(this.effectCompareList);
        this.ForgingIcon.gameObject.SetActive(false);
        if (this.DM.RoleAttr.LordEquipEventData.SerialNO != 0u)
        {
            for (int k = 0; k < 8; k++)
            {
                if (this.DM.RoleAttr.LordEquipEventData.SerialNO == UILordEquipSetEdit.showingSet.SerialNO[k])
                {
                    this.ForgingIcon.SetParent(this.AGS_Form.GetChild(5).GetChild(k + 16));
                    this.ForgingIcon.anchoredPosition = new Vector2(52f, -52f);
                    this.ForgingIcon.gameObject.SetActive(true);
                    break;
                }
            }
        }
        int num2;

        for (int l = 0; l < 8; l++)
        {
            if (UILordEquipSetEdit.showingSet.SerialNO[l] != 0u)
            {
                this.AGS_Form.GetChild(5).GetChild(l + 8).gameObject.SetActive(false);
                this.Equips[l].gameObject.SetActive(true);
                GUIManager.Instance.ChangeLordEquipImg(this.Equips[l].transform, LordEquipData.Instance().LordEquip[UILordEquipSetEdit.SetDataIndex[l]], eLordEquipDisplayKind.Item_Gems, false);
                this.Equips[l].GetComponent <UILEBtn>().SetCountdown(LordEquipData.Instance().LordEquip[UILordEquipSetEdit.SetDataIndex[l]].ExpireTime, false);
            }
            else
            {
                this.AGS_Form.GetChild(5).GetChild(l + 8).gameObject.SetActive(true);
                this.Equips[l].gameObject.SetActive(false);
                num2 = UILordEquipSetEdit.CheckHaveEquipKind((byte)(l + 21), false);
                if (num2 > 0)
                {
                    this.AGS_Form.GetChild(5).GetChild(l + 8).GetChild(0).gameObject.SetActive(num2 == 1);
                    this.AGS_Form.GetChild(5).GetChild(l + 8).GetChild(1).gameObject.SetActive(true);
                    this.AGS_Form.GetChild(5).GetChild(l + 8).GetChild(1).GetComponent <UISpritesArray>().SetSpriteIndex(2 - num2);
                }
                else
                {
                    this.AGS_Form.GetChild(5).GetChild(l + 8).GetChild(0).gameObject.SetActive(false);
                    this.AGS_Form.GetChild(5).GetChild(l + 8).GetChild(1).gameObject.SetActive(false);
                }
            }
        }
        num2 = UILordEquipSetEdit.CheckHaveEquipKind(26, true);
        RoleBuildingData buildData = GUIManager.Instance.BuildingData.GetBuildData(15, 0);

        if (buildData.Level >= 25)
        {
            this.usedsolt = 8;
        }
        else if (buildData.Level >= 17)
        {
            this.usedsolt = 7;
        }
        else
        {
            this.usedsolt = 6;
        }
        if (buildData.Level >= 17 && UILordEquipSetEdit.showingSet.SerialNO[6] == 0u)
        {
            this.AGS_Form.GetChild(5).GetChild(24).gameObject.SetActive(buildData.Level < 17);
            this.AGS_Form.GetChild(5).GetChild(14).GetChild(0).gameObject.SetActive(num2 == 1);
            this.AGS_Form.GetChild(5).GetChild(14).GetChild(1).gameObject.SetActive(num2 > 0);
            this.AGS_Form.GetChild(5).GetChild(14).GetChild(1).GetComponent <UISpritesArray>().SetSpriteIndex(2 - num2);
            this.AGS_Form.GetChild(5).GetChild(14).GetComponent <UIButton>().m_BtnID1 = 3;
        }
        else
        {
            this.AGS_Form.GetChild(5).GetChild(24).gameObject.SetActive(buildData.Level < 17);
            this.AGS_Form.GetChild(5).GetChild(14).GetChild(0).gameObject.SetActive(false);
            this.AGS_Form.GetChild(5).GetChild(14).GetChild(1).gameObject.SetActive(false);
            this.AGS_Form.GetChild(5).GetChild(14).GetComponent <UIButton>().m_BtnID1 = 0;
        }
        if (buildData.Level >= 25 && UILordEquipSetEdit.showingSet.SerialNO[7] == 0u)
        {
            this.AGS_Form.GetChild(5).GetChild(25).gameObject.SetActive(buildData.Level < 25);
            this.AGS_Form.GetChild(5).GetChild(15).GetChild(0).gameObject.SetActive(num2 == 1);
            this.AGS_Form.GetChild(5).GetChild(15).GetChild(1).gameObject.SetActive(num2 > 0);
            this.AGS_Form.GetChild(5).GetChild(15).GetChild(1).GetComponent <UISpritesArray>().SetSpriteIndex(2 - num2);
            this.AGS_Form.GetChild(5).GetChild(15).GetComponent <UIButton>().m_BtnID1 = 3;
        }
        else
        {
            this.AGS_Form.GetChild(5).GetChild(25).gameObject.SetActive(buildData.Level < 25);
            this.AGS_Form.GetChild(5).GetChild(15).GetChild(0).gameObject.SetActive(false);
            this.AGS_Form.GetChild(5).GetChild(15).GetChild(1).gameObject.SetActive(false);
            this.AGS_Form.GetChild(5).GetChild(15).GetComponent <UIButton>().m_BtnID1 = 0;
        }
        this.SPHeight.Clear();
        CString cstring = StringManager.Instance.StaticString1024();

        for (int m = 0; m < this.effectCompareList.Count; m++)
        {
            if (this.effectCompareList[m].isTitel)
            {
                this.SPHeight.Add(35f);
            }
            else if (this.effectCompareList[m].isNewGemEffect == 1)
            {
                cstring.ClearString();
                LordEquipData.GetNewGemEffectString(cstring, (byte)this.effectCompareList[m].EffectID, this.effectCompareList[m].EffectValue, true, 0);
                this.SPHeight.Add(this.GetTextHeight(245f, cstring, 18));
            }
            else
            {
                this.SPHeight.Add(32f);
            }
        }
        if (this.SPHeight.Count > 1)
        {
            float num3 = this.SPHeight[this.SPHeight.Count - 1];
            this.SPHeight.RemoveAt(this.SPHeight.Count - 1);
            this.SPHeight.Add(num3 + 6f);
        }
        this.AGS_Form.GetChild(6).gameObject.SetActive(true);
        this.AGS_ScrollPanel.AddNewDataHeight(this.SPHeight, true, true);
        if (!UILordEquipSetEdit.ThingsChanged)
        {
            for (int n = 0; n < UILordEquipSetEdit.showingSet.SerialNO.Length; n++)
            {
                if (UILordEquipSetEdit.showingSet.SerialNO[n] != LordEquipData.Instance().LordEquipSets[UILordEquipSetEdit.SetIdx].SerialNO[n])
                {
                    UILordEquipSetEdit.ThingsChanged = true;
                    break;
                }
            }
        }
        UIButton component3 = this.AGS_Form.GetChild(4).GetChild(1).GetComponent <UIButton>();

        component = component3.transform.GetChild(0).GetComponent <UIText>();
        if (UILordEquipSetEdit.ThingsChanged && !UILordEquipSetEdit.showingSet.isSetEmpty())
        {
            component3.image.color = Color.white;
            component3.m_BtnID1    = 1;
            component.color        = Color.white;
        }
        else
        {
            component3.image.color = Color.gray;
            component3.m_BtnID1    = 0;
            component.color        = new Color(0.898f, 0f, 0.31f);
        }
        component3 = this.AGS_Form.GetChild(4).GetChild(0).GetComponent <UIButton>();
        component  = component3.transform.GetChild(0).GetComponent <UIText>();
        if (!UILordEquipSetEdit.showingSet.isSetEmpty())
        {
            component3.image.color = Color.white;
            component3.m_BtnID1    = 2;
            component.color        = Color.white;
        }
        else
        {
            component3.image.color = Color.gray;
            component3.m_BtnID1    = 0;
            component.color        = new Color(0.898f, 0f, 0.31f);
        }
    }
Exemple #4
0
 // Token: 0x06001B46 RID: 6982 RVA: 0x003060DC File Offset: 0x003042DC
 public override void OnOpen(int arg1, int arg2)
 {
     this.DM   = DataManager.Instance;
     this.GUIM = GUIManager.Instance;
     this.door = (this.GUIM.FindMenu(EGUIWindow.Door) as Door);
     this.B_ID = arg1;
     for (int i = 0; i < 3; i++)
     {
         this.m_ItemName[i] = this.DM.mStringTable.GetStringByID((uint)(7402 + i));
     }
     this.GameT   = base.gameObject.transform;
     this.BG_T    = this.GameT.GetChild(0);
     this.timeBar = this.BG_T.GetChild(0).GetComponent <UITimeBar>();
     if (this.DM.queueBarData[18].bActive)
     {
         this.begin  = this.DM.queueBarData[18].StartTime;
         this.target = this.begin + (long)((ulong)this.DM.queueBarData[18].TotalTime);
         this.GUIM.CreateTimerBar(this.timeBar, this.begin, this.target, 0L, eTimeBarType.CancelType, this.DM.mStringTable.GetStringByID(261u), this.DM.mStringTable.GetStringByID(261u));
         this.timeBar.gameObject.SetActive(true);
         this.Forging = true;
     }
     else
     {
         this.GUIM.CreateTimerBar(this.timeBar, 0L, 0L, 0L, eTimeBarType.CancelType, string.Empty, string.Empty);
         this.timeBar.gameObject.SetActive(false);
     }
     this.GUIM.SetTimerSpriteType(this.timeBar, eTimerSpriteType.Speed);
     this.text_timeBar[0]            = this.BG_T.GetChild(0).GetChild(2).GetComponent <UIText>();
     this.text_timeBar[1]            = this.BG_T.GetChild(0).GetChild(3).GetComponent <UIText>();
     this.timeBar.m_Handler          = this;
     this.timeBar.m_TimeBarID        = 1;
     this.btn_Magnifier              = this.BG_T.GetChild(1).GetComponent <UIButton>();
     this.btn_Magnifier.m_Handler    = this;
     this.btn_Magnifier.m_BtnID1     = 1;
     this.btn_Magnifier.m_EffectType = e_EffectType.e_Scale;
     this.btn_Magnifier.transition   = Selectable.Transition.None;
     this.btn_Magnifier.gameObject.SetActive(this.DM.RoleAttr.LordEquipEventData.ItemID != 0);
     this.text_tmpStr[0]      = this.BG_T.GetChild(2).GetComponent <UIText>();
     this.text_tmpStr[0].font = this.TTFont;
     if (this.GUIM.BuildingData.AllBuildsData[this.B_ID].Level < 17)
     {
         this.text_tmpStr[0].text = this.DM.mStringTable.GetStringByID(7401u);
     }
     else
     {
         this.text_tmpStr[0].text = this.DM.mStringTable.GetStringByID(7496u);
     }
     this.m_ScrollPanel = this.GameT.GetChild(1).GetComponent <ScrollPanel>();
     this.Item_T        = this.GameT.GetChild(2);
     for (int j = 0; j < 3; j++)
     {
         UIButton component = this.Item_T.GetChild(j).GetComponent <UIButton>();
         component.m_Handler          = this;
         component.m_BtnID1           = 2 + j;
         component.SoundIndex         = 64;
         component.m_EffectType       = e_EffectType.e_Scale;
         component.transition         = Selectable.Transition.None;
         this.text_tmpStr[1 + j]      = this.Item_T.GetChild(j).GetChild(0).GetChild(0).GetComponent <UIText>();
         this.text_tmpStr[1 + j].font = this.TTFont;
         this.text_tmpStr[1 + j].text = this.m_ItemName[j];
     }
     for (int k = 0; k < 1; k++)
     {
         this.tmplist.Add(227f);
     }
     this.m_ScrollPanel.IntiScrollPanel(285f, 0f, 0f, this.tmplist, 1, this);
     this.m_ScrollRect = this.m_ScrollPanel.GetComponent <CScrollRect>();
     this.BG1_T        = this.GameT.GetChild(3);
     if (this.DM.mLordEquip == null)
     {
         this.DM.mLordEquip = LordEquipData.Instance();
     }
     if (this.DM.mLordEquip.isEquipEvoReady)
     {
         this.Img_isEquipEvoReady.gameObject.SetActive(true);
     }
     else
     {
         this.Img_isEquipEvoReady.gameObject.SetActive(false);
     }
     this.GUIM.UpdateUI(EGUIWindow.Door, 1, 2);
     NewbieManager.CheckTeach(ETeachKind.SMITH, null, true);
 }
Exemple #5
0
    // Token: 0x06001B6A RID: 7018 RVA: 0x003099DC File Offset: 0x00307BDC
    public override void OnOpen(int arg1, int arg2)
    {
        this.DM   = DataManager.Instance;
        this.GUIM = GUIManager.Instance;
        if (this.DM.mLordEquip == null)
        {
            this.DM.mLordEquip = LordEquipData.Instance();
        }
        if (!this.DM.mLordEquip.LoadLordEquip(false))
        {
            this.bEqDataReq = true;
            if (!this.DM.mLordEquip.LoadLEMaterial(false))
            {
                this.bMaterialDataReq = true;
            }
        }
        for (int i = 0; i < 6; i++)
        {
            this.tmpImg_Items[i]      = new Image[4];
            this.text_ItemEffect[i]   = new UIText[6];
            this.text_ItemEffect_V[i] = new UIText[6];
            this.Cstr_Effect[i]       = new CString[6];
            this.Cstr_Effect_V[i]     = new CString[6];
            for (int j = 0; j < 6; j++)
            {
                this.Cstr_Effect[i][j]   = StringManager.Instance.SpawnString(30);
                this.Cstr_Effect_V[i][j] = StringManager.Instance.SpawnString(30);
            }
            this.Cstr_ItemLv[i]   = StringManager.Instance.SpawnString(100);
            this.Cstr_ItemName[i] = StringManager.Instance.SpawnString(30);
        }
        this.Cstr_Filter = StringManager.Instance.SpawnString(30);
        ushort indexByKey  = this.DM.EquipTable.GetIndexByKey(4001);
        ushort indexByKey2 = this.DM.EquipTable.GetIndexByKey(5000);

        for (int k = (int)indexByKey; k < (int)indexByKey2; k++)
        {
            this.tmpEQ = this.DM.EquipTable.GetRecordByIndex((int)((ushort)k));
            switch (this.tmpEQ.EquipKind)
            {
            case 21:
                this.tmplistHead.Add((ushort)k);
                break;

            case 22:
                this.tmplistBody.Add((ushort)k);
                break;

            case 23:
                this.tmplistshoe.Add((ushort)k);
                break;

            case 24:
                this.tmplistArms.Add((ushort)k);
                break;

            case 25:
                this.tmplistSecondArms.Add((ushort)k);
                break;

            case 26:
                this.tmplistAccessories.Add((ushort)k);
                break;
            }
        }
        this.door                = (this.GUIM.FindMenu(EGUIWindow.Door) as Door);
        this.GameT               = base.gameObject.transform;
        this.m_Mat               = this.door.LoadMaterial();
        this.SArray              = this.GameT.GetComponent <UISpritesArray>();
        this.Tmp                 = this.GameT.GetChild(0).GetChild(0).GetChild(0);
        this.text_tmpStr[0]      = this.Tmp.GetComponent <UIText>();
        this.text_tmpStr[0].font = this.TTFont;
        this.text_tmpStr[0].text = this.DM.mStringTable.GetStringByID(7402u);
        this.Tmp                 = this.GameT.GetChild(1);
        this.BG               = this.Tmp.GetComponent <Image>();
        this.Tmp              = this.GameT.GetChild(1).GetChild(0);
        this.text_Select      = this.Tmp.GetComponent <UIText>();
        this.text_Select.font = this.TTFont;
        this.text_Select.text = this.DM.mStringTable.GetStringByID(7405u);
        this.Tmp              = this.GameT.GetChild(2);
        Transform child = this.Tmp.GetChild(0).GetChild(0);

        this.text_tmpStr[1]      = child.GetComponent <UIText>();
        this.text_tmpStr[1].font = this.TTFont;
        this.text_tmpStr[1].text = this.DM.mStringTable.GetStringByID(7406u);
        child = this.Tmp.GetChild(1).GetChild(0);
        this.text_tmpStr[2]      = child.GetComponent <UIText>();
        this.text_tmpStr[2].font = this.TTFont;
        this.text_tmpStr[2].text = this.DM.mStringTable.GetStringByID(7407u);
        child = this.Tmp.GetChild(2).GetChild(0);
        this.text_tmpStr[3]      = child.GetComponent <UIText>();
        this.text_tmpStr[3].font = this.TTFont;
        this.text_tmpStr[3].text = this.DM.mStringTable.GetStringByID(7408u);
        for (int l = 0; l < 6; l++)
        {
            child                          = this.Tmp.GetChild(3 + l);
            this.btn_Equip[l]              = child.GetComponent <UIButton>();
            this.btn_Equip[l].m_Handler    = this;
            this.btn_Equip[l].m_BtnID1     = 1 + l;
            this.btn_Equip[l].m_EffectType = e_EffectType.e_Scale;
            this.btn_Equip[l].transition   = Selectable.Transition.None;
        }
        for (int m = 0; m < 6; m++)
        {
            child                          = this.Tmp.GetChild(9 + m);
            this.btn_RC[m]                 = child.GetComponent <RectTransform>();
            this.btn_Color[m]              = child.GetComponent <UIButton>();
            this.btn_Color[m].m_Handler    = this;
            this.btn_Color[m].m_BtnID1     = 7 + m;
            this.btn_Color[m].m_EffectType = e_EffectType.e_Scale;
            this.btn_Color[m].transition   = Selectable.Transition.None;
            this.Img_RC[m]                 = child.GetChild(0).GetComponent <RectTransform>();
        }
        this.SelectEquipT    = this.Tmp.GetChild(3).GetChild(0);
        this.Img_SelectEquip = this.Tmp.GetChild(3).GetChild(0).GetComponent <Image>();
        this.SelectColorT    = this.Tmp.GetChild(9).GetChild(1);
        this.Img_SelectColor = this.Tmp.GetChild(9).GetChild(1).GetComponent <Image>();
        if (this.DM.mLordEquip != null && this.DM.mLordEquip.IsCheckTechLevel())
        {
            this.mColor = 5;
            for (int n = 0; n < 5; n++)
            {
                this.btn_RC[n].sizeDelta        = new Vector2(51f, 51f);
                this.btn_RC[n].anchoredPosition = new Vector2(this.btn_RC[n].anchoredPosition.x - 10f - (float)(6 * n), this.btn_RC[n].anchoredPosition.y);
                this.Img_RC[n].sizeDelta        = new Vector2(51f, 51f);
            }
            this.Img_SelectColor.rectTransform.sizeDelta = new Vector2(64f, 64f);
            this.btn_Color[5].gameObject.SetActive(true);
        }
        child                       = this.Tmp.GetChild(15);
        this.btn_LvFilter           = child.GetComponent <UIButton>();
        this.btn_LvFilter.m_Handler = this;
        this.btn_LvFilter.m_BtnID1  = 13;
        child                       = this.Tmp.GetChild(15).GetChild(0);
        this.Img_Yes                = child.GetComponent <Image>();
        if (this.GUIM.IsArabic)
        {
            this.Img_Yes.gameObject.AddComponent <ArabicItemTextureRot>();
        }
        child = this.Tmp.GetChild(15).GetChild(1);
        this.text_tmpStr[4]      = child.GetComponent <UIText>();
        this.text_tmpStr[4].font = this.TTFont;
        this.text_tmpStr[4].text = this.DM.mStringTable.GetStringByID(7409u);
        child                     = this.Tmp.GetChild(16);
        this.btn_Filter           = child.GetComponent <UIButton>();
        this.btn_Filter.m_Handler = this;
        this.btn_Filter.m_BtnID1  = 14;
        child                     = this.Tmp.GetChild(16).GetChild(2);
        this.text_Filter[0]       = child.GetComponent <UIText>();
        this.text_Filter[0].font  = this.TTFont;
        this.text_Filter[0].text  = this.DM.mStringTable.GetStringByID(7427u);
        child                     = this.Tmp.GetChild(16).GetChild(3);
        this.text_Filter[1]       = child.GetComponent <UIText>();
        this.text_Filter[1].font  = this.TTFont;
        this.text_Filter[1].text  = this.DM.mStringTable.GetStringByID(7464u);
        child                     = this.Tmp.GetChild(17);
        UIButton component = child.GetComponent <UIButton>();

        component.m_Handler    = this;
        component.m_BtnID1     = 14;
        component.m_EffectType = e_EffectType.e_Scale;
        component.transition   = Selectable.Transition.None;
        this.Tmp           = this.GameT.GetChild(3);
        this.m_ScrollPanel = this.Tmp.GetComponent <ScrollPanel>();
        this.Tmp           = this.GameT.GetChild(4);
        child                   = this.Tmp.GetChild(2);
        this.tmpLebtn           = child.GetComponent <UILEBtn>();
        this.tmpLebtn.m_Handler = this;
        this.GUIM.InitLordEquipImg(this.tmpLebtn.transform, 0, 0, eLordEquipDisplayKind.OnlyItem, false, true, 0, 0, 0, 0, 0, false);
        this.tmpLebtn.transition = Selectable.Transition.None;
        child       = this.Tmp.GetChild(3).GetChild(5);
        this.tmpImg = child.GetComponent <Image>();
        if (this.GUIM.IsArabic)
        {
            this.tmpImg.gameObject.AddComponent <ArabicItemTextureRot>();
        }
        child = this.Tmp.GetChild(3).GetChild(6);
        UIText component2 = child.GetComponent <UIText>();

        component2.font        = this.TTFont;
        child                  = this.Tmp.GetChild(3).GetChild(7);
        component2             = child.GetComponent <UIText>();
        component2.font        = this.TTFont;
        child                  = this.Tmp.GetChild(3).GetChild(8);
        component2             = child.GetComponent <UIText>();
        component2.font        = this.TTFont;
        child                  = this.Tmp.GetChild(4);
        component              = child.GetComponent <UIButton>();
        component.m_Handler    = this;
        component.m_BtnID1     = 15;
        component.m_EffectType = e_EffectType.e_Scale;
        component.transition   = Selectable.Transition.None;
        child                  = this.Tmp.GetChild(4).GetChild(0);
        component2             = child.GetComponent <UIText>();
        component2.font        = this.TTFont;
        component2.text        = this.DM.mStringTable.GetStringByID(7410u);
        for (int num = 0; num < 6; num++)
        {
            child           = this.Tmp.GetChild(6 + num).GetChild(0);
            component2      = child.GetComponent <UIText>();
            component2.font = this.TTFont;
            child           = this.Tmp.GetChild(6 + num).GetChild(1);
            component2      = child.GetComponent <UIText>();
            component2.font = this.TTFont;
        }
        this.tmplist.Clear();
        for (int num2 = 0; num2 < 6; num2++)
        {
            this.tmplist.Add(212f);
        }
        this.m_ScrollPanel.IntiScrollPanel(490f, 11f, 0f, this.tmplist, 6, this);
        this.tmpImg          = this.GameT.GetChild(5).GetComponent <Image>();
        this.tmpImg.sprite   = this.door.LoadSprite("UI_main_close_base");
        this.tmpImg.material = this.m_Mat;
        if (this.GUIM.bOpenOnIPhoneX)
        {
            this.tmpImg.enabled = false;
        }
        this.btn_EXIT                = this.GameT.GetChild(5).GetChild(0).GetComponent <UIButton>();
        this.btn_EXIT.m_Handler      = this;
        this.btn_EXIT.m_BtnID1       = 0;
        this.btn_EXIT.image.sprite   = this.door.LoadSprite("UI_main_close");
        this.btn_EXIT.image.material = this.m_Mat;
        this.btn_EXIT.m_EffectType   = e_EffectType.e_Scale;
        this.btn_EXIT.transition     = Selectable.Transition.None;
        if (this.bEqDataReq && this.bMaterialDataReq)
        {
            this.CheckReOpen();
        }
        this.GUIM.UpdateUI(EGUIWindow.Door, 1, 2);
    }
Exemple #6
0
    // Token: 0x06001173 RID: 4467 RVA: 0x001E8F74 File Offset: 0x001E7174
    public override void Update(byte meg)
    {
        DataManager instance     = DataManager.Instance;
        BuildsData  buildingData = GUIManager.Instance.BuildingData;

        switch (meg)
        {
        case 0:
            this.PromptRender.enabled = false;
            this.LevelRender.enabled  = false;
            this.UpgradeRender.gameObject.SetActive(false);
            return;

        case 1:
            this.UpdateTime = 0f;
            MotionEffect.SetStack(this.OpenUIMotion);
            GUIManager.Instance.ShowUILock(EUILock.Normal);
            break;

        case 2:
            if (this.EffectBuilding == null)
            {
                Vector3 localPosition = this.spriteRender.transform.localPosition;
                if (buildingData.AllBuildsData[(int)this.Index].BuildID == 8)
                {
                    localPosition.y     = 20.5f;
                    this.EffectBuilding = ParticleManager.Instance.Spawn(345, null, localPosition, 0.8f, true, false, true);
                }
                else
                {
                    localPosition.y    += 8.9f;
                    this.EffectBuilding = ParticleManager.Instance.Spawn(293, null, localPosition, 0.8f, true, false, true);
                }
                Quaternion localRotation = this.EffectBuilding.transform.localRotation;
                localRotation.eulerAngles = new Vector3(0f, 180f, 0f);
                this.EffectBuilding.transform.localRotation = localRotation;
            }
            this.markspriteRender.enabled = false;
            buildingData.GetBuildSprite(this.Index, this.spriteRender, this.LevelRender);
            this.Update(5);
            this.markspriteRender.enabled = true;
            buildingData.GetBuildSprite(this.Index, this.spriteRender, this.LevelRender);
            break;

        case 3:
        case 4:
            if (this.EffectBuilding != null)
            {
                ParticleManager.Instance.DeSpawn(this.EffectBuilding);
                this.EffectBuilding = null;
            }
            this.markspriteRender.enabled = false;
            buildingData.GetBuildSprite(this.Index, this.spriteRender, this.LevelRender);
            if (buildingData.AllBuildsData[(int)this.Index].BuildID == 11)
            {
                buildingData.ManorGride[6] = this.spriteRender.transform;
                buildingData.GuideParm     = this.Index;
                NewbieManager.CheckTroopMemory(false);
            }
            this.Update(5);
            this.Update(9);
            if (!this.UpgradeRender.gameObject.activeSelf)
            {
                this.UpgradeRender.gameObject.gameObject.SetActive(true);
            }
            break;

        case 5:
        {
            this.PromptRender.transform.localScale = Vector3.one;
            this.PromptRender.sprite = null;
            Vector3 localPosition2 = new Vector3(0f, this.spriteRender.renderer.bounds.size.y * 0.0703125f, 0f);
            if (buildingData.AllBuildsData.Length > (int)this.Index)
            {
                if (!instance.MySysSetting.bShowTrainingIdle)
                {
                    ushort buildID = buildingData.AllBuildsData[(int)this.Index].BuildID;
                    switch (buildID)
                    {
                    case 12:
                        this.PromptRender.transform.localScale *= 0.8f;
                        if (instance.TrapHospitalTotal > 0u)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_01");
                        }
                        break;

                    default:
                        if (buildID == 7)
                        {
                            if (instance.HospitalTotal > 0u)
                            {
                                this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_01");
                            }
                        }
                        break;

                    case 14:
                        if (instance.TotalSoldier_Embassy > 0u)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_11");
                        }
                        break;

                    case 16:
                        if (GUIManager.Instance.BuildingData.GetBuildData(8, 0).Level < 17)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_07");
                        }
                        else if (instance.m_CryptData.money > 0 && instance.m_CryptData.startTime + (long)((ulong)GameConstants.CryptSecends[(int)instance.m_CryptData.kind]) - instance.ServerTime <= 0L)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_06");
                        }
                        break;

                    case 18:
                        if (instance.PrisonerNum > 0)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("imprisoned_lords");
                            localPosition2.Set(-0.33f, 1.38f, 0f);
                        }
                        break;

                    case 20:
                        if (PetManager.Instance.CheckPetListBuildMark())
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_09");
                        }
                        break;

                    case 23:
                        if (PetManager.Instance.m_AllPetTrainState == PetManager.EPetTrainDataState.CanReceive)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_09");
                        }
                        break;
                    }
                }
                else
                {
                    switch (buildingData.AllBuildsData[(int)this.Index].BuildID)
                    {
                    case 6:
                        if (!instance.queueBarData[10].bActive && buildingData.AllBuildsData[(int)this.Index].Level > 0)
                        {
                            uint num = instance.AttribVal.TotalOuterSoldier + (uint)instance.SoldierTotal;
                            for (int i = 0; i < 16; i++)
                            {
                                num += instance.mSoldier_Hospital[i];
                            }
                            if (num < 4200000000u)
                            {
                                this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_02");
                            }
                        }
                        break;

                    case 7:
                        if (instance.HospitalTotal > 0u)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_01");
                        }
                        break;

                    case 10:
                        if (!instance.queueBarData[1].bActive && buildingData.AllBuildsData[(int)this.Index].Level > 0)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_04");
                        }
                        break;

                    case 12:
                        this.PromptRender.transform.localScale *= 0.8f;
                        if (instance.TrapHospitalTotal > 0u)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_01");
                        }
                        else if (!instance.queueBarData[14].bActive && (instance.GetTechLevel(11) > 0 || instance.GetTechLevel(12) > 0 || instance.GetTechLevel(13) > 0) && instance.AttribVal.GetEffectBaseVal(GATTR_ENUM.EGA_TRAP_CAPACITY) > instance.TrapTotal)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_03");
                        }
                        break;

                    case 14:
                        if (instance.TotalSoldier_Embassy > 0u)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_11");
                        }
                        break;

                    case 16:
                        if (GUIManager.Instance.BuildingData.GetBuildData(8, 0).Level < 17)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_07");
                        }
                        else if (instance.m_CryptData.money == 0)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_05");
                        }
                        else if (instance.m_CryptData.startTime + (long)((ulong)GameConstants.CryptSecends[(int)instance.m_CryptData.kind]) - instance.ServerTime <= 0L)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_06");
                        }
                        break;

                    case 18:
                        if (instance.PrisonerNum > 0)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("imprisoned_lords");
                            localPosition2.Set(-0.33f, 1.38f, 0f);
                        }
                        break;

                    case 20:
                        if (PetManager.Instance.CheckPetListBuildMark())
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_09");
                        }
                        break;

                    case 22:
                        if (!instance.queueBarData[34].bActive && buildingData.AllBuildsData[(int)this.Index].Level > 0)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_10");
                        }
                        break;

                    case 23:
                        if (PetManager.Instance.m_AllPetTrainState == PetManager.EPetTrainDataState.CanReceive)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_09");
                        }
                        else if (PetManager.Instance.m_AllPetTrainState == PetManager.EPetTrainDataState.Empty && buildingData.AllBuildsData[(int)this.Index].Level > 0)
                        {
                            this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_10");
                        }
                        break;
                    }
                }
                if (instance.MySysSetting.bShowEquipUp && !instance.queueBarData[18].bActive && buildingData.AllBuildsData[(int)this.Index].BuildID == 15)
                {
                    if (LordEquipData.Instance().isEquipEvoReady)
                    {
                        this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_09");
                    }
                }
                else if (buildingData.AllBuildsData[(int)this.Index].BuildID == 8 && buildingData.castleSkin.CheckShowCastleSkin() && buildingData.castleSkin.CheckShowExclamation(true))
                {
                    this.PromptRender.sprite = this.mapspriteManager.GetSpriteByName("prompt_09");
                    localPosition2.Set(0.64f, 2.51f, 0f);
                }
            }
            else
            {
                this.UpdateExtendBuildPrompt(this.Index, ref localPosition2);
            }
            if (this.PromptRender.sprite != null)
            {
                this.PromptRender.transform.localPosition = localPosition2;
                this.PromptRender.enabled = this.spriteRender.enabled;
            }
            else
            {
                this.PromptRender.enabled = false;
            }
            break;
        }

        case 8:
            if (instance.MySysSetting.bShowBuildUp && this.CheckUpdateRes <= 1 && buildingData.BuildingManorID == 0 && (int)this.Index < buildingData.AllBuildsData.Length && buildingData.AllBuildsData[(int)this.Index].BuildID > 0 && buildingData.AllBuildsData[(int)this.Index].Level < buildingData.BuildlevelupCheck[(int)buildingData.AllBuildsData[(int)this.Index].BuildID])
            {
                this.UpgradeRender.enabled = true;
            }
            else
            {
                this.UpgradeRender.enabled = false;
            }
            break;

        case 9:
            if (!instance.MySysSetting.bShowBuildUp || buildingData.AllBuildsData[(int)this.Index].BuildID == 0 || buildingData.BuildingManorID > 0 || ((int)this.Index < buildingData.AllBuildsData.Length && buildingData.AllBuildsData[(int)this.Index].BuildID == 16 && buildingData.AllBuildsData[(int)this.Index].Level == 9))
            {
                this.UpgradeRender.enabled = false;
            }
            else
            {
                if (buildingData.AllBuildsData[(int)this.Index].Level < 25)
                {
                    this.CheckUpdateRes = buildingData.CheckLevelupRule(buildingData.AllBuildsData[(int)this.Index].BuildID, buildingData.AllBuildsData[(int)this.Index].Level + 1);
                }
                else
                {
                    this.CheckUpdateRes = 2;
                }
                if (this.CheckUpdateRes == 0)
                {
                    this.UpgradeRender.enabled = true;
                }
                else
                {
                    this.UpgradeRender.enabled = false;
                }
            }
            break;

        case 12:
            this.SetSprite(this.Index, 0);
            break;
        }
        if ((int)this.Index < buildingData.AllBuildsData.Length && buildingData.AllBuildsData[(int)this.Index].BuildID > 0)
        {
            this.LevelRender.enabled = !this.markspriteRender.enabled;
        }
    }
Exemple #7
0
    // Token: 0x06002BF5 RID: 11253 RVA: 0x00484354 File Offset: 0x00482554
    public override void UpdateNetwork(byte[] meg)
    {
        base.UpdateNetwork(meg);
        NetworkNews networkNews = (NetworkNews)meg[0];

        switch (networkNews)
        {
        case NetworkNews.Refresh_Item:
        {
            Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door;
            if (this.Speedup.UseTarget == _UseItemTarget.Rally)
            {
                this.UpdateSpeedupItem(true);
            }
            else if (this.Speedup.QueueBar == 30)
            {
                door.GoToGroup(8, 0, true);
                door.CloseMenu(false);
            }
            else if (this.Speedup.QueueBar >= 2 && this.Speedup.QueueBar <= 9)
            {
                door.GoToGroup((int)(this.Speedup.QueueBar - 2), 0, true);
                door.CloseMenu(false);
            }
            else if (this.Speedup.Rally == 2 && this.Speedup.QueueBar >= 22 && this.Speedup.QueueBar <= 29)
            {
                door.GoToGroup((int)(this.Speedup.QueueBar - 22), 0, true);
                door.CloseMenu(false);
            }
            else
            {
                this.UpdateSpeedupItem(true);
            }
            break;
        }

        default:
            if (networkNews != NetworkNews.Login)
            {
                if (networkNews != NetworkNews.Refresh_QBarTime)
                {
                    if (networkNews == NetworkNews.Refresh_FontTextureRebuilt)
                    {
                        if (this.timebar != null)
                        {
                            this.timebar.Refresh_FontTexture();
                        }
                    }
                }
                else if (this.Speedup.Rally > 0)
                {
                    if (this.Speedup.StartTime + (long)((ulong)this.Speedup.TotalTime) < DataManager.Instance.ServerTime)
                    {
                        Door door2 = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door;
                        door2.CloseMenu(false);
                        return;
                    }
                    GUIManager.Instance.SetTimerBar(this.timebar, this.Speedup.StartTime, this.Speedup.StartTime + (long)((ulong)this.Speedup.TotalTime), 0L, eTimeBarType.SpeedupType, this.timebar.m_Titles[0], this.timebar.m_Titles[1]);
                    this.UpdateTime(true);
                    this.UpdateSpeedupItem(true);
                    return;
                }
                else
                {
                    if (this.QueueBar >= (EQueueBarIndex)DataManager.Instance.queueBarData.Length)
                    {
                        return;
                    }
                    this.UpdateQueuebarTime();
                }
            }
            else
            {
                this.BuyAndUse = 0;
                if (this.Speedup.UseTarget == _UseItemTarget.Rally)
                {
                    Door door3 = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door;
                    door3.CloseMenu(true);
                }
                else if (this.Speedup.UseTarget == _UseItemTarget.SunLordequip)
                {
                    LordEquipData.Instance().LoadLordEquip(false);
                }
                else
                {
                    DataManager.Instance.SortResourceFilterData();
                    this.UpdateSpeedupItem(true);
                }
                this.UpdateQueuebarTime();
                this.CheckHelpbarShow();
            }
            break;

        case NetworkNews.Refresh_Alliance:
            this.CheckHelpbarShow();
            break;
        }
    }