From 218a7f6dad2baf3cb62ecc00ff0fff159947ef9a Mon Sep 17 00:00:00 2001 From: Adam Liverman Date: Sun, 24 Nov 2024 14:03:02 -0500 Subject: [PATCH] bumping version --- E3Next/Processors/Setup.cs | 2 +- E3Next/Processors/Zoning.cs | 48 ++++++++++++++++------------------ E3Next/Resources/BuildDate.txt | 2 +- E3NextUI/E3UI.cs | 2 +- 4 files changed, 25 insertions(+), 29 deletions(-) diff --git a/E3Next/Processors/Setup.cs b/E3Next/Processors/Setup.cs index 459116fa..8f3f29cb 100644 --- a/E3Next/Processors/Setup.cs +++ b/E3Next/Processors/Setup.cs @@ -43,7 +43,7 @@ public static class Setup static public Int32 _numInventorySlots = 10; static public Int32 _previousSpellGemThatWasCast = -1; [ExposedData("Setup", "Version")] - public const string _e3Version = "1.46_devbuild"; + public const string _e3Version = "1.46"; [ExposedData("Setup", "BuildDate")] public static string _buildDate = string.Empty; public static Boolean _debug = true; diff --git a/E3Next/Processors/Zoning.cs b/E3Next/Processors/Zoning.cs index 424697ad..521d4fe9 100644 --- a/E3Next/Processors/Zoning.cs +++ b/E3Next/Processors/Zoning.cs @@ -21,7 +21,7 @@ public static class Zoning private static ISpawns _spawns = E3.Spawns; private static Dictionary _recordedSpawns = new Dictionary(); private static long _nextRecordingCheck = 0; - private static long _nextRecordingInterval = 1000; + private static long _nextRecordingInterval = 500; private static bool _recordingSpawnLocations = false; private static string _recordingFileName = String.Empty; private static Int32 _recordingZoneID = 0; @@ -200,14 +200,16 @@ public static void RecordZoneData() { if (!e3util.ShouldCheck(ref _nextRecordingCheck, _nextRecordingInterval)) return; + _spawns.RefreshList(); + foreach (var s in _recordedSpawns.Values) { if (s.Recording_Complete) continue; if(_spawns.TryByID(s.ID, out var cs)) { - - if (cs.Heading != s.Heading && cs.X != s.X && cs.Y != s.Y && cs.Z != s.Z) + float lastHeading = s.Heading; + if (cs.Heading != lastHeading && cs.X != s.X && cs.Y != s.Y && cs.Z != s.Z) { //if we have some how wrapped back around to our initial headig, assume we are at the start of our pathing, and end recording. if (cs.Heading == s.Initial_Heading) @@ -216,36 +218,30 @@ public static void RecordZoneData() continue; } - //check to make sure we have moved a decent amount - if (Math.Abs(cs.X - s.X) > _recordingMaxDelta || Math.Abs(cs.Y - s.Y) > _recordingMaxDelta || Math.Abs(cs.Z - s.Z) > _recordingMaxDelta) + using (var stream = new System.IO.FileStream(_recordingFileName, System.IO.FileMode.Append)) { - using (var stream = new System.IO.FileStream(_recordingFileName, System.IO.FileMode.Append)) + String sqlStatement = String.Empty; + using (var streamWriter = new System.IO.StreamWriter(stream)) { - String sqlStatement = String.Empty; - using (var streamWriter = new System.IO.StreamWriter(stream)) + if (!s.Recording_MovementOccured) { - if (!s.Recording_MovementOccured) - { - s.Recording_MovementOccured = true; - //update the npc table with the new grid we are creating - sqlStatement = $@"update npc_types set pathgrid={s.GridID} where id ={s.TableID}"; - streamWriter.WriteLine(sqlStatement); - sqlStatement = $@"insert into grid (id,zoneid,type,type2) values({s.GridID},{_recordingZoneID},{0},{0})"; - streamWriter.WriteLine(sqlStatement); - } - - sqlStatement = $@"insert into grid_entries (gridid,zoneid,number,x,y,z,heading,pause,centerpoint) - Values({s.GridID},{_recordingZoneID},{s.Recording_StepCount + 1},{cs.X},{cs.Y},{cs.Z},{cs.Heading},{0},{0})"; - + s.Recording_MovementOccured = true; + //update the npc table with the new grid we are creating + sqlStatement = $@"update npc_types set pathgrid={s.GridID} where id ={s.TableID}"; + streamWriter.WriteLine(sqlStatement); + sqlStatement = $@"insert into grid (id,zoneid,type,type2) values({s.GridID},{_recordingZoneID},{0},{0})"; streamWriter.WriteLine(sqlStatement); - s.Heading = cs.Heading; - s.X = cs.X; - s.Y = cs.Y; - s.Z = cs.Z; - s.Recording_StepCount++; } + + sqlStatement = $@"insert into grid_entries (gridid,zoneid,number,x,y,z,heading,pause,centerpoint) + Values({s.GridID},{_recordingZoneID},{s.Recording_StepCount + 1},{cs.X},{cs.Y},{cs.Z},{cs.Heading},{0},{0})"; + + streamWriter.WriteLine(sqlStatement); + s.Heading = cs.Heading; + s.Recording_StepCount++; } } + } } diff --git a/E3Next/Resources/BuildDate.txt b/E3Next/Resources/BuildDate.txt index ac4a6deb..e8546fa6 100644 --- a/E3Next/Resources/BuildDate.txt +++ b/E3Next/Resources/BuildDate.txt @@ -1 +1 @@ -Fri 11/22/2024 21:35:28.45 +Sat 11/23/2024 21:03:31.78 diff --git a/E3NextUI/E3UI.cs b/E3NextUI/E3UI.cs index 899be1e0..74f85cae 100644 --- a/E3NextUI/E3UI.cs +++ b/E3NextUI/E3UI.cs @@ -30,7 +30,7 @@ public partial class E3UI : Form public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); [DllImportAttribute("user32.dll")] public static extern bool ReleaseCapture(); - public static string Version = "v1.45"; + public static string Version = "v1.46"; public static System.Diagnostics.Stopwatch _stopWatch = new System.Diagnostics.Stopwatch(); public static volatile bool ShouldProcess = true;