Exemplo n.º 1
0
        public override void Handle(Session Session)
        {
            LabrynthSessionData displayPaintings = JsonConvert.DeserializeObject <LabrynthSessionData>(Session.GetResponseBodyAsString());

            FFRKProxy.Instance.GameState.LabrynthSessionData = displayPaintings;
            FFRKProxy.Instance.RaiseLabrynthSessionUpdated(displayPaintings);
        }
Exemplo n.º 2
0
 internal void RaiseLabrynthSessionUpdated(LabrynthSessionData labrynthSession)
 {
     if (OnLabrynthSessionUpdated == null)
     {
         return;
     }
     OnLabrynthSessionUpdated(labrynthSession);
 }
Exemplo n.º 3
0
        private void LoadTreasure(LabrynthSessionData labrynthSessionData)
        {
            gbTreasure.Visible = false;

            if (labrynthSessionData.LabrynthSession.ChestIds != null)
            {
                gbTreasure.Visible = true;
                SetChestContents(labrynthSessionData.LabrynthSession.ChestIds[0], lblTreasure1);
                SetChestContents(labrynthSessionData.LabrynthSession.ChestIds[1], lblTreasure2);
                SetChestContents(labrynthSessionData.LabrynthSession.ChestIds[2], lblTreasure3);
            }
            else
            {
                gbTreasure.Visible = false;
            }
        }
Exemplo n.º 4
0
        private void FFRKProxy_LabrynthSessionDataUpdated(LabrynthSessionData labrynthSessionData) => this.BeginInvoke((Action)(() =>
        {
            LoadTreasure(labrynthSessionData);
            var paintings = labrynthSessionData.LabrynthSession.LabrynthPaintings;
            var pbPaintings = new List <PictureBox>
            {
                pbPainting1, pbPainting2, pbPainting3, pbPainting4, pbPainting5, pbPainting6, pbPainting7, pbPainting8,
                pbPainting9
            };

            foreach (var pbPainting in pbPaintings)
            {
                pbPainting.Image = null;
                pbPainting.BorderStyle = BorderStyle.None;
            }

            for (int i = 0; i < paintings.Count; i++)
            {
                LoadPaintingImage(GetImageUrlFromPainting(paintings[i]), pbPaintings[i]);
            }
        }));