Example #1
0
        public GClass10.GClass27 GetDetails(GClass28.GClass32 hangar)
        {
            string string_ = string.Format("{{\"params\":{{\"lootId\":\"{0}\",\"hi\":{1},\"hangarId\":\"{2}\"}}}}", hangar.GClass31_0.GClass30_0, hangar.String_0, hangar.String_0);

            DarkOrbitWebAPI.Response response = this.Web.Post(GClass880.smethod_9(this.Web.Server), new Dictionary <string, string>
            {
                {
                    "action",
                    "getShipDetails"
                },
                {
                    "params",
                    string_.smethod_1()
                }
            }, "https://darkorbit.com", null);
            return(this.ShipDetails = JsonConvert.DeserializeObject <GClass10.GClass27>(response.Content.smethod_0()));
        }
Example #2
0
    public override void Execute()
    {
        GClass28.GClass48 hangarList = base.Context.Game.Web.Equipment.GetHangarList();
        GClass49.GClass76 hangar     = base.Context.Game.Web.Equipment.GetHangar();
        IDopeService      service    = base.Context.MainController.Parent.Service;
        List <string>     list       = hangarList.data.ret.hangars.Select(new Func <GClass28.GClass32, string>(GClass920.< > c.< > c_0.method_0)).ToList <string>();

        if (list != null && list.Any <string>() && hangar != null)
        {
            VolatileData volatileData = new VolatileData();
            volatileData.LastUpdated = DateTimeOffset.Now;
            volatileData.Hangars     = list;
            VolatileData      volatileData2 = volatileData;
            GClass28.GClass32 gclass        = hangarList.data.ret.hangars.FirstOrDefault(new Func <GClass28.GClass32, bool>(GClass920.< > c.< > c_0.method_1));
            string            activeHangar;
            if (gclass == null)
            {
                activeHangar = null;
            }
            else
            {
                GClass28.GClass31 gclass31_ = gclass.GClass31_0;
                if (gclass31_ == null)
                {
                    activeHangar = null;
                }
                else
                {
                    GClass28.GClass30 gclass30_ = gclass31_.GClass30_0;
                    activeHangar = ((gclass30_ != null) ? gclass30_.String_0 : null);
                }
            }
            volatileData2.ActiveHangar = activeHangar;
            volatileData.Fill();
            base.Context.Account.Volatile = volatileData;
            if (this.method_2().Cooldown(120000))
            {
                service.UpdateVolatile(base.Context.Account.BotId, volatileData);
                this.method_3(DateTimeOffset.Now);
            }
        }
    }
Example #3
0
        public bool ChangeHangar(string target)
        {
            if (this.Hangars == null)
            {
                return(false);
            }
            GClass28.GClass32 gclass = this.Hangars.data.ret.hangars.FirstOrDefault((GClass28.GClass32 t) => t.GClass31_0.GClass30_0.String_0 == target);
            if (gclass == null)
            {
                return(false);
            }
            if (gclass.Boolean_0)
            {
                return(true);
            }
            string string_  = gclass.String_0;
            string string_2 = string.Concat(new string[]
            {
                "{\"params\":{\"hi\":",
                string_,
                ",\"hangarId\":",
                string_,
                "}}"
            });
            bool flag = EquipmentAPI.HasNoError(this.Web.Post(GClass880.smethod_9(this.Web.Server), new Dictionary <string, string>
            {
                {
                    "action",
                    "activateShip"
                },
                {
                    "params",
                    string_2.smethod_1()
                }
            }, "https://darkorbit.com", null));

            if (flag)
            {
                this.Hangars = null;
            }
            return(flag);
        }