Beispiel #1
0
        public bool RepairDrone(GClass49.GClass75 hangar, GClass49.GClass52 drone)
        {
            GClass49.GClass54 gclass = hangar.ret.hangars.FirstOrDefault <GClass49.GClass54>();
            if (gclass == null)
            {
                return(false);
            }
            string string_ = string.Format("{{\"params\":{{\"hi\":{0}}},\"repairCurrency\":\"{1}\",\"lootId\":\"{2}\",\"droneLevel\":{3},\"quantity\":1,\"itemId\":\"{4}\",\"action\":\"repairDrone\",\"repairPrice\":{5}}}", new object[]
            {
                gclass.Int32_0,
                drone.String_4,
                hangar.Map_0.IList_1[drone.Int32_0],
                drone.Int32_1,
                drone.String_0,
                drone.Int32_3
            });

            return(EquipmentAPI.HasNoError(this.Web.Post(GClass829.smethod_8(this.Web.Server), new Dictionary <string, string>
            {
                {
                    "action",
                    "repairDrone"
                },
                {
                    "params",
                    string_.smethod_1()
                }
            }, "https://darkorbit.com", null)));
        }
Beispiel #2
0
        public GClass49.GClass76 GetHangar(int id)
        {
            string string_ = string.Format("{{\"params\":{{\"hi\":{0}}}}}", id);
            string text    = this.Web.Post(GClass829.smethod_8(this.Web.Server), new Dictionary <string, string>
            {
                {
                    "action",
                    "getHangar"
                },
                {
                    "params",
                    string_.smethod_1()
                }
            }, "https://darkorbit.com", null).Content.smethod_0();

            GClass49.GClass76         gclass = JsonConvert.DeserializeObject <GClass49.GClass76>(text);
            JToken                    value  = JObject.Parse(text).Value <JObject>("data").Value <JObject>("ret").GetValue("hangars");
            IList <GClass49.GClass54> list   = null;

            try
            {
                list = (List <GClass49.GClass54>)value.ToObject(typeof(List <GClass49.GClass54>));
            }
            catch (Exception)
            {
            }
            GClass49.GClass76 result;
            try
            {
                if (list == null)
                {
                    list = (from t in (Dictionary <int, GClass49.GClass54>)value.ToObject(typeof(Dictionary <int, GClass49.GClass54>))
                            select t.Value).ToList <GClass49.GClass54>();
                }
                goto IL_F8;
            }
            catch (Exception)
            {
                result = null;
            }
            return(result);

IL_F8:
            gclass.data.ret.hangars = list;
            gclass.Fill();
            return(gclass);
        }
Beispiel #3
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(GClass829.smethod_8(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()));
        }
Beispiel #4
0
        public GClass28.GClass48 GetHangarList()
        {
            string text = this.Web.Post(GClass829.smethod_8(this.Web.Server), new Dictionary <string, string>
            {
                {
                    "params",
                    "e30="
                },
                {
                    "action",
                    "getHangarList"
                }
            }, "https://darkorbit.com", null).Content.smethod_0();

            GClass28.GClass48         gclass = JsonConvert.DeserializeObject <GClass28.GClass48>(text);
            JToken                    value  = JObject.Parse(text).Value <JObject>("data").Value <JObject>("ret").GetValue("hangars");
            IList <GClass28.GClass32> list   = null;

            try
            {
                list = (List <GClass28.GClass32>)value.ToObject(typeof(List <GClass28.GClass32>));
            }
            catch
            {
            }
            GClass28.GClass48 result;
            try
            {
                if (list == null)
                {
                    list = (from t in (Dictionary <int, GClass28.GClass32>)value.ToObject(typeof(Dictionary <int, GClass28.GClass32>))
                            select t.Value).ToList <GClass28.GClass32>();
                }
                goto IL_E4;
            }
            catch
            {
                result = null;
            }
            return(result);

IL_E4:
            gclass.data.ret.hangars = list;
            return(this.Hangars = gclass);
        }
Beispiel #5
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(GClass829.smethod_8(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);
        }