protected void method_10() { GClass892 gclass = this.method_8(); GClass904 behavior = gclass.GetBehavior(); while (!behavior.vmethod_18(gclass)) { gclass = this.method_9(behavior); behavior = gclass.GetBehavior(); } if (!this.Module.GetBehavior().vmethod_18(this.Module)) { this.Module.ForceStop(); } else if (gclass.Priority > this.Module.Priority) { this.Module.Stop(); } if (this.Module.State == ModuleState.Stopped) { this.Module = gclass; } if (this.Module.State == ModuleState.Stopped) { this.Module.Start(); } }
public void method_11(GClass892 gclass892_1) { GClass892 module = this.Module; if (module != null && module != gclass892_1 && gclass892_1.Priority >= module.Priority && module.State == ModuleState.Stopping && module.IsInterruptible) { module.ForceStop(); } }
public override bool vmethod_18(GClass892 gclass892_0) { if (!base.Context.Map.Gates.Any <KeyValuePair <int, Gate> >()) { GClass900 gclass = gclass892_0 as GClass900; return(gclass != null && gclass.GalaxyGateType == MapUtils.smethod_10(base.C.Map.MapId)); } return(true); }
public GClass888(GClass890 gclass890_1) { Class13.lOBHd9Nzn7x2T(); this.dictionary_0 = new Dictionary <string, DateTimeOffset>(); this.random_0 = new Random(); this.list_0 = new List <GClass892>(); this.object_0 = new object(); base..ctor(); this.Context = gclass890_1; this.list_0.Add(this.Module = new GClass893(gclass890_1)); foreach (object obj in Enum.GetValues(typeof(TargetMap))) { TargetMap targetMap = (TargetMap)obj; if (targetMap != TargetMap.PayloadEscort) { GClass892 gclass = null; if (MapUtils.smethod_6((int)targetMap)) { if (MapUtils.smethod_7((int)targetMap)) { gclass = new GClass900(gclass890_1, targetMap); } else if (MapUtils.smethod_8((int)targetMap)) { gclass = new GClass901(gclass890_1, targetMap); } } else { gclass = new GClass896(gclass890_1, targetMap); } if (gclass != null) { this.list_0.Add(gclass); } } } this.list_0.Add(new GClass894(gclass890_1)); if (Constants.bool_0) { this.list_0.Add(new GClass902(gclass890_1)); } this.list_0.Add(new GClass897(gclass890_1)); if (Constants.FrozenLabirynthEnabled) { this.list_0.Add(new GClass898(gclass890_1)); } if (Constants.PayloadEscortEnabled) { this.list_0.Add(new GClass899(gclass890_1)); } this.list_0.Add(new GClass903(gclass890_1)); this.Module.Start(); }
protected GClass892 method_9(GClass904 gclass904_0) { int num = int.MinValue; GClass892 gclass = null; foreach (GClass892 gclass2 in this.list_0) { if (gclass904_0.vmethod_18(gclass2) && (gclass2.Priority > num || gclass == null)) { num = gclass2.Priority; gclass = gclass2; } } return(gclass); }
public override bool vmethod_18(GClass892 gclass892_0) { return(gclass892_0 is GClass894); }
public override bool vmethod_18(GClass892 gclass892_0) { return(gclass892_0 == this.Module); }
private void method_2() { DateTimeOffset date = DateTimeOffset.MinValue; for (;;) { foreach (KeyValuePair <string, GClass922> keyValuePair in this.BotControllers) { GClass923.< > c__DisplayClass29_0 CS$ < > 8__locals1 = new GClass923.< > c__DisplayClass29_0(); GClass922 value = keyValuePair.Value; CS$ < > 8__locals1.gclass890_0 = ((value != null) ? value.Context : null); if (CS$ < > 8__locals1.gclass890_0 != null) { GClass923.< > c__DisplayClass29_0 CS$ < > 8__locals2 = CS$ < > 8__locals1; string str = "Core-MainBotController-"; GClass890 gclass890_ = CS$ < > 8__locals1.gclass890_0; string str2; if (gclass890_ == null) { str2 = null; } else { AccountSettings account = gclass890_.Account; str2 = ((account != null) ? account.BotId : null); } CS$ < > 8__locals2.logger_0 = LogManager.GetLogger(str + str2); try { bool flag = CS$ < > 8__locals1.gclass890_0.Game.Connection.Socket.method_2(); if (CS$ < > 8__locals1.gclass890_0.ShouldBeDisabled && !flag && CS$ < > 8__locals1.gclass890_0.Game.IsLoggedOut) { CS$ < > 8__locals1.gclass890_0.IsEnabled = false; CS$ < > 8__locals1.gclass890_0.ShouldBeDisabled = false; CS$ < > 8__locals1.gclass890_0.Stop(); foreach (GClass892 gclass in CS$ < > 8__locals1.gclass890_0.Scheduler.list_0) { gclass.ForceStop(); } } if (CS$ < > 8__locals1.gclass890_0.IsEnabled) { CS$ < > 8__locals1.gclass890_0.Game.Settings.Use3D = true; if (CS$ < > 8__locals1.gclass890_0.LastLogin.Cooldown(60000) && date.Cooldown(5000)) { Task loginTask = CS$ < > 8__locals1.gclass890_0.LoginTask; if (loginTask == null || loginTask.IsCompleted) { CS$ < > 8__locals1.gclass890_0.LoginTask = Task.Run(new Action(CS$ < > 8__locals1.gclass890_0.method_63)); date = DateTimeOffset.Now; } } if (CS$ < > 8__locals1.gclass890_0.Game.IsLoggedIn) { if (CS$ < > 8__locals1.gclass890_0.LastDisconnectReason == ErrorReason.CantLogin) { CS$ < > 8__locals1.gclass890_0.LastDisconnectReason = ErrorReason.Unknown; } if (CS$ < > 8__locals1.gclass890_0.BackgroundQueue != null && CS$ < > 8__locals1.gclass890_0.BackgroundQueue.Any <Func <DarkOrbitWebAPI, object> >()) { for (;;) { GClass923.< > c__DisplayClass29_1 CS$ < > 8__locals3 = new GClass923.< > c__DisplayClass29_1(); CS$ < > 8__locals3.< > c__DisplayClass29_0_0 = CS$ < > 8__locals1; if (!CS$ < > 8__locals3.< > c__DisplayClass29_0_0.gclass890_0.BackgroundQueue.TryDequeue(out CS$ < > 8__locals3.func_0)) { break; } Task lastBackgroundAction = CS$ < > 8__locals3.< > c__DisplayClass29_0_0.gclass890_0.LastBackgroundAction; if (lastBackgroundAction != null && !lastBackgroundAction.IsCompleted) { break; } CS$ < > 8__locals3.< > c__DisplayClass29_0_0.gclass890_0.LastBackgroundAction = Task.Run <object>(new Func <object>(CS$ < > 8__locals3.method_0)); } } foreach (GInterface9 ginterface in CS$ < > 8__locals1.gclass890_0.method_61()) { Task lastBackgroundHandlerAction = CS$ < > 8__locals1.gclass890_0.LastBackgroundHandlerAction; if ((lastBackgroundHandlerAction == null || lastBackgroundHandlerAction.IsCompleted) && ginterface.imethod_0()) { CS$ < > 8__locals1.gclass890_0.LastBackgroundHandlerAction = Task.Run(new Action(ginterface.Execute)); } } string activeHangarName = CS$ < > 8__locals1.gclass890_0.Game.Web.Equipment.ActiveHangarName; if (!string.IsNullOrWhiteSpace(activeHangarName)) { GClass892 gclass2 = CS$ < > 8__locals1.gclass890_0.Scheduler.method_13(); bool flag2 = CS$ < > 8__locals1.gclass890_0.IsPaused || gclass2.ShouldBeInGame(); if (activeHangarName != null && gclass2.ShouldChangeHangar(out CS$ < > 8__locals1.string_0) && CS$ < > 8__locals1.string_0 != activeHangarName) { if (CS$ < > 8__locals1.gclass890_0.Game.IsLoggedOut && !CS$ < > 8__locals1.gclass890_0.dateTimeOffset_4.Cooldown(900000)) { flag2 = false; if (CS$ < > 8__locals1.gclass890_0.Cooldowns.method_2(BotAction.ChangeHangar, 10000.0)) { bool flag3; CS$ < > 8__locals1.gclass890_0.method_10 <bool>("ChangeHangar", new Func <DarkOrbitWebAPI, bool>(CS$ < > 8__locals1.method_0), out flag3); } } else { flag2 = true; CS$ < > 8__locals1.gclass890_0.ForceLogout = true; } } if (!flag) { if (flag2 && CS$ < > 8__locals1.gclass890_0.LastMapLogin.Cooldown(10000) && CS$ < > 8__locals1.gclass890_0.dateTime_2.Cooldown(1000)) { CS$ < > 8__locals1.gclass890_0.LastMapLogin = DateTime.Now; CS$ < > 8__locals1.gclass890_0.Game.Settings.IsClient = (CS$ < > 8__locals1.gclass890_0.Game.Connection.ProxySocket == null); CS$ < > 8__locals1.gclass890_0.Game.Start(); } } else if (!CS$ < > 8__locals1.gclass890_0.Run) { CS$ < > 8__locals1.gclass890_0.Start(true); } } } } }