protected bool method_8(out int int_0) { GClass919.< > c__DisplayClass12_0 CS$ < > 8__locals1 = new GClass919.< > c__DisplayClass12_0(); int_0 = 0; int num; if (!this.method_6(out CS$ < > 8__locals1.string_0, out num)) { base.Log.Warn("Nothing to spin"); return(false); } DarkOrbitWebAPI.jumpgateMultiplier jumpgateMultiplier = this.method_2().multipliers.FirstOrDefault(new Func <DarkOrbitWebAPI.jumpgateMultiplier, bool>(CS$ < > 8__locals1.method_0)); bool flag = jumpgateMultiplier != null && jumpgateMultiplier.value > 0; string text = "&multiplier=" + (flag ? 1 : 0).ToString(); long samples = this.method_2().samples; string text2 = "&sample=1"; int_0 = this.method_7(); DarkOrbitWebAPI web = base.Context.Game.Web; DarkOrbitWebAPI.Response response = web.Get(string.Concat(new string[] { GClass880.smethod_6(web.Server, web.Uid, web.Sid, "multiEnergy"), string.Format("&gateID={0}&{1}=1", num, CS$ < > 8__locals1.string_0), text2, text, string.Format("&spinamount={0}", int_0) }), null);
public async Task method_1() { string sUrl = GClass829.smethod_1(this.Web.Server, "internalSkylab"); DarkOrbitWebAPI.Response response = await this.Web.GetAsync(sUrl, null); response.Data.EnsureSuccessStatusCode(); this.method_0().method_9(response.Content); }
public static bool HasNoError(DarkOrbitWebAPI.Response response) { try { return(response.Data.IsSuccessStatusCode && !response.Content.smethod_0().Contains("\"isError\":1")); } catch { } return(false); }
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())); }
public async Task <bool> method_2(int int_0, int int_1) { Dictionary <string, string> data = new Dictionary <string, string> { { "reloadToken", this.Web.ReloadToken }, { "action", "internalSkylab" }, { "subaction", "startTransport" }, { "mode", "normal" }, { "construction", "TRANSPORT_MODULE" }, { "count_prometium", "0" }, { "count_endurium", "0" }, { "count_terbium", "0" }, { "count_prometid", "0" }, { "count_duranium", "0" }, { "count_xenomit", "0" }, { "count_promerium", string.Format("{0}", int_0) }, { "count_seprom", string.Format("{0}", int_1) } }; DarkOrbitWebAPI.Response response = await this.Web.PostAsync(GClass829.smethod_1(this.Web.Server, null), data, GClass829.smethod_1(this.Web.Server, "internalSkylab"), null); bool result; if (!response.Data.IsSuccessStatusCode) { result = false; } else { this.method_0().method_9(response.Content); result = (this.method_0().method_10("transportModule").method_0() != null); } return(result); }