Skip to content

Commit

Permalink
bumping version
Browse files Browse the repository at this point in the history
  • Loading branch information
RekkasGit committed Nov 24, 2024
1 parent 863698e commit 218a7f6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 29 deletions.
2 changes: 1 addition & 1 deletion E3Next/Processors/Setup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
48 changes: 22 additions & 26 deletions E3Next/Processors/Zoning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class Zoning
private static ISpawns _spawns = E3.Spawns;
private static Dictionary<Int32, Spawn> _recordedSpawns = new Dictionary<Int32, Spawn>();
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;
Expand Down Expand Up @@ -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)
Expand All @@ -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++;
}
}

}

}
Expand Down
2 changes: 1 addition & 1 deletion E3Next/Resources/BuildDate.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Fri 11/22/2024 21:35:28.45
Sat 11/23/2024 21:03:31.78
2 changes: 1 addition & 1 deletion E3NextUI/E3UI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 218a7f6

Please sign in to comment.