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(GClass880.smethod_9(this.Web.Server), new Dictionary <string, string> { { "action", "repairDrone" }, { "params", string_.smethod_1() } }, "https://darkorbit.com", null))); }
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); }