コード例 #1
0
        // Token: 0x06001D6E RID: 7534 RVA: 0x0005EB80 File Offset: 0x0005CD80
        public static bool smethod_6(Class142 toontownWindow, ManualResetEventSlim waitHandle, Class101 wayPointsSettings, Class108 dock, Class104 settings)
        {
            Struct56? @struct = Class269.smethod_0(toontownWindow, waitHandle, -1);

            if (@struct == null)
            {
                return(false);
            }
            if (@struct.Value.IsDock)
            {
                return(true);
            }
            Enum57 playground = toontownWindow.Playground;
            Dictionary <PointF, Enum99> points_dic;

            if (wayPointsSettings.WayPoints.ContainsKey(playground))
            {
                points_dic = wayPointsSettings.WayPoints[playground];
            }
            else
            {
                points_dic = null;
            }
            List <PointF> path = Class269.smethod_21(points_dic, @struct.Value.Location, dock.DockLocation);

            return(Class269.smethod_7(toontownWindow, waitHandle, path, settings));
        }
コード例 #2
0
 // Token: 0x06001D72 RID: 7538 RVA: 0x0005EE28 File Offset: 0x0005D028
 private static bool smethod_10(IntPtr hWnd, ref Class269.Enum58 direction, WaitHandle[] waitHandles, float minimum_h)
 {
     Class269.smethod_14(hWnd, ref direction);
     if ((double)minimum_h < 1.3)
     {
         Class269.smethod_13(hWnd, waitHandles, 15);
         return(false);
     }
     if ((double)minimum_h < 2.6)
     {
         Class269.smethod_13(hWnd, waitHandles, 30);
         return(false);
     }
     if ((double)minimum_h < 5.2)
     {
         Class269.smethod_13(hWnd, waitHandles, 60);
         return(false);
     }
     if ((double)minimum_h < 10.4)
     {
         Class269.smethod_13(hWnd, waitHandles, 120);
         return(false);
     }
     Class465.smethod_13(hWnd, Keys.Right);
     direction |= Class269.Enum58.flag_2;
     return(true);
 }
コード例 #3
0
 // Token: 0x06001D6A RID: 7530 RVA: 0x0005E644 File Offset: 0x0005C844
 public static bool smethod_2(Class142 toontownWindow, ManualResetEventSlim waitHandle, ManualResetEventSlim navigateWaitHandle, List <PointF> path, Class104 settings, bool jump = true)
 {
     for (int i = 0; i < path.Count; i++)
     {
         if (!Class269.smethod_5(toontownWindow, waitHandle, navigateWaitHandle, settings, path[i], jump, i == path.Count - 1))
         {
             return(false);
         }
     }
     return(true);
 }
コード例 #4
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);
        }
コード例 #5
0
 // Token: 0x06001D6F RID: 7535 RVA: 0x0005EC04 File Offset: 0x0005CE04
 public static bool smethod_7(Class142 toontownWindow, ManualResetEventSlim waitHandle, List <PointF> path, Class104 settings)
 {
     for (int i = 0; i < path.Count; i++)
     {
         if (i == path.Count - 1)
         {
             return(Class269.smethod_8(toontownWindow, waitHandle, settings, path[i], true));
         }
         if (!Class269.smethod_4(toontownWindow, waitHandle, settings, path[i], true, false))
         {
             return(false);
         }
     }
     return(false);
 }
コード例 #6
0
        // Token: 0x06001D7D RID: 7549 RVA: 0x0005EF04 File Offset: 0x0005D104
        public static List <PointF> smethod_21(Dictionary <PointF, Enum99> points_dic, PointF initial_location, PointF end_location)
        {
            HashSet <PointF> hashSet = null;

            if (points_dic != null)
            {
                hashSet = new HashSet <PointF>();
                foreach (KeyValuePair <PointF, Enum99> keyValuePair in points_dic)
                {
                    if (keyValuePair.Value == Enum99.flag_0)
                    {
                        hashSet.Add(keyValuePair.Key);
                    }
                }
            }
            return(Class269.smethod_22(hashSet, initial_location, end_location));
        }
コード例 #7
0
 // Token: 0x06001D73 RID: 7539 RVA: 0x0005EEAC File Offset: 0x0005D0AC
 private static bool smethod_11(IntPtr hWnd, ref Class269.Enum58 direction, WaitHandle[] waitHandles, float minimum_distance)
 {
     if (minimum_distance < 0.25f)
     {
         Class269.smethod_17(hWnd, ref direction, waitHandles, 20);
         return(false);
     }
     if (minimum_distance < 1f)
     {
         Class269.smethod_17(hWnd, ref direction, waitHandles, 40);
         return(false);
     }
     if (minimum_distance < 2f)
     {
         Class269.smethod_17(hWnd, ref direction, waitHandles, 80);
         return(false);
     }
     Class465.smethod_13(hWnd, Keys.Up);
     direction |= Class269.Enum58.flag_3;
     return(true);
 }
コード例 #8
0
        // Token: 0x06001D6C RID: 7532 RVA: 0x0005E728 File Offset: 0x0005C928
        public static bool smethod_4(Class142 toontownWindow, ManualResetEventSlim waitHandle, Class104 settings, PointF target, bool jump, bool finalTarget)
        {
            Class269.Class276 @class = new Class269.Class276();
            @class.bool_0 = false;
            EventHandler eventHandler = null;

            Class269.Class277 class2 = new Class269.Class277();
            class2.class276_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;
                    result = Class269.smethod_5(toontownWindow, waitHandle, class2.manualResetEventSlim_0, settings, target, jump, finalTarget);
                }
                finally
                {
                    @class.bool_0 = true;
                }
            }
            finally
            {
                if (class2.manualResetEventSlim_0 != null)
                {
                    ((IDisposable)class2.manualResetEventSlim_0).Dispose();
                }
            }
            return(result);
        }
コード例 #9
0
        // Token: 0x06001D6B RID: 7531 RVA: 0x0005E688 File Offset: 0x0005C888
        public static bool smethod_3(Class142 toontownWindow, ManualResetEventSlim waitHandle, List <PointF> path, Class104 settings, bool jump = true)
        {
            Class269.Class274 @class = new Class269.Class274();
            @class.bool_0 = false;
            EventHandler eventHandler = null;

            Class269.Class275 class2 = new Class269.Class275();
            class2.class274_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;
                    result = Class269.smethod_2(toontownWindow, waitHandle, class2.manualResetEventSlim_0, path, settings, jump);
                }
                finally
                {
                    @class.bool_0 = true;
                }
            }
            finally
            {
                if (class2.manualResetEventSlim_0 != null)
                {
                    ((IDisposable)class2.manualResetEventSlim_0).Dispose();
                }
            }
            return(result);
        }
コード例 #10
0
        // 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);
        }
コード例 #11
0
        // 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);
        }