Ejemplo n.º 1
0
    // Token: 0x06002144 RID: 8516 RVA: 0x003F5550 File Offset: 0x003F3750
    public override void UpdateNetwork(byte[] meg)
    {
        NetworkNews networkNews = (NetworkNews)meg[0];

        switch (networkNews)
        {
        case NetworkNews.Refresh_FontTextureRebuilt:
            this.Refresh_FontTexture();
            break;

        default:
            if (networkNews == NetworkNews.Login)
            {
                if ((ActivityManager.Instance.AW_State == EAllianceWarState.EAWS_None || DataManager.Instance.RoleAlliance.Id == 0u) && this.door != null)
                {
                    this.door.CloseMenu(false);
                }
            }
            break;

        case NetworkNews.Refresh_AllianceWarRound:
            UI_AlliWarSchedule.RequestScheduleData();
            break;

        case NetworkNews.Refresh_RecvAllianceInfo:
            UI_AlliWarSchedule.RequestScheduleData();
            break;
        }
    }
Ejemplo n.º 2
0
 // Token: 0x0600214E RID: 8526 RVA: 0x003F66E8 File Offset: 0x003F48E8
 private void Update()
 {
     if (this.bExit && this.door != null)
     {
         this.door.CloseMenu(false);
         this.bExit = false;
         return;
     }
     if (this.WinnerEff.IO != 0)
     {
         if (this.WinnerEff.RotateingLight != null)
         {
             this.WinnerEff.RotateingLight.Rotate(0f, 0f, Time.deltaTime * 20f, Space.Self);
         }
         if (this.WinnerEff.lightBox != null)
         {
             Color color = this.WinnerEff.lightBox.color;
             float num   = color.a;
             num += (float)this.WinnerEff.lightBoxStep * Time.deltaTime * 0.5f;
             if (num < 0.3f || num > 1f)
             {
                 this.WinnerEff.lightBoxStep = this.WinnerEff.lightBoxStep * -1;
                 num = Mathf.Clamp(num, 0.3f, 1f);
             }
             color.a = num;
             this.WinnerEff.lightBox.color = color;
         }
     }
     if (UI_AlliWarSchedule.Reconnect && Time.time - UI_AlliWarSchedule.ReconnectTimeCache >= 3f)
     {
         UI_AlliWarSchedule.RequestScheduleData();
         UI_AlliWarSchedule.ReconnectTimeCache = Time.time;
         UI_AlliWarSchedule.Reconnect          = false;
     }
 }
Ejemplo n.º 3
0
    // Token: 0x06002153 RID: 8531 RVA: 0x003F6E14 File Offset: 0x003F5014
    public static void RespSchedule(MessagePacket MP)
    {
        GUIManager.Instance.HideUILock(EUILock.AWS_Schedule);
        byte b = MP.ReadByte(-1);

        if (b == 0)
        {
            int num = (int)MP.ReadByte(-1);
            num = Mathf.Clamp(num, 0, 4);
            UI_AlliWarSchedule.Step = (UI_AlliWarSchedule.EAWSFightStep)num;
            Array.Clear(UI_AlliWarSchedule.AllianceData, 0, 16);
            Array.Clear(UI_AlliWarSchedule.FightData, 0, 15);
            for (int i = 0; i < 16; i++)
            {
                int num2 = UI_AlliWarSchedule.NodePos_S2C[i];
                UI_AlliWarSchedule.AllianceData[num2].ID     = MP.ReadUInt(-1);
                UI_AlliWarSchedule.AllianceData[num2].Emblem = MP.ReadUShort(-1);
                UI_AlliWarSchedule.AllianceData[num2].Tag    = MP.ReadString(3, -1);
            }
            for (int j = 0; j < 15; j++)
            {
                int num3 = UI_AlliWarSchedule.LinePos_S2C[j];
                UI_AlliWarSchedule.FightData[num3].Winner         = MP.ReadByte(-1);
                UI_AlliWarSchedule.FightData[num3].Alliance1Index = UI_AlliWarSchedule.NodePosS2C(MP.ReadByte(-1));
                UI_AlliWarSchedule.FightData[num3].Alliance2Index = UI_AlliWarSchedule.NodePosS2C(MP.ReadByte(-1));
                UI_AlliWarSchedule.FightData[num3].Score1         = MP.ReadByte(-1);
                UI_AlliWarSchedule.FightData[num3].Score2         = MP.ReadByte(-1);
                if (j == 1)
                {
                    byte b2 = UI_AlliWarSchedule.FightData[num3].Alliance1Index;
                    UI_AlliWarSchedule.FightData[num3].Alliance1Index = UI_AlliWarSchedule.FightData[num3].Alliance2Index;
                    UI_AlliWarSchedule.FightData[num3].Alliance2Index = b2;
                    b2 = UI_AlliWarSchedule.FightData[num3].Score1;
                    UI_AlliWarSchedule.FightData[num3].Score1 = UI_AlliWarSchedule.FightData[num3].Score2;
                    UI_AlliWarSchedule.FightData[num3].Score2 = b2;
                }
            }
            if (GUIManager.Instance.FindMenu(EGUIWindow.UI_AlliWarSchedule))
            {
                GUIManager.Instance.UpdateUI(EGUIWindow.UI_AlliWarSchedule, 0, 0);
            }
            else
            {
                Door door = GUIManager.Instance.FindMenu(EGUIWindow.Door) as Door;
                if (door != null)
                {
                    door.OpenMenu(EGUIWindow.UI_AlliWarSchedule, 0, 0, false);
                }
            }
        }
        else if (b == 1 && DataManager.Instance.RoleAlliance.Id != 0u)
        {
            UI_AlliWarSchedule.Reconnect = true;
        }
    }
