// Token: 0x06001DD0 RID: 7632 RVA: 0x0005FFF0 File Offset: 0x0005E1F0 private static bool smethod_4(string line, out HashSet <uint> shards) { shards = null; int num = 0; if (!line.smethod_9('{', ref num)) { return(false); } shards = new HashSet <uint>(); uint item; while (Class129.smethod_5(line, ref num, out item)) { if (!shards.Contains(item)) { shards.Add(item); } if (!line.smethod_10(", ", ref num)) { break; } } return(true); }
// Token: 0x06001D69 RID: 7529 RVA: 0x0005E534 File Offset: 0x0005C734 public static Struct56?smethod_1(Class142 toontownWindow, ManualResetEventSlim waitHandle, Class149 coordinatePoll) { Class269.Class272 @class = new Class269.Class272(); @class.nullable_0 = null; @class.bool_0 = false; EventHandler <EventArgs22> eventHandler = null; EventHandler eventHandler2 = null; Class269.Class273 class2 = new Class269.Class273(); class2.class272_0 = @class; class2.manualResetEventSlim_0 = new ManualResetEventSlim(false); try { try { Class129 logMonitor = toontownWindow.LogMonitor; if (eventHandler == null) { eventHandler = new EventHandler <EventArgs22>(class2.method_0); } logMonitor.CoordinatesChanged += eventHandler; Class141 toonTownProcess = toontownWindow.ToonTownProcess; if (eventHandler2 == null) { eventHandler2 = new EventHandler(class2.method_1); } toonTownProcess.ProcessExited += eventHandler2; if (!toontownWindow.ToonTownProcess.ProcessOpen) { return(null); } coordinatePoll.method_4(); WaitHandle.WaitAny(new WaitHandle[] { waitHandle.WaitHandle, class2.manualResetEventSlim_0.WaitHandle }); coordinatePoll.method_5(); } finally { @class.bool_0 = true; } } finally { if (class2.manualResetEventSlim_0 != null) { ((IDisposable)class2.manualResetEventSlim_0).Dispose(); } } return(@class.nullable_0); }
// Token: 0x06001D68 RID: 7528 RVA: 0x0005E410 File Offset: 0x0005C610 public static Struct56?smethod_0(Class142 toontownWindow, ManualResetEventSlim waitHandle, int timeOut = -1) { Class269.Class270 @class = new Class269.Class270(); @class.nullable_0 = null; @class.bool_0 = false; EventHandler <EventArgs22> eventHandler = null; EventHandler eventHandler2 = null; Class269.Class271 class2 = new Class269.Class271(); class2.class270_0 = @class; class2.manualResetEventSlim_0 = new ManualResetEventSlim(false); try { try { Class129 logMonitor = toontownWindow.LogMonitor; if (eventHandler == null) { eventHandler = new EventHandler <EventArgs22>(class2.method_0); } logMonitor.CoordinatesChanged += eventHandler; Class141 toonTownProcess = toontownWindow.ToonTownProcess; if (eventHandler2 == null) { eventHandler2 = new EventHandler(class2.method_1); } toonTownProcess.ProcessExited += eventHandler2; IntPtr mainWindowHandle = toontownWindow.ToonTownProcess.MainWindowHandle; if (!toontownWindow.ToonTownProcess.ProcessOpen) { return(null); } Class269.smethod_20(mainWindowHandle, class2.manualResetEventSlim_0); WaitHandle.WaitAny(new WaitHandle[] { waitHandle.WaitHandle, class2.manualResetEventSlim_0.WaitHandle }, timeOut); } finally { @class.bool_0 = true; } } finally { if (class2.manualResetEventSlim_0 != null) { ((IDisposable)class2.manualResetEventSlim_0).Dispose(); } } return(@class.nullable_0); }
// Token: 0x06001DCB RID: 7627 RVA: 0x0005FD60 File Offset: 0x0005DF60 public bool method_19(string line) { if (string.IsNullOrEmpty(line)) { return(false); } char c = line[0]; DateTime dateTime; string line2; if (c != ':') { Struct56? @struct; if (c != 'C') { if (c == '{') { HashSet <uint> shards; if (Class129.smethod_4(line, out shards)) { this.method_14(shards); return(true); } } } else if (line.StartsWith("Current position") && Class129.smethod_17(line, out @struct)) { this.method_11(@struct.Value); return(true); } } else if (Class129.smethod_16(line, out dateTime, out line2)) { Struct26?struct2; if (Class129.smethod_15(line2, out struct2)) { this.bool_3 = false; this.method_10(struct2.Value); return(true); } string line3; if (Class129.smethod_6(line2, out line3)) { uint shardID; if (Class129.smethod_8(line3, out shardID)) { this.bool_3 = true; this.method_12(shardID); return(true); } if (Class129.smethod_7(line3)) { this.bool_3 = false; this.method_13(); return(true); } } else { if (this.bool_3 && Class129.smethod_3(line2)) { this.bool_3 = false; this.method_8(); return(true); } string line4; string text; if (Class129.smethod_14(line2, out line4)) { string fileName; if (Class129.smethod_13(line4, out fileName)) { this.class309_0 = new Class309(fileName); return(true); } if (this.class309_0 != null) { bool flag; if (Class129.smethod_12(line4, out flag)) { this.class309_0.FileExists = flag; if (!flag) { this.method_9(this.class309_0); } return(true); } string clientMd; string expectedMd; if (Class129.smethod_10(line4, out clientMd, out expectedMd)) { this.class309_0.ClientMd5 = clientMd; this.class309_0.ExpectedMd5 = expectedMd; return(true); } int clientSize; int expectedSize; if (Class129.smethod_9(line4, out clientSize, out expectedSize)) { this.class309_0.ClientSize = clientSize; this.class309_0.ExpectedSize = expectedSize; return(true); } bool upToDate; if (Class129.smethod_11(line4, out upToDate)) { this.class309_0.UpToDate = upToDate; this.method_9(this.class309_0); this.class309_0 = null; return(true); } } } else if (Class129.smethod_2(line2, out text)) { int num = 0; string fileName2; if (text.smethod_15('/', ref num) && text.smethod_7(ref num, out fileName2)) { this.method_15(text, fileName2); return(true); } } else { string id; if (Class129.smethod_1(line2, out id)) { this.method_16(id); return(true); } if (Class129.smethod_0(line2)) { this.method_18(); return(true); } } } } return(false); }
// Token: 0x06001D70 RID: 7536 RVA: 0x0005EC58 File Offset: 0x0005CE58 public static bool smethod_8(Class142 toontownWindow, ManualResetEventSlim waitHandle, Class104 settings, PointF target, bool jump) { Class269.Class280 @class = new Class269.Class280(); @class.bool_0 = false; IntPtr mainWindowHandle = toontownWindow.ToonTownProcess.MainWindowHandle; if (!toontownWindow.ToonTownProcess.ProcessOpen) { return(false); } EventHandler eventHandler = null; EventHandler <EventArgs22> eventHandler2 = null; Class269.Class281 class2 = new Class269.Class281(); class2.class280_0 = @class; class2.manualResetEventSlim_0 = new ManualResetEventSlim(false); bool result; try { try { Class141 toonTownProcess = toontownWindow.ToonTownProcess; if (eventHandler == null) { eventHandler = new EventHandler(class2.method_0); } toonTownProcess.ProcessExited += eventHandler; Class129 logMonitor = toontownWindow.LogMonitor; if (eventHandler2 == null) { eventHandler2 = new EventHandler <EventArgs22>(class2.method_1); } logMonitor.CoordinatesChanged += eventHandler2; while (!class2.manualResetEventSlim_0.IsSet && !waitHandle.IsSet) { if (jump) { Class269.smethod_18(mainWindowHandle, new WaitHandle[] { waitHandle.WaitHandle, class2.manualResetEventSlim_0.WaitHandle }); } if (!Class269.smethod_5(toontownWindow, waitHandle, class2.manualResetEventSlim_0, settings, target, jump, true)) { class2.manualResetEventSlim_0.Wait(100); } } result = (class2.manualResetEventSlim_0.IsSet && !waitHandle.IsSet); } finally { @class.bool_0 = true; } } finally { if (class2.manualResetEventSlim_0 != null) { ((IDisposable)class2.manualResetEventSlim_0).Dispose(); } } return(result); }
// Token: 0x06001D6D RID: 7533 RVA: 0x0005E7C8 File Offset: 0x0005C9C8 public static bool smethod_5(Class142 toontownWindow, ManualResetEventSlim waitHandle, ManualResetEventSlim navigateWaitHandle, Class104 settings, PointF target, bool jump, bool finalTarget) { Class269.Class278 @class = new Class269.Class278(); IntPtr mainWindowHandle = toontownWindow.ToonTownProcess.MainWindowHandle; if (!toontownWindow.ToonTownProcess.ProcessOpen) { return(false); } Class269.Enum58 @enum = Class269.Enum58.flag_0; @class.struct56_0 = Struct56.struct56_0; Struct56 a = Struct56.struct56_0; DateTime t = DateTime.Now.AddMilliseconds(2000.0); float num = finalTarget ? settings.TargetRange : settings.IntermediateTargetRange; @class.bool_0 = false; EventHandler <EventArgs22> eventHandler = null; Class269.Class279 class2 = new Class269.Class279(); class2.class278_0 = @class; class2.manualResetEventSlim_0 = new ManualResetEventSlim(false); try { try { Class129 logMonitor = toontownWindow.LogMonitor; if (eventHandler == null) { eventHandler = new EventHandler <EventArgs22>(class2.method_0); } logMonitor.CoordinatesChanged += eventHandler; WaitHandle[] waitHandles = new WaitHandle[] { waitHandle.WaitHandle, class2.manualResetEventSlim_0.WaitHandle, navigateWaitHandle.WaitHandle }; WaitHandle.WaitAny(waitHandles); WaitHandle[] waitHandles2 = new WaitHandle[] { waitHandle.WaitHandle, navigateWaitHandle.WaitHandle }; DateTime t2 = DateTime.Now.AddMilliseconds(2000.0); try { while (!waitHandle.IsSet && !navigateWaitHandle.IsSet) { Struct56 struct56_ = @class.struct56_0; PointF location = struct56_.Location; if (Class477.smethod_0(target, num, location)) { return(true); } float num2 = struct56_.method_0(target); float num3 = Math.Abs(num2 - struct56_.float_3); float num4 = Class477.smethod_9(target, struct56_.Location); if (t < DateTime.Now) { if (Struct56.smethod_0(a, struct56_)) { Class269.smethod_16(mainWindowHandle, ref @enum); Class269.smethod_15(mainWindowHandle, ref @enum); Class269.smethod_14(mainWindowHandle, ref @enum); Class269.smethod_19(mainWindowHandle); } t = DateTime.Now.AddMilliseconds(2000.0); } bool flag2; if ((num4 > 20f && num3 > 20f) || (num4 <= 20f && Class237.smethod_0(target, num, location, struct56_.float_3) == null)) { Class269.smethod_16(mainWindowHandle, ref @enum); bool flag = num3 > 180f; if (num2 < struct56_.float_3) { if (flag) { flag2 = Class269.smethod_9(mainWindowHandle, ref @enum, waitHandles2, num3); } else { flag2 = Class269.smethod_10(mainWindowHandle, ref @enum, waitHandles2, num3); } } else if (flag) { flag2 = Class269.smethod_10(mainWindowHandle, ref @enum, waitHandles2, num3); } else { flag2 = Class269.smethod_9(mainWindowHandle, ref @enum, waitHandles2, num3); } } else { Class269.smethod_15(mainWindowHandle, ref @enum); Class269.smethod_14(mainWindowHandle, ref @enum); if (jump && t2 < DateTime.Now) { Class269.smethod_18(mainWindowHandle, waitHandles2); t2 = DateTime.Now.AddMilliseconds(2000.0); } flag2 = Class269.smethod_11(mainWindowHandle, ref @enum, waitHandles2, num4 - settings.TargetRange); } if (!flag2) { class2.manualResetEventSlim_0.Reset(); WaitHandle.WaitAny(waitHandles); } if (Class477.smethod_0(target, num, @class.struct56_0.Location)) { return(true); } WaitHandle.WaitAny(waitHandles2, 25); a = struct56_; } } finally { Class269.smethod_16(mainWindowHandle, ref @enum); Class269.smethod_15(mainWindowHandle, ref @enum); Class269.smethod_14(mainWindowHandle, ref @enum); Class269.smethod_19(mainWindowHandle); } } finally { @class.bool_0 = true; } } finally { if (class2.manualResetEventSlim_0 != null) { ((IDisposable)class2.manualResetEventSlim_0).Dispose(); } } return(false); }