Ejemplo n.º 4
0
    // Token: 0x06002143 RID: 8515 RVA: 0x003F4FDC File Offset: 0x003F31DC
    public override void OnOpen(int arg1, int arg2)
    {
        this.door = (Door)GUIManager.Instance.FindMenu(EGUIWindow.Door);
        Font ttffont = GUIManager.Instance.GetTTFFont();

        this.AGS_Form                 = base.transform;
        this.AGS_SpriteArray          = this.AGS_Form.GetChild(0).GetComponent <UISpritesArray>();
        this.AGS_SpriteArray2         = this.AGS_Form.GetChild(1).GetComponent <UISpritesArray>();
        this.WinnerEff.IO             = 0;
        this.WinnerEff.EffectNode1    = this.AGS_Form.GetChild(2).GetChild(0);
        this.WinnerEff.RotateingLight = this.WinnerEff.EffectNode1.GetChild(2);
        this.WinnerEff.RotateingLight.GetComponent <Image>().color = new Color32(byte.MaxValue, 216, 98, byte.MaxValue);
        this.WinnerEff.EffectNode2            = this.AGS_Form.GetChild(2).GetChild(9);
        this.WinnerEff.lightBox               = this.WinnerEff.EffectNode2.GetComponent <Image>();
        this.WinnerEff.lightBoxStep           = -1;
        this.WinnerEff.EffectNode1.localScale = Vector3.zero;
        this.WinnerEff.EffectNode2.localScale = Vector3.zero;
        for (int i = 0; i < 16; i++)
        {
            UI_AlliWarSchedule.AWS_NodeData aws_NodeData = this.InitNode(this.Top16Nodes, i, this.AGS_Form.GetChild(2).GetChild(1));
        }
        for (int j = 0; j < 8; j++)
        {
            UI_AlliWarSchedule.AWS_NodeData aws_NodeData2 = this.InitNode(this.Top8Nodes, j, this.AGS_Form.GetChild(2).GetChild(2));
            this.InitLine(this.Top16Lines, j, this.Top16Nodes, (byte)j, null, this.AGS_Form.GetChild(2).GetChild(5), UI_AlliWarSchedule.EAWSLineStyle.Vertical);
        }
        for (int k = 0; k < 4; k++)
        {
            UI_AlliWarSchedule.AWS_NodeData aws_NodeData3 = this.InitNode(this.Top4Nodes, k, this.AGS_Form.GetChild(2).GetChild(3));
            this.InitLine(this.Top8Lines, k, this.Top8Nodes, (byte)(8 + k), this.Top16Lines, this.AGS_Form.GetChild(2).GetChild(6), UI_AlliWarSchedule.EAWSLineStyle.Vertical);
        }
        for (int l = 0; l < 2; l++)
        {
            UI_AlliWarSchedule.AWS_NodeData aws_NodeData4 = this.InitNode(this.Top2Nodes, l, this.AGS_Form.GetChild(2).GetChild(4));
            this.InitLine(this.Top4Lines, l, this.Top4Nodes, (byte)(12 + l), this.Top8Lines, this.AGS_Form.GetChild(2).GetChild(7), UI_AlliWarSchedule.EAWSLineStyle.Horizontal);
        }
        this.InitLine(this.Top2Lines, 0, this.Top2Nodes, 14, this.Top4Lines, this.AGS_Form.GetChild(2).GetChild(8), UI_AlliWarSchedule.EAWSLineStyle.Vertical);
        this.Top2Lines[0].Score.rectTransform.localPosition = new Vector3(this.Top2Lines[0].Score.rectTransform.localPosition.x, this.Top2Lines[0].Score.rectTransform.localPosition.y - 2f, this.Top2Lines[0].Score.rectTransform.localPosition.z);
        this.Notes      = this.AGS_Form.GetChild(2).GetChild(10).GetComponent <UIText>();
        this.Notes.font = ttffont;
        this.Title      = this.AGS_Form.GetChild(3).GetChild(0).GetComponent <UIText>();
        this.Title.font = ttffont;
        this.Title.text = DataManager.Instance.mStringTable.GetStringByID(17501u);
        Image component = this.AGS_Form.GetChild(4).GetComponent <Image>();

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

        component2.m_Handler    = this;
        component2.m_BtnID1     = 0;
        component2.transition   = Selectable.Transition.None;
        component2.m_EffectType = e_EffectType.e_Scale;
        for (int m = 0; m < 15; m++)
        {
            UIButton component3 = this.AGS_Form.GetChild(2).GetChild(11).GetChild(m).GetComponent <UIButton>();
            component3.m_BtnID1  = 1 + m;
            component3.m_Handler = this;
        }
        this.RefreshData();
        GUIManager.Instance.UpdateUI(EGUIWindow.Door, 1, 2);
        ActivityManager instance = ActivityManager.Instance;

        if (this.door != null && (instance.AW_State == EAllianceWarState.EAWS_None || DataManager.Instance.RoleAlliance.Id == 0u))
        {
            this.bExit = true;
            return;
        }
        byte b = (instance.AW_Round != 0) ? (instance.AW_Round - 1) : 5;

        if (b != (byte)UI_AlliWarSchedule.Step)
        {
            UI_AlliWarSchedule.RequestScheduleData();
        }
    }