diff --git a/.vscode/launch.json b/.vscode/launch.json
index 3e3efafc5..2ef6dd032 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -38,13 +38,13 @@
"stopAtEntry": false
},
{
- "name": "EndlessClient - Mac",
+ "name": "EndlessClient - Mac (arm64)",
"type": "coreclr",
"request": "launch",
- "preLaunchTask": "build-client-mac",
- "program": "${workspaceFolder}/bin/Debug/client/net6.0-macos/osx-x64/EndlessClient.app/Contents/MacOS/EndlessClient",
+ "preLaunchTask": "build-client-mac-arm",
+ "program": "${workspaceFolder}/bin/Debug/client/net8.0-macos/osx-arm64/EndlessClient.app/Contents/MacOS/EndlessClient",
"args": [],
- "cwd": "${workspaceFolder}/bin/Debug/client/net6.0-macos/osx-x64/EndlessClient.app",
+ "cwd": "${workspaceFolder}/bin/Debug/client/net8.0-macos/osx-arm64/EndlessClient.app",
"console": "internalConsole",
"stopAtEntry": false
},
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 14e0cf923..b0578cfb2 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -38,14 +38,14 @@
"problemMatcher": "$msCompile"
},
{
- "label": "build-client-mac",
+ "label": "build-client-mac-arm",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/EndlessClient/EndlessClient.csproj",
- "/property:GenerateFullPaths=true",
- "/consoleloggerparameters:NoSummary"
+ "-r",
+ "osx-arm64"
],
"problemMatcher": "$msCompile"
},
diff --git a/EOBot/BotBase.cs b/EOBot/BotBase.cs
index 0ec336dd2..d9cd8176a 100644
--- a/EOBot/BotBase.cs
+++ b/EOBot/BotBase.cs
@@ -1,12 +1,11 @@
using System;
using System.Threading;
using System.Threading.Tasks;
-using EOLib;
using EOLib.Config;
-using EOLib.Domain.Protocol;
using EOLib.Net.Communication;
using EOLib.Net.Connection;
using EOLib.Net.PacketProcessing;
+using EOLib.Shared;
using Moffat.EndlessOnline.SDK.Packet;
using Moffat.EndlessOnline.SDK.Protocol.Net.Server;
diff --git a/EOBot/Interpreter/BuiltInIdentifierConfigurator.cs b/EOBot/Interpreter/BuiltInIdentifierConfigurator.cs
index f28a3e674..25d7d98a6 100644
--- a/EOBot/Interpreter/BuiltInIdentifierConfigurator.cs
+++ b/EOBot/Interpreter/BuiltInIdentifierConfigurator.cs
@@ -5,7 +5,6 @@
using System.Threading.Tasks;
using EOBot.Interpreter.States;
using EOBot.Interpreter.Variables;
-using EOLib;
using EOLib.Config;
using EOLib.Domain.Character;
using EOLib.Domain.Chat;
@@ -17,6 +16,7 @@
using EOLib.Net.Communication;
using EOLib.Net.Connection;
using EOLib.Net.PacketProcessing;
+using EOLib.Shared;
using Moffat.EndlessOnline.SDK.Packet;
using Moffat.EndlessOnline.SDK.Protocol.Net;
using Moffat.EndlessOnline.SDK.Protocol.Net.Server;
diff --git a/EOLib.Config.Test/ConfigFileLoadActionsTest.cs b/EOLib.Config.Test/ConfigFileLoadActionsTest.cs
index 7452e0923..709816fa9 100644
--- a/EOLib.Config.Test/ConfigFileLoadActionsTest.cs
+++ b/EOLib.Config.Test/ConfigFileLoadActionsTest.cs
@@ -1,6 +1,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
+using EOLib.Shared;
using NUnit.Framework;
namespace EOLib.Config.Test
@@ -8,7 +9,7 @@ namespace EOLib.Config.Test
[TestFixture, ExcludeFromCodeCoverage]
public class ConfigFileLoadActionsTest
{
- private const string ConfigDirectory = "config";
+ private static readonly string _configDirectory = PathResolver.GetModifiablePath("config");
private IConfigFileLoadActions _configFileLoadActions;
private IConfigurationRepository _configurationRepository;
@@ -23,8 +24,8 @@ public void SetUp()
[TearDown]
public static void TearDown()
{
- if (Directory.Exists(ConfigDirectory))
- Directory.Delete(ConfigDirectory, true);
+ if (Directory.Exists(_configDirectory))
+ Directory.Delete(_configDirectory, true);
}
[Test]
@@ -127,10 +128,10 @@ public void ValidConfigFile_LoadsSpecifiedSettings()
private static void CreateTestConfigurationInDirectory(string contents)
{
- if (!Directory.Exists(ConfigDirectory))
- Directory.CreateDirectory(ConfigDirectory);
+ if (!Directory.Exists(_configDirectory))
+ Directory.CreateDirectory(_configDirectory);
- File.WriteAllText(ConfigStrings.Default_Config_File, contents);
+ File.WriteAllText(Constants.Default_Config_File, contents);
}
}
}
diff --git a/EOLib.Config/ConfigFileLoadActions.cs b/EOLib.Config/ConfigFileLoadActions.cs
index 6643f4911..78573b184 100644
--- a/EOLib.Config/ConfigFileLoadActions.cs
+++ b/EOLib.Config/ConfigFileLoadActions.cs
@@ -1,5 +1,8 @@
using System;
+using System.IO;
+using System.Runtime.InteropServices;
using AutomaticTypeMapper;
+using EOLib.Shared;
namespace EOLib.Config
{
@@ -15,7 +18,7 @@ public ConfigFileLoadActions(IConfigurationRepository configRepository)
public void LoadConfigFile()
{
- var configFile = new IniReader(ConfigStrings.Default_Config_File);
+ var configFile = new IniReader(Constants.Default_Config_File);
if (!configFile.Load())
throw new ConfigLoadException();
diff --git a/EOLib.Config/ConfigLoadException.cs b/EOLib.Config/ConfigLoadException.cs
index 3c114ef24..baaf600d1 100644
--- a/EOLib.Config/ConfigLoadException.cs
+++ b/EOLib.Config/ConfigLoadException.cs
@@ -1,10 +1,11 @@
using System;
+using EOLib.Shared;
namespace EOLib.Config
{
public class ConfigLoadException : Exception
{
public ConfigLoadException()
- : base("Unable to load the configuration file! Make sure there is a file in " + ConfigStrings.Default_Config_File) { }
+ : base("Unable to load the configuration file! Make sure there is a file in " + Constants.Default_Config_File) { }
}
}
diff --git a/EOLib.Config/ConfigStrings.cs b/EOLib.Config/ConfigStrings.cs
index 94b82bcb4..259b99285 100644
--- a/EOLib.Config/ConfigStrings.cs
+++ b/EOLib.Config/ConfigStrings.cs
@@ -5,8 +5,6 @@ namespace EOLib.Config
[ExcludeFromCodeCoverage]
public static class ConfigStrings
{
- public const string Default_Config_File = "config/settings.ini";
-
public const string Connection = "CONNECTION";
public const string Host = "Host";
public const string Port = "Port";
diff --git a/EOLib.Config/EOLib.Config.csproj b/EOLib.Config/EOLib.Config.csproj
index 5554d71fa..5e50a9114 100644
--- a/EOLib.Config/EOLib.Config.csproj
+++ b/EOLib.Config/EOLib.Config.csproj
@@ -15,4 +15,7 @@
+
+
+
\ No newline at end of file
diff --git a/EOLib.Graphics.Test/PEFileCollectionTest.cs b/EOLib.Graphics.Test/PEFileCollectionTest.cs
index 4793133f8..2ed604266 100644
--- a/EOLib.Graphics.Test/PEFileCollectionTest.cs
+++ b/EOLib.Graphics.Test/PEFileCollectionTest.cs
@@ -1,7 +1,7 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.IO;
-using System.Linq;
+using EOLib.Shared;
using Moq;
using NUnit.Framework;
using PELoaderLib;
@@ -11,7 +11,8 @@ namespace EOLib.Graphics.Test
[TestFixture, ExcludeFromCodeCoverage]
public class PEFileCollectionTest
{
- private const string ExpectedDirectory = "gfx";
+ private static readonly string _expectedDirectory = PathResolver.GetPath("gfx");
+ private static readonly string _expectedDirectoryRoot = _expectedDirectory.Split(Path.DirectorySeparatorChar)[0];
private IPEFileCollection _collection;
@@ -26,8 +27,8 @@ public void TearDown()
{
_collection.Dispose();
- if (Directory.Exists(ExpectedDirectory))
- Directory.Delete(ExpectedDirectory, true);
+ if (Directory.Exists(_expectedDirectoryRoot))
+ Directory.Delete(_expectedDirectoryRoot, recursive: true);
}
[Test]
@@ -67,11 +68,16 @@ public void Dispose_DisposesAllFiles()
Mock.Get(file).Verify(x => x.Dispose(), Times.Once);
}
- private void CreateExpectedDirectoryWithFiles(int numFiles = 0, string fileNameFormat = "gfx{0:D3}.egf")
+ private static void CreateExpectedDirectoryWithFiles(int numFiles = 0, string fileNameFormat = "gfx{0:D3}.egf")
{
- Directory.CreateDirectory(ExpectedDirectory);
+ var components = _expectedDirectory.Split(Path.DirectorySeparatorChar);
+ foreach (var component in components)
+ Directory.CreateDirectory(_expectedDirectory);
+
for (int i = 1; i <= numFiles; ++i)
- File.WriteAllText(string.Format(Path.Combine(ExpectedDirectory, fileNameFormat), i), "test contents");
+ {
+ File.WriteAllText(string.Format(Path.Combine(_expectedDirectory, fileNameFormat), i), "test contents");
+ }
}
}
}
diff --git a/EOLib.Graphics/EOLib.Graphics.csproj b/EOLib.Graphics/EOLib.Graphics.csproj
index 1721ccf7f..d9a617009 100644
--- a/EOLib.Graphics/EOLib.Graphics.csproj
+++ b/EOLib.Graphics/EOLib.Graphics.csproj
@@ -24,5 +24,6 @@
+
diff --git a/EOLib.Graphics/PEFileCollection.cs b/EOLib.Graphics/PEFileCollection.cs
index e6a52387c..3f8a17f92 100644
--- a/EOLib.Graphics/PEFileCollection.cs
+++ b/EOLib.Graphics/PEFileCollection.cs
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
-using System.IO;
using AutomaticTypeMapper;
+using EOLib.Shared;
using PELoaderLib;
namespace EOLib.Graphics
@@ -18,9 +18,7 @@ public void PopulateCollectionWithStandardGFX()
private IPEFile CreateGFXFile(GFXTypes file)
{
- var number = ((int)file).ToString("D3");
- var fName = Path.Combine("gfx", "gfx" + number + ".egf");
-
+ var fName = string.Format(Constants.GFXFormat, (int)file);
#if LINUX || OSX
return new PEFile(fName);
#else
diff --git a/EOLib.IO/Actions/MapFileLoadActions.cs b/EOLib.IO/Actions/MapFileLoadActions.cs
index 718b81bea..4184c3892 100644
--- a/EOLib.IO/Actions/MapFileLoadActions.cs
+++ b/EOLib.IO/Actions/MapFileLoadActions.cs
@@ -12,7 +12,7 @@ public class MapFileLoadActions : IMapFileLoadActions
private readonly IMapFileLoadService _mapFileLoadService;
public MapFileLoadActions(IMapFileRepository mapFileRepository,
- IMapFileLoadService mapFileLoadService)
+ IMapFileLoadService mapFileLoadService)
{
_mapFileRepository = mapFileRepository;
_mapFileLoadService = mapFileLoadService;
diff --git a/EOLib.IO/EOLib.IO.csproj b/EOLib.IO/EOLib.IO.csproj
index 4c29c00b9..d9d6e1662 100644
--- a/EOLib.IO/EOLib.IO.csproj
+++ b/EOLib.IO/EOLib.IO.csproj
@@ -17,4 +17,7 @@
+
+
+
\ No newline at end of file
diff --git a/EOLib.IO/Map/MapFile.cs b/EOLib.IO/Map/MapFile.cs
index 8730cc3bc..3ec35bd0b 100644
--- a/EOLib.IO/Map/MapFile.cs
+++ b/EOLib.IO/Map/MapFile.cs
@@ -6,8 +6,6 @@ namespace EOLib.IO.Map
{
public class MapFile : IMapFile
{
- public const string MapFileFormatString = "maps/{0,5:D5}.emf";
-
public IMapFileProperties Properties { get; private set; }
public IReadOnlyMatrix Tiles => _mutableTiles;
diff --git a/EOLib.IO/NumericConstants.cs b/EOLib.IO/NumericConstants.cs
deleted file mode 100644
index c2746da31..000000000
--- a/EOLib.IO/NumericConstants.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Diagnostics.CodeAnalysis;
-
-namespace EOLib.IO
-{
- [ExcludeFromCodeCoverage]
- public static class NumericConstants
- {
- public const uint ONE_BYTE_MAX = 253;
- public const uint TWO_BYTE_MAX = ONE_BYTE_MAX * ONE_BYTE_MAX;
- public const uint THREE_BYTE_MAX = ONE_BYTE_MAX * ONE_BYTE_MAX * ONE_BYTE_MAX;
- public const uint FOUR_BYTE_MAX = ONE_BYTE_MAX * ONE_BYTE_MAX * ONE_BYTE_MAX * ONE_BYTE_MAX;
-
- public static readonly uint[] NUMERIC_MAXIMUM = { ONE_BYTE_MAX, TWO_BYTE_MAX, THREE_BYTE_MAX, FOUR_BYTE_MAX };
- }
-}
diff --git a/EOLib.IO/PubFileNameConstants.cs b/EOLib.IO/PubFileNameConstants.cs
deleted file mode 100644
index 28708da13..000000000
--- a/EOLib.IO/PubFileNameConstants.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-namespace EOLib.IO
-{
- public static class PubFileNameConstants
- {
- public const string PubDirectory = "pub";
-
- public const string EIFFormat = "pub/dat{0,3:D3}.eif";
- public const string EIFFilter = "dat*.eif";
-
- public const string ENFFormat = "pub/dtn{0,3:D3}.enf";
- public const string ENFFilter = "dtn*.enf";
-
- public const string ESFFormat = "pub/dsl{0,3:D3}.esf";
- public const string ESFFilter = "dsl*.esf";
-
- public const string ECFFormat = "pub/dat{0,3:D3}.ecf";
- public const string ECFFilter = "dat*.ecf";
- }
-}
diff --git a/EOLib.IO/Services/BasePubLoadService.cs b/EOLib.IO/Services/BasePubLoadService.cs
index 16d5ec649..174762e99 100644
--- a/EOLib.IO/Services/BasePubLoadService.cs
+++ b/EOLib.IO/Services/BasePubLoadService.cs
@@ -3,6 +3,7 @@
using System.IO;
using EOLib.IO.Pub;
using EOLib.IO.Services.Serializers;
+using EOLib.Shared;
namespace EOLib.IO.Services
{
@@ -20,7 +21,7 @@ protected BasePubLoadService(IPubFileDeserializer pubFileDeserializer)
public IEnumerable> LoadPubFromDefaultFile()
{
- return LoadPubFromExplicitFile(PubFileNameConstants.PubDirectory, FileFilter);
+ return LoadPubFromExplicitFile(Constants.PubDirectory, FileFilter);
}
public IEnumerable> LoadPubFromExplicitFile(string directory, string searchPattern)
diff --git a/EOLib.IO/Services/ClassFileLoadService.cs b/EOLib.IO/Services/ClassFileLoadService.cs
index 3b1478861..bce0392f7 100644
--- a/EOLib.IO/Services/ClassFileLoadService.cs
+++ b/EOLib.IO/Services/ClassFileLoadService.cs
@@ -1,13 +1,14 @@
using AutomaticTypeMapper;
using EOLib.IO.Pub;
using EOLib.IO.Services.Serializers;
+using EOLib.Shared;
namespace EOLib.IO.Services
{
[AutoMappedType]
public class ClassFileLoadService : BasePubLoadService
{
- protected override string FileFilter => PubFileNameConstants.ECFFilter;
+ protected override string FileFilter => Constants.ECFFilter;
public ClassFileLoadService(IPubFileDeserializer pubFileDeserializer)
: base(pubFileDeserializer)
diff --git a/EOLib.IO/Services/ItemFileLoadService.cs b/EOLib.IO/Services/ItemFileLoadService.cs
index 432bc3e9e..675ddbac7 100644
--- a/EOLib.IO/Services/ItemFileLoadService.cs
+++ b/EOLib.IO/Services/ItemFileLoadService.cs
@@ -1,13 +1,14 @@
using AutomaticTypeMapper;
using EOLib.IO.Pub;
using EOLib.IO.Services.Serializers;
+using EOLib.Shared;
namespace EOLib.IO.Services
{
[AutoMappedType]
public class ItemFileLoadService : BasePubLoadService
{
- protected override string FileFilter => PubFileNameConstants.EIFFilter;
+ protected override string FileFilter => Constants.EIFFilter;
public ItemFileLoadService(IPubFileDeserializer pubFileDeserializer)
: base(pubFileDeserializer)
diff --git a/EOLib.IO/Services/MapFileLoadService.cs b/EOLib.IO/Services/MapFileLoadService.cs
index ac859dcf9..ec2cca22c 100644
--- a/EOLib.IO/Services/MapFileLoadService.cs
+++ b/EOLib.IO/Services/MapFileLoadService.cs
@@ -1,7 +1,10 @@
-using System.IO;
+using System;
+using System.IO;
+using System.Runtime.InteropServices;
using AutomaticTypeMapper;
using EOLib.IO.Map;
using EOLib.IO.Services.Serializers;
+using EOLib.Shared;
namespace EOLib.IO.Services
{
@@ -17,7 +20,7 @@ public MapFileLoadService(IMapDeserializer mapFileSerializer)
public IMapFile LoadMapByID(int mapID)
{
- var mapFileBytes = File.ReadAllBytes(string.Format(MapFile.MapFileFormatString, mapID));
+ var mapFileBytes = File.ReadAllBytes(string.Format(Constants.MapFileFormatString, mapID));
var mapFile = _mapFileSerializer
.DeserializeFromByteArray(mapFileBytes)
diff --git a/EOLib.IO/Services/MapFileSaveService.cs b/EOLib.IO/Services/MapFileSaveService.cs
index fc894ddd0..21baae552 100644
--- a/EOLib.IO/Services/MapFileSaveService.cs
+++ b/EOLib.IO/Services/MapFileSaveService.cs
@@ -3,6 +3,7 @@
using AutomaticTypeMapper;
using EOLib.IO.Map;
using EOLib.IO.Services.Serializers;
+using EOLib.Shared;
namespace EOLib.IO.Services
{
@@ -18,11 +19,11 @@ public MapFileSaveService(IMapFileSerializer mapFileSerializer)
public void SaveFileToDefaultDirectory(IMapFile mapFile, bool rewriteChecksum = true)
{
- var directoryName = Path.GetDirectoryName(string.Format(MapFile.MapFileFormatString, 1)) ?? "";
+ var directoryName = Constants.MapDirectory;
if (!Directory.Exists(directoryName))
Directory.CreateDirectory(directoryName);
- File.WriteAllBytes(string.Format(MapFile.MapFileFormatString, mapFile.Properties.MapID),
+ File.WriteAllBytes(string.Format(Constants.MapFileFormatString, mapFile.Properties.MapID),
_mapFileSerializer.SerializeToByteArray(mapFile, rewriteChecksum));
}
diff --git a/EOLib.IO/Services/NPCFileLoadService.cs b/EOLib.IO/Services/NPCFileLoadService.cs
index 6ca58027c..be018ed15 100644
--- a/EOLib.IO/Services/NPCFileLoadService.cs
+++ b/EOLib.IO/Services/NPCFileLoadService.cs
@@ -1,13 +1,14 @@
using AutomaticTypeMapper;
using EOLib.IO.Pub;
using EOLib.IO.Services.Serializers;
+using EOLib.Shared;
namespace EOLib.IO.Services
{
[AutoMappedType]
public class NPCFileLoadService : BasePubLoadService
{
- protected override string FileFilter => PubFileNameConstants.ENFFilter;
+ protected override string FileFilter => Constants.ENFFilter;
public NPCFileLoadService(IPubFileDeserializer pubFileDeserializer)
: base(pubFileDeserializer)
diff --git a/EOLib.IO/Services/SpellFileLoadService.cs b/EOLib.IO/Services/SpellFileLoadService.cs
index 0eb60642f..e8bd29c67 100644
--- a/EOLib.IO/Services/SpellFileLoadService.cs
+++ b/EOLib.IO/Services/SpellFileLoadService.cs
@@ -1,13 +1,14 @@
using AutomaticTypeMapper;
using EOLib.IO.Pub;
using EOLib.IO.Services.Serializers;
+using EOLib.Shared;
namespace EOLib.IO.Services
{
[AutoMappedType]
public class SpellFileLoadService : BasePubLoadService
{
- protected override string FileFilter => PubFileNameConstants.ESFFilter;
+ protected override string FileFilter => Constants.ESFFilter;
public SpellFileLoadService(IPubFileDeserializer pubFileDeserializer)
: base(pubFileDeserializer)
diff --git a/EOLib.Localization.Test/DataFileLoadActionsTest.cs b/EOLib.Localization.Test/DataFileLoadActionsTest.cs
index 9735c14c0..b9a2e0c08 100644
--- a/EOLib.Localization.Test/DataFileLoadActionsTest.cs
+++ b/EOLib.Localization.Test/DataFileLoadActionsTest.cs
@@ -1,5 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.IO;
+using EOLib.Shared;
using NUnit.Framework;
namespace EOLib.Localization.Test
@@ -22,8 +23,8 @@ public void SetUp()
[TearDown]
public void TearDown()
{
- if (Directory.Exists(DataFileConstants.DataFilePath))
- Directory.Delete(DataFileConstants.DataFilePath, true);
+ if (Directory.Exists(Constants.DataFilePath))
+ Directory.Delete(Constants.DataFilePath, true);
}
[Test]
@@ -59,20 +60,20 @@ public void WhenLoadDataFiles_RepositoryHasExpectedNumberOfFiles()
_actions.LoadDataFiles();
- Assert.That(_dataFileRepository.DataFiles.Count, Is.EqualTo(DataFileConstants.ExpectedNumberOfDataFiles));
+ Assert.That(_dataFileRepository.DataFiles.Count, Is.EqualTo(Constants.ExpectedNumberOfDataFiles));
}
private void CreateRequiredDirectory()
{
- if (!Directory.Exists(DataFileConstants.DataFilePath))
- Directory.CreateDirectory(DataFileConstants.DataFilePath);
+ if (!Directory.Exists(Constants.DataFilePath))
+ Directory.CreateDirectory(Constants.DataFilePath);
}
- private void GivenEDFFilesInRequiredDirectory(int numberOfFiles = DataFileConstants.ExpectedNumberOfDataFiles,
+ private void GivenEDFFilesInRequiredDirectory(int numberOfFiles = Constants.ExpectedNumberOfDataFiles,
string nameFormat = "dat0{0:00}.edf")
{
for (int i = 1; i <= numberOfFiles; ++i)
- File.Create(string.Format(Path.Combine(DataFileConstants.DataFilePath, nameFormat), i)).Close();
+ File.Create(string.Format(Path.Combine(Constants.DataFilePath, nameFormat), i)).Close();
}
}
}
diff --git a/EOLib.Localization/DataFileConstants.cs b/EOLib.Localization/DataFileConstants.cs
deleted file mode 100644
index d65a64d24..000000000
--- a/EOLib.Localization/DataFileConstants.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace EOLib.Localization
-{
- public static class DataFileConstants
- {
- public const string DataFilePath = "data/";
- public const int ExpectedNumberOfDataFiles = 12;
- }
-}
diff --git a/EOLib.Localization/DataFileLoadActions.cs b/EOLib.Localization/DataFileLoadActions.cs
index 72ce8f619..d05ad3aae 100644
--- a/EOLib.Localization/DataFileLoadActions.cs
+++ b/EOLib.Localization/DataFileLoadActions.cs
@@ -1,6 +1,8 @@
using System.IO;
using System.Linq;
+using System.Runtime.InteropServices;
using AutomaticTypeMapper;
+using EOLib.Shared;
namespace EOLib.Localization
{
@@ -19,17 +21,17 @@ public DataFileLoadActions(IDataFileRepository dataFileRepository,
public void LoadDataFiles()
{
- if (!Directory.Exists(DataFileConstants.DataFilePath))
+ if (!Directory.Exists(Constants.DataFilePath))
throw new DataFileLoadException();
- var files = Directory.GetFiles(DataFileConstants.DataFilePath, "*.edf")
+ var files = Directory.GetFiles(Constants.DataFilePath, "*.edf")
.OrderBy(x => x)
.ToArray();
- if (files.Length != DataFileConstants.ExpectedNumberOfDataFiles)
+ if (files.Length != Constants.ExpectedNumberOfDataFiles)
throw new DataFileLoadException();
_dataFileRepository.DataFiles.Clear();
- for (int i = 1; i <= DataFileConstants.ExpectedNumberOfDataFiles; ++i)
+ for (int i = 1; i <= Constants.ExpectedNumberOfDataFiles; ++i)
{
if (!DataFileNameIsValid(i, files[i - 1]))
throw new DataFileLoadException();
@@ -41,7 +43,7 @@ public void LoadDataFiles()
private bool DataFileNameIsValid(int fileNumber, string fileName)
{
- var expectedFormat = $"data/dat0{fileNumber:00}.edf";
+ var expectedFormat = string.Format(Constants.DataFileFormat, fileNumber).Replace('/', Path.DirectorySeparatorChar);
return expectedFormat == fileName;
}
}
diff --git a/EOLib.Localization/DataFileRepository.cs b/EOLib.Localization/DataFileRepository.cs
index c3b3347db..71518d90a 100644
--- a/EOLib.Localization/DataFileRepository.cs
+++ b/EOLib.Localization/DataFileRepository.cs
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using AutomaticTypeMapper;
+using EOLib.Shared;
namespace EOLib.Localization
{
@@ -14,7 +15,7 @@ public class DataFileRepository : IDataFileRepository, IDataFileProvider
public DataFileRepository()
{
- _dataFiles = new Dictionary(DataFileConstants.ExpectedNumberOfDataFiles);
+ _dataFiles = new Dictionary(Constants.ExpectedNumberOfDataFiles);
}
}
diff --git a/EOLib.Logger/Constants.cs b/EOLib.Logger/Constants.cs
deleted file mode 100644
index 3df2bbe1b..000000000
--- a/EOLib.Logger/Constants.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace EOLib.Logger
-{
- internal static class Constants
- {
- internal const int FLUSH_TIME_MS = 30000;
- internal const int FLUSH_LINES_WRITTEN = 50;
- internal const int SPLIT_FILE_BYTE_LENGTH = 100000;
-
- internal const string LOG_DIRECTORY = "log";
-
- internal const string LOG_FILE_PATH = LOG_DIRECTORY + "/debug.log";
- internal const string LOG_FILE_FMT = LOG_DIRECTORY + "/{0}-debug.log";
- }
-}
diff --git a/EOLib.Shared/Constants.cs b/EOLib.Shared/Constants.cs
new file mode 100644
index 000000000..d422ffc89
--- /dev/null
+++ b/EOLib.Shared/Constants.cs
@@ -0,0 +1,88 @@
+namespace EOLib.Shared
+{
+ public static class Constants
+ {
+ public const int MaxChallenge = 11_092_110;
+
+ public const byte ViewLength = 16;
+
+ public const int LockerMaxSingleItemAmount = 200;
+ public const int MaxLockerUpgrades = 7;
+ public const int PartyRequestTimeoutSeconds = 15;
+ public const int TradeRequestTimeoutSeconds = 15;
+ public const int MuteDefaultTimeMinutes = 5;
+
+ public const int GhostTime = 5;
+
+ public const int ExpectedNumberOfDataFiles = 12;
+
+ public static string Default_Config_File { get; } = PathResolver.GetModifiablePath("config/settings.ini");
+
+ public static string DataFilePath { get; } = PathResolver.GetPath("data");
+ public static string DataFileFormat { get; } = PathResolver.GetPath("data/dat{0,3:D3}.edf");
+
+ public static string MapDirectory { get; } = PathResolver.GetModifiablePath("maps");
+ public static string MapFileFormatString { get; } = $"{MapDirectory}/{{0,5:D5}}.emf";
+
+ public static string PubDirectory = "pub";
+ public static string EIFFormat { get; } = PathResolver.GetModifiablePath("pub/dat{0,3:D3}.eif");
+ public static string ENFFormat { get; } = PathResolver.GetModifiablePath("pub/dtn{0,3:D3}.enf");
+ public static string ESFFormat { get; } = PathResolver.GetModifiablePath("pub/dsl{0,3:D3}.esf");
+ public static string ECFFormat { get; } = PathResolver.GetModifiablePath("pub/dat{0,3:D3}.ecf");
+
+ public const string EIFFilter = "dat*.eif";
+ public const string ENFFilter = "dtn*.enf";
+ public const string ESFFilter = "dsl*.esf";
+ public const string ECFFilter = "dat*.ecf";
+
+ public static string GFXFormat { get; } = PathResolver.GetPath("gfx/gfx{0,3:D3}.egf");
+
+ public static string SfxDirectory { get; } = PathResolver.GetPath("sfx");
+ public static string MfxDirectory { get; } = PathResolver.GetPath("mfx");
+ public static string JboxDirectory { get; } = PathResolver.GetPath("jbox");
+
+ public static string FriendListFile { get; } = PathResolver.GetModifiablePath("config/friends.ini");
+ public static string IgnoreListFile { get; } = PathResolver.GetModifiablePath("config/ignore.ini");
+
+ public static string InventoryFile { get; } = PathResolver.GetModifiablePath("config/inventory.ini");
+ public static string SpellsFile { get; } = PathResolver.GetModifiablePath("config/spells.ini");
+ public static string PanelLayoutFile { get; } = PathResolver.GetModifiablePath("config/layout.ini");
+ public static string ChatLogFile { get; } = PathResolver.GetModifiablePath("chatlog.txt");
+
+ //Should be easily customizable between different clients (based on graphics)
+ //not a config option because this shouldn't be exposed at the user level
+ public static readonly int[] TrapSpikeGFXObjectIDs = { 449, 450, 451, 452 };
+
+ //not a config option because this shouldn't be exposed at the user level
+ public const int NPCDropProtectSeconds = 30;
+ public const int PlayerDropProtectSeconds = 5;
+
+ // Weapon graphics of instruments (there is no pub flag for this)
+ public static readonly int[] Instruments = { 49, 50 };
+ public const string FontSize07 = @"BitmapFonts/sans_09px";
+ public const string FontSize08 = @"BitmapFonts/sans_11px";
+ public const string FontSize08pt5 = @"BitmapFonts/sans_11px_103pct";
+ public const string FontSize09 = @"BitmapFonts/sans_12px";
+ public const string FontSize10 = @"BitmapFonts/sans_13px";
+
+ public const int OutOfBand_Packets_Handled_Per_Update = 10;
+
+ public const string CreditsText = @"Endless Online - C# Client
+Developed by Ethan Moffat
+Based on Endless Online --
+Copyright Vult-R
+
+Thanks to :
+--Sausage for eoserv + C# EO libs
+--eoserv.net community
+--Hotdog for Eodev client
+
+Contributors :
+-- Sorokya
+-- Septharoth
+-- miou-gh
+-- CoderDanUK";
+
+ public const string VersionInfoFormat = "{0}.{1:000}.{2:000} - {3}:{4}";
+ }
+}
diff --git a/EOLib.Shared/EOLib.Shared.csproj b/EOLib.Shared/EOLib.Shared.csproj
new file mode 100644
index 000000000..566c7b721
--- /dev/null
+++ b/EOLib.Shared/EOLib.Shared.csproj
@@ -0,0 +1,17 @@
+
+
+
+ netstandard2.0
+ 8.0
+ Library
+ ..\bin\$(Configuration)\lib\
+ enable
+ Base library for Endless Online development
+
+
+ $(DefineConstants);LINUX
+
+
+ true
+
+
diff --git a/EOLib.Shared/PathResolver.cs b/EOLib.Shared/PathResolver.cs
new file mode 100644
index 000000000..21f79421f
--- /dev/null
+++ b/EOLib.Shared/PathResolver.cs
@@ -0,0 +1,38 @@
+using System.IO;
+using System.Runtime.InteropServices;
+using System;
+
+namespace EOLib.Shared
+{
+ public static class PathResolver
+ {
+ public const string LocalFilesRoot = ".endlessclient";
+ public static string ResourcesRoot { get; } = Path.Combine("Contents", "Resources");
+
+ public static string GetPath(string inputPath)
+ {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ return Path.Combine(ResourcesRoot, inputPath);
+ }
+ else
+ {
+ return inputPath;
+ }
+ }
+
+ public static string GetModifiablePath(string inputPath)
+ {
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ {
+ var home = Environment.GetEnvironmentVariable("HOME");
+ if (home != null)
+ {
+ return Path.Combine(home, LocalFilesRoot, inputPath);
+ }
+ }
+
+ return inputPath;
+ }
+ }
+}
diff --git a/EOLib/Domain/Character/WalkValidationActions.cs b/EOLib/Domain/Character/WalkValidationActions.cs
index f4eba99e9..87facea41 100644
--- a/EOLib/Domain/Character/WalkValidationActions.cs
+++ b/EOLib/Domain/Character/WalkValidationActions.cs
@@ -4,6 +4,7 @@
using EOLib.Domain.Extensions;
using EOLib.Domain.Map;
using EOLib.IO.Map;
+using EOLib.Shared;
using Optional;
namespace EOLib.Domain.Character
diff --git a/EOLib/Domain/Chat/ChatLoggerProvider.cs b/EOLib/Domain/Chat/ChatLoggerProvider.cs
index 29f8bbb49..b36a80445 100644
--- a/EOLib/Domain/Chat/ChatLoggerProvider.cs
+++ b/EOLib/Domain/Chat/ChatLoggerProvider.cs
@@ -2,6 +2,7 @@
using AutomaticTypeMapper;
using EOLib.Config;
using EOLib.Logger;
+using EOLib.Shared;
namespace EOLib.Domain.Chat
{
diff --git a/EOLib/Domain/Item/ItemPickupValidator.cs b/EOLib/Domain/Item/ItemPickupValidator.cs
index edb6143f5..6e0dfa71a 100644
--- a/EOLib/Domain/Item/ItemPickupValidator.cs
+++ b/EOLib/Domain/Item/ItemPickupValidator.cs
@@ -4,6 +4,7 @@
using EOLib.Domain.Character;
using EOLib.Domain.Map;
using EOLib.IO.Repositories;
+using EOLib.Shared;
using Optional;
namespace EOLib.Domain.Item
diff --git a/EOLib/Domain/Spells/SpellCastValidationActions.cs b/EOLib/Domain/Spells/SpellCastValidationActions.cs
index e6f805fbf..ecf9d272b 100644
--- a/EOLib/Domain/Spells/SpellCastValidationActions.cs
+++ b/EOLib/Domain/Spells/SpellCastValidationActions.cs
@@ -7,6 +7,7 @@
using EOLib.Domain.Party;
using EOLib.IO;
using EOLib.IO.Repositories;
+using EOLib.Shared;
namespace EOLib.Domain.Spells
{
diff --git a/EOLib/EOLib.csproj b/EOLib/EOLib.csproj
index 3c354ebdd..f2d082e1a 100644
--- a/EOLib/EOLib.csproj
+++ b/EOLib/EOLib.csproj
@@ -18,6 +18,7 @@
+
diff --git a/EOLib/Net/Communication/INetworkClientFactory.cs b/EOLib/Net/Communication/INetworkClientFactory.cs
index ea701ed98..9aef6d64c 100644
--- a/EOLib/Net/Communication/INetworkClientFactory.cs
+++ b/EOLib/Net/Communication/INetworkClientFactory.cs
@@ -2,6 +2,6 @@
{
public interface INetworkClientFactory
{
- INetworkClient CreateNetworkClient(int timeout = Constants.ResponseTimeout);
+ INetworkClient CreateNetworkClient(int timeout = TimeoutConstants.ResponseTimeout);
}
}
diff --git a/EOLib/Net/Communication/IWaitablePacketQueue.cs b/EOLib/Net/Communication/IWaitablePacketQueue.cs
index c6168018d..c00bad0f7 100644
--- a/EOLib/Net/Communication/IWaitablePacketQueue.cs
+++ b/EOLib/Net/Communication/IWaitablePacketQueue.cs
@@ -7,6 +7,6 @@ public interface IWaitablePacketQueue : IPacketQueue
{
void EnqueuePacketAndSignalConsumer(IPacket packet);
- Task WaitForPacketAndDequeue(int timeOut = Constants.ResponseTimeout);
+ Task WaitForPacketAndDequeue(int timeOut = TimeoutConstants.ResponseTimeout);
}
}
diff --git a/EOLib/Net/Communication/NetworkClientFactory.cs b/EOLib/Net/Communication/NetworkClientFactory.cs
index 1e48b80f0..8d1e3901c 100644
--- a/EOLib/Net/Communication/NetworkClientFactory.cs
+++ b/EOLib/Net/Communication/NetworkClientFactory.cs
@@ -1,7 +1,6 @@
using System;
using AutomaticTypeMapper;
using EOLib.IO.Services;
-using EOLib.Logger;
using EOLib.Net.Handlers;
using EOLib.Net.PacketProcessing;
@@ -23,7 +22,7 @@ public NetworkClientFactory(IPacketProcessActions packetProcessActions,
_numberEncoderService = numberEncoderService;
}
- public INetworkClient CreateNetworkClient(int timeout = Constants.ResponseTimeout)
+ public INetworkClient CreateNetworkClient(int timeout = TimeoutConstants.ResponseTimeout)
{
return new NetworkClient(_packetProcessActions, _packetHandlingActions, _numberEncoderService, TimeSpan.FromMilliseconds(timeout));
}
diff --git a/EOLib/Net/Communication/PacketQueue.cs b/EOLib/Net/Communication/PacketQueue.cs
index 8dd5763fb..5b908d648 100644
--- a/EOLib/Net/Communication/PacketQueue.cs
+++ b/EOLib/Net/Communication/PacketQueue.cs
@@ -51,7 +51,7 @@ public IPacket DequeueFirstPacket()
return _internalQueue.Dequeue();
}
- public async Task WaitForPacketAndDequeue(int timeOut = Constants.ResponseTimeout)
+ public async Task WaitForPacketAndDequeue(int timeOut = TimeoutConstants.ResponseTimeout)
{
if (QueuedPacketCount > 0)
return DequeueFirstPacket();
diff --git a/EOLib/Net/Communication/TimeoutConstants.cs b/EOLib/Net/Communication/TimeoutConstants.cs
new file mode 100644
index 000000000..f7d9d2a51
--- /dev/null
+++ b/EOLib/Net/Communication/TimeoutConstants.cs
@@ -0,0 +1,8 @@
+namespace EOLib.Net.Communication
+{
+ internal class TimeoutConstants
+ {
+ public const int ResponseTimeout = 5000;
+ public const int ResponseFileTimeout = 10000;
+ }
+}
diff --git a/EOLib/Net/FileTransfer/FileRequestActions.cs b/EOLib/Net/FileTransfer/FileRequestActions.cs
index 562c15257..8f18c9a2a 100644
--- a/EOLib/Net/FileTransfer/FileRequestActions.cs
+++ b/EOLib/Net/FileTransfer/FileRequestActions.cs
@@ -6,12 +6,11 @@
using AutomaticTypeMapper;
using EOLib.Domain.Login;
using EOLib.Domain.Map;
-using EOLib.Domain.Protocol;
-using EOLib.IO;
using EOLib.IO.Extensions;
using EOLib.IO.Pub;
using EOLib.IO.Repositories;
using EOLib.IO.Services;
+using EOLib.Shared;
using Moffat.EndlessOnline.SDK.Protocol.Net.Client;
using Optional;
@@ -83,11 +82,11 @@ public async Task GetMapFromServer(int mapID, int sessionID)
public async Task GetItemFileFromServer(int sessionID)
{
- DeleteExisting(PubFileNameConstants.EIFFilter);
+ DeleteExisting(Constants.EIFFilter);
var itemFiles = await _fileRequestService.RequestFile(FileType.Eif, sessionID);
foreach (var file in itemFiles)
- _pubFileSaveService.SaveFile(string.Format(PubFileNameConstants.EIFFormat, file.ID), file, rewriteChecksum: false);
+ _pubFileSaveService.SaveFile(string.Format(Constants.EIFFormat, file.ID), file, rewriteChecksum: false);
_pubFileRepository.EIFFiles = itemFiles;
_pubFileRepository.EIFFile = PubFileExtensions.Merge(itemFiles);
@@ -95,33 +94,33 @@ public async Task GetItemFileFromServer(int sessionID)
public async Task GetNPCFileFromServer(int sessionID)
{
- DeleteExisting(PubFileNameConstants.ENFFilter);
+ DeleteExisting(Constants.ENFFilter);
var npcFiles = await _fileRequestService.RequestFile(FileType.Enf, sessionID);
foreach (var file in npcFiles)
- _pubFileSaveService.SaveFile(string.Format(PubFileNameConstants.ENFFormat, file.ID), file, rewriteChecksum: false);
+ _pubFileSaveService.SaveFile(string.Format(Constants.ENFFormat, file.ID), file, rewriteChecksum: false);
_pubFileRepository.ENFFiles = npcFiles;
_pubFileRepository.ENFFile = PubFileExtensions.Merge(npcFiles);
}
public async Task GetSpellFileFromServer(int sessionID)
{
- DeleteExisting(PubFileNameConstants.ESFFilter);
+ DeleteExisting(Constants.ESFFilter);
var spellFiles = await _fileRequestService.RequestFile(FileType.Esf, sessionID);
foreach (var file in spellFiles)
- _pubFileSaveService.SaveFile(string.Format(PubFileNameConstants.ESFFormat, file.ID), file, rewriteChecksum: false);
+ _pubFileSaveService.SaveFile(string.Format(Constants.ESFFormat, file.ID), file, rewriteChecksum: false);
_pubFileRepository.ESFFiles = spellFiles;
_pubFileRepository.ESFFile = PubFileExtensions.Merge(spellFiles);
}
public async Task GetClassFileFromServer(int sessionID)
{
- DeleteExisting(PubFileNameConstants.ECFFilter);
+ DeleteExisting(Constants.ECFFilter);
var classFiles = await _fileRequestService.RequestFile(FileType.Ecf, sessionID);
foreach (var file in classFiles)
- _pubFileSaveService.SaveFile(string.Format(PubFileNameConstants.ECFFormat, file.ID), file, rewriteChecksum: false);
+ _pubFileSaveService.SaveFile(string.Format(Constants.ECFFormat, file.ID), file, rewriteChecksum: false);
_pubFileRepository.ECFFiles = classFiles;
_pubFileRepository.ECFFile = PubFileExtensions.Merge(classFiles);
}
@@ -166,7 +165,7 @@ private static void DeleteExisting(string filter)
{
try
{
- foreach (var file in Directory.GetFiles("pub", filter))
+ foreach (var file in Directory.GetFiles(Constants.PubDirectory, filter))
File.Delete(file);
}
catch (IOException) { }
diff --git a/EOLib/Net/Handlers/OutOfBandPacketHandler.cs b/EOLib/Net/Handlers/OutOfBandPacketHandler.cs
index ce5abab16..7fc92a908 100644
--- a/EOLib/Net/Handlers/OutOfBandPacketHandler.cs
+++ b/EOLib/Net/Handlers/OutOfBandPacketHandler.cs
@@ -1,5 +1,6 @@
using AutomaticTypeMapper;
using EOLib.Net.Communication;
+using EOLib.Shared;
using Moffat.EndlessOnline.SDK.Protocol.Net;
namespace EOLib.Net.Handlers
diff --git a/EOLib/misc.cs b/EOLib/misc.cs
deleted file mode 100644
index f72a59ea1..000000000
--- a/EOLib/misc.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-namespace EOLib
-{
- public static class Constants
- {
- public const int MaxChallenge = 11_092_110;
-
- public const int ResponseTimeout = 5000;
- public const int ResponseFileTimeout = 10000;
-
- public const byte ViewLength = 16;
-
- public const int LockerMaxSingleItemAmount = 200;
- public const int MaxLockerUpgrades = 7;
- public const int PartyRequestTimeoutSeconds = 15;
- public const int TradeRequestTimeoutSeconds = 15;
- public const int MuteDefaultTimeMinutes = 5;
-
- public const int GhostTime = 5;
-
- public const string LogFilePath = "log/debug.log";
- public const string LogFileFmt = "log/{0}-debug.log";
-
- public const string SfxDirectory = "sfx";
- public const string MfxDirectory = "mfx";
- public const string JboxDirectory = "jbox";
-
- public const string FriendListFile = "config/friends.ini";
- public const string IgnoreListFile = "config/ignore.ini";
-
- public const string InventoryFile = "config/inventory.ini";
- public const string SpellsFile = "config/spells.ini";
- public const string PanelLayoutFile = "config/layout.ini";
- public const string ChatLogFile = "chatlog.txt";
-
- //Should be easily customizable between different clients (based on graphics)
- //not a config option because this shouldn't be exposed at the user level
- public static readonly int[] TrapSpikeGFXObjectIDs = { 449, 450, 451, 452 };
-
- //not a config option because this shouldn't be exposed at the user level
- public const int NPCDropProtectSeconds = 30;
- public const int PlayerDropProtectSeconds = 5;
-
- // Weapon graphics of instruments (there is no pub flag for this)
- public static readonly int[] Instruments = { 49, 50 };
- public const string FontSize07 = @"BitmapFonts/sans_09px";
- public const string FontSize08 = @"BitmapFonts/sans_11px";
- public const string FontSize08pt5 = @"BitmapFonts/sans_11px_103pct";
- public const string FontSize09 = @"BitmapFonts/sans_12px";
- public const string FontSize10 = @"BitmapFonts/sans_13px";
-
- public const int OutOfBand_Packets_Handled_Per_Update = 10;
-
- public const string CreditsText = @"Endless Online - C# Client
-Developed by Ethan Moffat
-Based on Endless Online --
-Copyright Vult-R
-
-Thanks to :
---Sausage for eoserv + C# EO libs
---eoserv.net community
---Hotdog for Eodev client
-
-Contributors :
--- Sorokya
--- Septharoth
--- miou-gh
--- CoderDanUK";
-
- public const string VersionInfoFormat = "{0}.{1:000}.{2:000} - {3}:{4}";
- }
-}
diff --git a/EndlessClient.sln b/EndlessClient.sln
index 500dfbe22..dadd85b5c 100644
--- a/EndlessClient.sln
+++ b/EndlessClient.sln
@@ -37,6 +37,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOBot", "EOBot\EOBot.csproj
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EndlessClient", "EndlessClient\EndlessClient.csproj", "{0EC2FDA3-00E9-4DF4-8743-85E2C911E6E8}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EOLib.Shared", "EOLib.Shared\EOLib.Shared.csproj", "{A71336EE-BAD7-4C90-87ED-A0B3A7A79EDA}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -99,6 +101,10 @@ Global
{0EC2FDA3-00E9-4DF4-8743-85E2C911E6E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0EC2FDA3-00E9-4DF4-8743-85E2C911E6E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0EC2FDA3-00E9-4DF4-8743-85E2C911E6E8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A71336EE-BAD7-4C90-87ED-A0B3A7A79EDA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A71336EE-BAD7-4C90-87ED-A0B3A7A79EDA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A71336EE-BAD7-4C90-87ED-A0B3A7A79EDA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A71336EE-BAD7-4C90-87ED-A0B3A7A79EDA}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -117,6 +123,7 @@ Global
{A55498F8-78C2-4760-AA2C-429D39F35BB8} = {7AD5F989-D76C-472E-90C7-66CCC2B8533C}
{09B4B9F7-64AF-4E6A-AAE1-52C41201179A} = {795A3BFF-4306-456D-86AB-6A680A2B7C0B}
{1061D316-7F0B-4BD5-9821-A8FF7DE32F6E} = {795A3BFF-4306-456D-86AB-6A680A2B7C0B}
+ {A71336EE-BAD7-4C90-87ED-A0B3A7A79EDA} = {9C490FC1-F83A-43E0-9FFE-2F2588669195}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CED36352-F489-4071-A4F8-51FC08795DC7}
diff --git a/EndlessClient/Audio/MfxPlayer.cs b/EndlessClient/Audio/MfxPlayer.cs
index e99156ead..215016587 100644
--- a/EndlessClient/Audio/MfxPlayer.cs
+++ b/EndlessClient/Audio/MfxPlayer.cs
@@ -3,9 +3,9 @@
using System.Linq;
using AutomaticTypeMapper;
using Commons.Music.Midi;
-using EOLib;
using EOLib.Config;
using EOLib.IO.Map;
+using EOLib.Shared;
namespace EndlessClient.Audio
{
diff --git a/EndlessClient/Content/ContentProvider.cs b/EndlessClient/Content/ContentProvider.cs
index 499cdc7f0..87e41adc4 100644
--- a/EndlessClient/Content/ContentProvider.cs
+++ b/EndlessClient/Content/ContentProvider.cs
@@ -3,7 +3,7 @@
using System.Linq;
using AutomaticTypeMapper;
using EndlessClient.Audio;
-using EOLib;
+using EOLib.Shared;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
diff --git a/EndlessClient/ControlSets/CreateAccountControlSet.cs b/EndlessClient/ControlSets/CreateAccountControlSet.cs
index e6ed30993..a6f6eee51 100644
--- a/EndlessClient/ControlSets/CreateAccountControlSet.cs
+++ b/EndlessClient/ControlSets/CreateAccountControlSet.cs
@@ -4,12 +4,11 @@
using EndlessClient.Content;
using EndlessClient.Controllers;
using EndlessClient.GameExecution;
-using EndlessClient.Input;
using EndlessClient.Rendering;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Account;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using XNAControls;
diff --git a/EndlessClient/ControlSets/InitialControlSet.cs b/EndlessClient/ControlSets/InitialControlSet.cs
index c04a99ad1..6f35726b2 100644
--- a/EndlessClient/ControlSets/InitialControlSet.cs
+++ b/EndlessClient/ControlSets/InitialControlSet.cs
@@ -3,9 +3,9 @@
using EndlessClient.Content;
using EndlessClient.Controllers;
using EndlessClient.GameExecution;
-using EOLib;
using EOLib.Config;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using XNAControls;
diff --git a/EndlessClient/ControlSets/LoginPromptControlSet.cs b/EndlessClient/ControlSets/LoginPromptControlSet.cs
index f9c5cb6f1..f82a060f2 100644
--- a/EndlessClient/ControlSets/LoginPromptControlSet.cs
+++ b/EndlessClient/ControlSets/LoginPromptControlSet.cs
@@ -1,15 +1,13 @@
using System;
-using System.Linq;
using System.Threading.Tasks;
using EndlessClient.Content;
using EndlessClient.Controllers;
using EndlessClient.GameExecution;
-using EndlessClient.Input;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Config;
using EOLib.Domain.Login;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using XNAControls;
diff --git a/EndlessClient/ControlSets/ViewCreditsControlSet.cs b/EndlessClient/ControlSets/ViewCreditsControlSet.cs
index ff814bce3..96633894e 100644
--- a/EndlessClient/ControlSets/ViewCreditsControlSet.cs
+++ b/EndlessClient/ControlSets/ViewCreditsControlSet.cs
@@ -1,7 +1,7 @@
using EndlessClient.Controllers;
using EndlessClient.GameExecution;
-using EOLib;
using EOLib.Config;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using XNAControls;
diff --git a/EndlessClient/Controllers/InventoryController.cs b/EndlessClient/Controllers/InventoryController.cs
index b02aff060..6dd036765 100644
--- a/EndlessClient/Controllers/InventoryController.cs
+++ b/EndlessClient/Controllers/InventoryController.cs
@@ -10,19 +10,18 @@
using EndlessClient.HUD.Controls;
using EndlessClient.Rendering.Character;
using EndlessClient.Rendering.Map;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Domain.Chat;
using EOLib.Domain.Interact;
using EOLib.Domain.Interact.Bank;
using EOLib.Domain.Item;
-using EOLib.Domain.Login;
using EOLib.Domain.Map;
using EOLib.Domain.Trade;
using EOLib.IO;
using EOLib.IO.Pub;
using EOLib.IO.Repositories;
using EOLib.Localization;
+using EOLib.Shared;
using XNAControls;
namespace EndlessClient.Controllers
diff --git a/EndlessClient/Controllers/LoginController.cs b/EndlessClient/Controllers/LoginController.cs
index 485df7276..81a99c249 100644
--- a/EndlessClient/Controllers/LoginController.cs
+++ b/EndlessClient/Controllers/LoginController.cs
@@ -11,7 +11,6 @@
using EndlessClient.Input;
using EndlessClient.Rendering;
using EndlessClient.Rendering.Map;
-using EOLib;
using EOLib.Config;
using EOLib.Domain.Character;
using EOLib.Domain.Chat;
@@ -22,6 +21,7 @@
using EOLib.Net;
using EOLib.Net.Communication;
using EOLib.Net.FileTransfer;
+using EOLib.Shared;
using Moffat.EndlessOnline.SDK.Protocol.Net.Client;
using Moffat.EndlessOnline.SDK.Protocol.Net.Server;
diff --git a/EndlessClient/Controllers/MainButtonController.cs b/EndlessClient/Controllers/MainButtonController.cs
index 84e8401a9..5065e21bf 100644
--- a/EndlessClient/Controllers/MainButtonController.cs
+++ b/EndlessClient/Controllers/MainButtonController.cs
@@ -5,11 +5,11 @@
using EndlessClient.Dialogs.Actions;
using EndlessClient.GameExecution;
using EndlessClient.Rendering;
-using EOLib;
using EOLib.Domain;
using EOLib.Net.Communication;
using EOLib.Net.Connection;
using EOLib.Net.PacketProcessing;
+using EOLib.Shared;
using Moffat.EndlessOnline.SDK.Packet;
using Moffat.EndlessOnline.SDK.Protocol.Net.Server;
diff --git a/EndlessClient/Dialogs/BankAccountDialog.cs b/EndlessClient/Dialogs/BankAccountDialog.cs
index 296ea09ad..3eb6a5673 100644
--- a/EndlessClient/Dialogs/BankAccountDialog.cs
+++ b/EndlessClient/Dialogs/BankAccountDialog.cs
@@ -5,12 +5,12 @@
using EndlessClient.HUD;
using EndlessClient.HUD.Controls;
using EndlessClient.HUD.Panels;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Domain.Interact.Bank;
using EOLib.Graphics;
using EOLib.IO.Repositories;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Optional;
using Optional.Collections;
diff --git a/EndlessClient/Dialogs/BoardDialog.cs b/EndlessClient/Dialogs/BoardDialog.cs
index 3e0f28e75..5a5ce5a89 100644
--- a/EndlessClient/Dialogs/BoardDialog.cs
+++ b/EndlessClient/Dialogs/BoardDialog.cs
@@ -7,12 +7,12 @@
using EndlessClient.Dialogs.Services;
using EndlessClient.HUD.Controls;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Domain.Interact.Board;
using EOLib.Domain.Login;
using EOLib.Graphics;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using MonoGame.Extended.Input.InputListeners;
using Optional;
diff --git a/EndlessClient/Dialogs/BookDialog.cs b/EndlessClient/Dialogs/BookDialog.cs
index e17bd9c19..fd85c5832 100644
--- a/EndlessClient/Dialogs/BookDialog.cs
+++ b/EndlessClient/Dialogs/BookDialog.cs
@@ -2,10 +2,10 @@
using System.Collections.Generic;
using EndlessClient.Dialogs.Services;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Graphics;
using EOLib.IO.Repositories;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using XNAControls;
using static EndlessClient.Dialogs.QuestStatusListDialogItem;
diff --git a/EndlessClient/Dialogs/ChangePasswordDialog.cs b/EndlessClient/Dialogs/ChangePasswordDialog.cs
index 485efc79e..f1a594112 100644
--- a/EndlessClient/Dialogs/ChangePasswordDialog.cs
+++ b/EndlessClient/Dialogs/ChangePasswordDialog.cs
@@ -5,11 +5,11 @@
using EndlessClient.Dialogs.Services;
using EndlessClient.GameExecution;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Account;
using EOLib.Domain.Login;
using EOLib.Graphics;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Optional;
using XNAControls;
diff --git a/EndlessClient/Dialogs/CreateCharacterDialog.cs b/EndlessClient/Dialogs/CreateCharacterDialog.cs
index afe916867..9d2903e1e 100644
--- a/EndlessClient/Dialogs/CreateCharacterDialog.cs
+++ b/EndlessClient/Dialogs/CreateCharacterDialog.cs
@@ -5,10 +5,10 @@
using EndlessClient.GameExecution;
using EndlessClient.Rendering.Factories;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Graphics;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Optional;
diff --git a/EndlessClient/Dialogs/EOMessageBox.cs b/EndlessClient/Dialogs/EOMessageBox.cs
index e3f75986b..816522227 100644
--- a/EndlessClient/Dialogs/EOMessageBox.cs
+++ b/EndlessClient/Dialogs/EOMessageBox.cs
@@ -1,8 +1,8 @@
using System;
using EndlessClient.Dialogs.Services;
using EndlessClient.GameExecution;
-using EOLib;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using XNAControls;
diff --git a/EndlessClient/Dialogs/Factories/FriendIgnoreListDialogFactory.cs b/EndlessClient/Dialogs/Factories/FriendIgnoreListDialogFactory.cs
index def6f28cd..7d391181b 100644
--- a/EndlessClient/Dialogs/Factories/FriendIgnoreListDialogFactory.cs
+++ b/EndlessClient/Dialogs/Factories/FriendIgnoreListDialogFactory.cs
@@ -3,15 +3,14 @@
using AutomaticTypeMapper;
using EndlessClient.ControlSets;
using EndlessClient.Dialogs.Services;
-using EndlessClient.GameExecution;
using EndlessClient.HUD.Controls;
using EndlessClient.Services;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Domain.Online;
using EOLib.Graphics;
using EOLib.Localization;
+using EOLib.Shared;
using XNAControls;
namespace EndlessClient.Dialogs.Factories
diff --git a/EndlessClient/Dialogs/Factories/HelpDialogFactory.cs b/EndlessClient/Dialogs/Factories/HelpDialogFactory.cs
index 8699aa04e..8d4046a03 100644
--- a/EndlessClient/Dialogs/Factories/HelpDialogFactory.cs
+++ b/EndlessClient/Dialogs/Factories/HelpDialogFactory.cs
@@ -4,9 +4,9 @@
using EndlessClient.Content;
using EndlessClient.Dialogs.Actions;
using EndlessClient.Dialogs.Services;
-using EOLib;
using EOLib.Graphics;
using EOLib.Localization;
+using EOLib.Shared;
namespace EndlessClient.Dialogs.Factories
{
diff --git a/EndlessClient/Dialogs/GameLoadingDialog.cs b/EndlessClient/Dialogs/GameLoadingDialog.cs
index 79b3f6f1b..399d3d827 100644
--- a/EndlessClient/Dialogs/GameLoadingDialog.cs
+++ b/EndlessClient/Dialogs/GameLoadingDialog.cs
@@ -1,9 +1,9 @@
using System;
using EndlessClient.GameExecution;
using EndlessClient.Rendering;
-using EOLib;
using EOLib.Graphics;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using XNAControls;
diff --git a/EndlessClient/Dialogs/GuildDialog.cs b/EndlessClient/Dialogs/GuildDialog.cs
index e4d51843a..657b6cc39 100644
--- a/EndlessClient/Dialogs/GuildDialog.cs
+++ b/EndlessClient/Dialogs/GuildDialog.cs
@@ -5,13 +5,13 @@
using EndlessClient.Content;
using EndlessClient.Dialogs.Factories;
using EndlessClient.Dialogs.Services;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Domain.Interact.Guild;
using EOLib.Extensions;
using EOLib.Graphics;
using EOLib.IO.Repositories;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Moffat.EndlessOnline.SDK.Protocol.Net.Server;
using MonoGame.Extended.Input.InputListeners;
diff --git a/EndlessClient/Dialogs/InnkeeperDialog.cs b/EndlessClient/Dialogs/InnkeeperDialog.cs
index db3e6cf10..c718cc35d 100644
--- a/EndlessClient/Dialogs/InnkeeperDialog.cs
+++ b/EndlessClient/Dialogs/InnkeeperDialog.cs
@@ -3,12 +3,12 @@
using EndlessClient.Content;
using EndlessClient.Dialogs.Factories;
using EndlessClient.Dialogs.Services;
-using EOLib;
using EOLib.Domain.Interact.Citizen;
using EOLib.Graphics;
using EOLib.IO;
using EOLib.IO.Repositories;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Optional.Collections;
using XNAControls;
diff --git a/EndlessClient/Dialogs/ItemTransferDialog.cs b/EndlessClient/Dialogs/ItemTransferDialog.cs
index dc6048fdb..364fa37f7 100644
--- a/EndlessClient/Dialogs/ItemTransferDialog.cs
+++ b/EndlessClient/Dialogs/ItemTransferDialog.cs
@@ -3,9 +3,9 @@
using EndlessClient.Dialogs.Services;
using EndlessClient.HUD.Chat;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Graphics;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.Input.InputListeners;
diff --git a/EndlessClient/Dialogs/LawDialog.cs b/EndlessClient/Dialogs/LawDialog.cs
index 7c5d8e4ab..768f7a038 100644
--- a/EndlessClient/Dialogs/LawDialog.cs
+++ b/EndlessClient/Dialogs/LawDialog.cs
@@ -4,13 +4,13 @@
using EndlessClient.Content;
using EndlessClient.Dialogs.Factories;
using EndlessClient.Dialogs.Services;
-using EOLib;
using EOLib.Domain.Interact.Law;
using EOLib.Domain.Map;
using EOLib.Graphics;
using EOLib.IO;
using EOLib.IO.Repositories;
using EOLib.Localization;
+using EOLib.Shared;
using Optional.Collections;
using XNAControls;
diff --git a/EndlessClient/Dialogs/ListDialogItem.cs b/EndlessClient/Dialogs/ListDialogItem.cs
index 8e8841dc3..9f8d4dc2d 100644
--- a/EndlessClient/Dialogs/ListDialogItem.cs
+++ b/EndlessClient/Dialogs/ListDialogItem.cs
@@ -1,6 +1,6 @@
using System;
-using EOLib;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.Input;
diff --git a/EndlessClient/Dialogs/PlayerInfoDialog.cs b/EndlessClient/Dialogs/PlayerInfoDialog.cs
index 4af40afe1..1e04703fb 100644
--- a/EndlessClient/Dialogs/PlayerInfoDialog.cs
+++ b/EndlessClient/Dialogs/PlayerInfoDialog.cs
@@ -1,10 +1,9 @@
using EndlessClient.Dialogs.Services;
-using EOLib;
using EOLib.Domain.Character;
-using EOLib.Domain.Online;
using EOLib.Extensions;
using EOLib.Graphics;
using EOLib.IO.Repositories;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Moffat.EndlessOnline.SDK.Protocol.Net.Server;
diff --git a/EndlessClient/Dialogs/ProgressDialog.cs b/EndlessClient/Dialogs/ProgressDialog.cs
index 0186bb28d..a626d2ab7 100644
--- a/EndlessClient/Dialogs/ProgressDialog.cs
+++ b/EndlessClient/Dialogs/ProgressDialog.cs
@@ -2,9 +2,9 @@
using System.Threading;
using EndlessClient.Dialogs.Services;
using EndlessClient.GameExecution;
-using EOLib;
using EOLib.Config;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using XNAControls;
diff --git a/EndlessClient/Dialogs/QuestDialog.cs b/EndlessClient/Dialogs/QuestDialog.cs
index c9f394972..f191ac037 100644
--- a/EndlessClient/Dialogs/QuestDialog.cs
+++ b/EndlessClient/Dialogs/QuestDialog.cs
@@ -2,11 +2,11 @@
using System.Linq;
using EndlessClient.Content;
using EndlessClient.Dialogs.Services;
-using EOLib;
using EOLib.Domain.Interact.Quest;
using EOLib.Graphics;
using EOLib.IO.Repositories;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Moffat.EndlessOnline.SDK.Protocol.Net.Client;
using Optional;
diff --git a/EndlessClient/Dialogs/QuestStatusListDialogItem.cs b/EndlessClient/Dialogs/QuestStatusListDialogItem.cs
index e3cf57e09..c344c6339 100644
--- a/EndlessClient/Dialogs/QuestStatusListDialogItem.cs
+++ b/EndlessClient/Dialogs/QuestStatusListDialogItem.cs
@@ -1,5 +1,5 @@
-using EOLib;
-using EOLib.Graphics;
+using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Moffat.EndlessOnline.SDK.Protocol.Net;
diff --git a/EndlessClient/Dialogs/ScrollingListDialog.cs b/EndlessClient/Dialogs/ScrollingListDialog.cs
index 0543be735..b4d5312eb 100644
--- a/EndlessClient/Dialogs/ScrollingListDialog.cs
+++ b/EndlessClient/Dialogs/ScrollingListDialog.cs
@@ -3,8 +3,8 @@
using System.Linq;
using EndlessClient.Dialogs.Services;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.BitmapFonts;
diff --git a/EndlessClient/Dialogs/ScrollingMessageDialog.cs b/EndlessClient/Dialogs/ScrollingMessageDialog.cs
index fc9369cc9..0c7eca4fb 100644
--- a/EndlessClient/Dialogs/ScrollingMessageDialog.cs
+++ b/EndlessClient/Dialogs/ScrollingMessageDialog.cs
@@ -4,8 +4,8 @@
using EndlessClient.Dialogs.Services;
using EndlessClient.GameExecution;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using MonoGame.Extended.BitmapFonts;
using XNAControls;
diff --git a/EndlessClient/Dialogs/SessionExpDialog.cs b/EndlessClient/Dialogs/SessionExpDialog.cs
index 989a7ce13..9cc20d3b3 100644
--- a/EndlessClient/Dialogs/SessionExpDialog.cs
+++ b/EndlessClient/Dialogs/SessionExpDialog.cs
@@ -1,9 +1,9 @@
using System;
using EndlessClient.Dialogs.Services;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Graphics;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using XNAControls;
diff --git a/EndlessClient/Dialogs/SkillmasterDialog.cs b/EndlessClient/Dialogs/SkillmasterDialog.cs
index 7a96c10bc..f631d6ce7 100644
--- a/EndlessClient/Dialogs/SkillmasterDialog.cs
+++ b/EndlessClient/Dialogs/SkillmasterDialog.cs
@@ -6,12 +6,12 @@
using EndlessClient.Dialogs.Factories;
using EndlessClient.Dialogs.Services;
using EndlessClient.HUD;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Domain.Interact.Skill;
using EOLib.Graphics;
using EOLib.IO.Repositories;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Optional.Collections;
using XNAControls;
diff --git a/EndlessClient/Dialogs/TextInputDialog.cs b/EndlessClient/Dialogs/TextInputDialog.cs
index 7a757eba7..d85b717c0 100644
--- a/EndlessClient/Dialogs/TextInputDialog.cs
+++ b/EndlessClient/Dialogs/TextInputDialog.cs
@@ -2,8 +2,8 @@
using EndlessClient.Dialogs.Services;
using EndlessClient.HUD.Chat;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using XNAControls;
diff --git a/EndlessClient/Dialogs/TextMultiInputDialog.cs b/EndlessClient/Dialogs/TextMultiInputDialog.cs
index c0fa1b850..a291d7887 100644
--- a/EndlessClient/Dialogs/TextMultiInputDialog.cs
+++ b/EndlessClient/Dialogs/TextMultiInputDialog.cs
@@ -5,12 +5,11 @@
using EndlessClient.Dialogs.Services;
using EndlessClient.HUD.Chat;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using XNAControls;
-using static System.Net.Mime.MediaTypeNames;
namespace EndlessClient.Dialogs
{
diff --git a/EndlessClient/Dialogs/TradeDialog.cs b/EndlessClient/Dialogs/TradeDialog.cs
index 5523d280d..b5a9e3bc3 100644
--- a/EndlessClient/Dialogs/TradeDialog.cs
+++ b/EndlessClient/Dialogs/TradeDialog.cs
@@ -9,13 +9,13 @@
using EndlessClient.HUD.Inventory;
using EndlessClient.Rendering.Map;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Domain.Trade;
using EOLib.Graphics;
using EOLib.IO;
using EOLib.IO.Repositories;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Optional.Collections;
using XNAControls;
diff --git a/EndlessClient/EndlessClient.csproj b/EndlessClient/EndlessClient.csproj
index 0c23e55f8..0ac4188c6 100644
--- a/EndlessClient/EndlessClient.csproj
+++ b/EndlessClient/EndlessClient.csproj
@@ -22,6 +22,10 @@
$(DefineConstants);OSX
MacOSX
io.moffat.endlessclient
+ true
+ 11.0
+ osx-x64;osx-arm64
+ true
<_ResolveReferenceDependencies>true
@@ -29,23 +33,15 @@
false
..\bin\$(Configuration)\client
en
+ 1.4.0.2
Resources\Game.ico
-
-
-
-
-
-
-
-
-
@@ -60,17 +56,8 @@
-
-
-
-
-
-
-
-
-
-
-
+ <_client Include="$(MSBuildThisFileDirectory)\..\packages\endlessclient.binaries\$(EndlessClientBinariesPackageVersion)\build\net462\client\**\*.*" />
+
@@ -80,7 +67,7 @@
-
+
@@ -88,6 +75,6 @@
-
+
diff --git a/EndlessClient/GameExecution/EndlessGame.cs b/EndlessClient/GameExecution/EndlessGame.cs
index 4ec317fba..73372f802 100644
--- a/EndlessClient/GameExecution/EndlessGame.cs
+++ b/EndlessClient/GameExecution/EndlessGame.cs
@@ -15,6 +15,7 @@
using EOLib.Config;
using EOLib.Graphics;
using EOLib.IO.Actions;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
@@ -95,8 +96,6 @@ public EndlessGame(IClientWindowSizeRepository windowSizeRepository,
PreferredBackBufferWidth = ClientWindowSizeRepository.DEFAULT_BACKBUFFER_WIDTH,
PreferredBackBufferHeight = ClientWindowSizeRepository.DEFAULT_BACKBUFFER_HEIGHT
};
-
- Content.RootDirectory = "Content";
}
protected override void Initialize()
diff --git a/EndlessClient/GameExecution/GameStateActions.cs b/EndlessClient/GameExecution/GameStateActions.cs
index 6a237cbd9..ee65a34db 100644
--- a/EndlessClient/GameExecution/GameStateActions.cs
+++ b/EndlessClient/GameExecution/GameStateActions.cs
@@ -7,10 +7,9 @@
using EndlessClient.HUD.Panels;
using EndlessClient.Network;
using EndlessClient.Rendering;
-using EOLib;
using EOLib.Config;
-using EOLib.Domain.Character;
using EOLib.Domain.Login;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using XNAControls.Input;
diff --git a/EndlessClient/HUD/Chat/ChatNotificationActions.cs b/EndlessClient/HUD/Chat/ChatNotificationActions.cs
index 7a85b5838..d3494a6c3 100644
--- a/EndlessClient/HUD/Chat/ChatNotificationActions.cs
+++ b/EndlessClient/HUD/Chat/ChatNotificationActions.cs
@@ -1,16 +1,15 @@
using System;
using System.Globalization;
-using System.Windows;
using AutomaticTypeMapper;
using EndlessClient.Audio;
using EndlessClient.ControlSets;
using EndlessClient.HUD.Controls;
using EndlessClient.HUD.Panels;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Chat;
using EOLib.Domain.Notifiers;
using EOLib.Localization;
+using EOLib.Shared;
using Optional;
namespace EndlessClient.HUD.Chat
diff --git a/EndlessClient/HUD/Chat/ChatPanelTab.cs b/EndlessClient/HUD/Chat/ChatPanelTab.cs
index af38f876b..2b98c8f52 100644
--- a/EndlessClient/HUD/Chat/ChatPanelTab.cs
+++ b/EndlessClient/HUD/Chat/ChatPanelTab.cs
@@ -7,11 +7,10 @@
using EndlessClient.Rendering.Chat;
using EndlessClient.Rendering.Sprites;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Chat;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using MonoGame.Extended.BitmapFonts;
-using MonoGame.Extended.Input;
using MonoGame.Extended.Input.InputListeners;
using XNAControls;
diff --git a/EndlessClient/HUD/Controls/HudControlsFactory.cs b/EndlessClient/HUD/Controls/HudControlsFactory.cs
index cefa34434..e5ef086fd 100644
--- a/EndlessClient/HUD/Controls/HudControlsFactory.cs
+++ b/EndlessClient/HUD/Controls/HudControlsFactory.cs
@@ -28,6 +28,7 @@
using EOLib.Domain.Map;
using EOLib.Graphics;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using XNAControls;
diff --git a/EndlessClient/HUD/Inventory/InventoryPanelItem.cs b/EndlessClient/HUD/Inventory/InventoryPanelItem.cs
index e4c2e7701..d3c256416 100644
--- a/EndlessClient/HUD/Inventory/InventoryPanelItem.cs
+++ b/EndlessClient/HUD/Inventory/InventoryPanelItem.cs
@@ -3,11 +3,11 @@
using EndlessClient.Dialogs;
using EndlessClient.HUD.Controls;
using EndlessClient.HUD.Panels;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Graphics;
using EOLib.IO.Extensions;
using EOLib.IO.Pub;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.Input;
diff --git a/EndlessClient/HUD/Panels/ActiveSpellsPanel.cs b/EndlessClient/HUD/Panels/ActiveSpellsPanel.cs
index 228cea981..2ad08252a 100644
--- a/EndlessClient/HUD/Panels/ActiveSpellsPanel.cs
+++ b/EndlessClient/HUD/Panels/ActiveSpellsPanel.cs
@@ -13,7 +13,6 @@
using EndlessClient.HUD.Spells;
using EndlessClient.Rendering;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Config;
using EOLib.Domain.Character;
using EOLib.Domain.Login;
@@ -21,6 +20,7 @@
using EOLib.IO.Pub;
using EOLib.IO.Repositories;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Win32;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
@@ -29,7 +29,6 @@
using Optional;
using Optional.Collections;
using XNAControls;
-using static EndlessClient.HUD.Spells.SpellPanelItem;
namespace EndlessClient.HUD.Panels
{
diff --git a/EndlessClient/HUD/Panels/HudPanelFactory.cs b/EndlessClient/HUD/Panels/HudPanelFactory.cs
index 1cb054195..f18dd5ae5 100644
--- a/EndlessClient/HUD/Panels/HudPanelFactory.cs
+++ b/EndlessClient/HUD/Panels/HudPanelFactory.cs
@@ -10,7 +10,6 @@
using EndlessClient.Rendering;
using EndlessClient.Rendering.Chat;
using EndlessClient.Services;
-using EOLib;
using EOLib.Config;
using EOLib.Domain.Character;
using EOLib.Domain.Chat;
@@ -21,6 +20,7 @@
using EOLib.Graphics;
using EOLib.IO.Repositories;
using EOLib.Localization;
+using EOLib.Shared;
namespace EndlessClient.HUD.Panels
{
diff --git a/EndlessClient/HUD/Panels/InventoryPanel.cs b/EndlessClient/HUD/Panels/InventoryPanel.cs
index 0e58742fa..e03d4ad99 100644
--- a/EndlessClient/HUD/Panels/InventoryPanel.cs
+++ b/EndlessClient/HUD/Panels/InventoryPanel.cs
@@ -12,7 +12,6 @@
using EndlessClient.HUD.Inventory;
using EndlessClient.Rendering;
using EndlessClient.Rendering.Map;
-using EOLib;
using EOLib.Config;
using EOLib.Domain.Character;
using EOLib.Domain.Item;
@@ -25,6 +24,7 @@
using EOLib.IO.Pub;
using EOLib.IO.Repositories;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Win32;
using Microsoft.Xna.Framework;
using MonoGame.Extended.Input;
diff --git a/EndlessClient/HUD/Panels/OnlineListPanel.cs b/EndlessClient/HUD/Panels/OnlineListPanel.cs
index 9f20a87d3..c23ed7988 100644
--- a/EndlessClient/HUD/Panels/OnlineListPanel.cs
+++ b/EndlessClient/HUD/Panels/OnlineListPanel.cs
@@ -7,11 +7,11 @@
using EndlessClient.Rendering;
using EndlessClient.Services;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Online;
using EOLib.Domain.Party;
using EOLib.Extensions;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Moffat.EndlessOnline.SDK.Protocol.Net.Server;
diff --git a/EndlessClient/HUD/Panels/PartyPanel.cs b/EndlessClient/HUD/Panels/PartyPanel.cs
index b07834a54..aa5c1314b 100644
--- a/EndlessClient/HUD/Panels/PartyPanel.cs
+++ b/EndlessClient/HUD/Panels/PartyPanel.cs
@@ -4,10 +4,10 @@
using EndlessClient.HUD.Party;
using EndlessClient.Rendering;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Domain.Party;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Optional.Collections;
using XNAControls;
diff --git a/EndlessClient/HUD/Panels/SettingsPanel.cs b/EndlessClient/HUD/Panels/SettingsPanel.cs
index ce52bade7..b5c80c770 100644
--- a/EndlessClient/HUD/Panels/SettingsPanel.cs
+++ b/EndlessClient/HUD/Panels/SettingsPanel.cs
@@ -5,11 +5,11 @@
using EndlessClient.Dialogs;
using EndlessClient.Dialogs.Factories;
using EndlessClient.Rendering;
-using EOLib;
using EOLib.Config;
using EOLib.Domain.Chat;
using EOLib.Graphics;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using XNAControls;
diff --git a/EndlessClient/HUD/Panels/StatsPanel.cs b/EndlessClient/HUD/Panels/StatsPanel.cs
index 0c63316ca..8217604f9 100644
--- a/EndlessClient/HUD/Panels/StatsPanel.cs
+++ b/EndlessClient/HUD/Panels/StatsPanel.cs
@@ -4,10 +4,10 @@
using EndlessClient.Dialogs;
using EndlessClient.Dialogs.Factories;
using EndlessClient.Rendering;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Domain.Extensions;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using XNAControls;
diff --git a/EndlessClient/HUD/Party/PartyPanelMember.cs b/EndlessClient/HUD/Party/PartyPanelMember.cs
index 1b8534288..23b961f7f 100644
--- a/EndlessClient/HUD/Party/PartyPanelMember.cs
+++ b/EndlessClient/HUD/Party/PartyPanelMember.cs
@@ -1,10 +1,10 @@
using System;
using EndlessClient.Content;
-using EOLib;
using EOLib.Domain.Chat;
using EOLib.Domain.Party;
using EOLib.Extensions;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using XNAControls;
diff --git a/EndlessClient/HUD/StatusBars/StatusBarBase.cs b/EndlessClient/HUD/StatusBars/StatusBarBase.cs
index 6555143c4..9d1707939 100644
--- a/EndlessClient/HUD/StatusBars/StatusBarBase.cs
+++ b/EndlessClient/HUD/StatusBars/StatusBarBase.cs
@@ -1,8 +1,8 @@
using System;
using EndlessClient.Rendering;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.Input.InputListeners;
diff --git a/EndlessClient/Info.plist b/EndlessClient/Info.plist
index 2731c1699..df0dc7c47 100644
--- a/EndlessClient/Info.plist
+++ b/EndlessClient/Info.plist
@@ -4,5 +4,7 @@
CFBundleIconFile
Game.icns
+ LSMinimumSystemVersion
+ 11.0
\ No newline at end of file
diff --git a/EndlessClient/Initialization/ConfigInitializer.cs b/EndlessClient/Initialization/ConfigInitializer.cs
index 83defdf85..a8eef0b1c 100644
--- a/EndlessClient/Initialization/ConfigInitializer.cs
+++ b/EndlessClient/Initialization/ConfigInitializer.cs
@@ -1,5 +1,9 @@
-using AutomaticTypeMapper;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Runtime.Versioning;
+using AutomaticTypeMapper;
using EOLib.Config;
+using EOLib.Shared;
namespace EndlessClient.Initialization
{
@@ -15,7 +19,44 @@ public ConfigInitializer(IConfigFileLoadActions configFileLoadActions)
public void Initialize()
{
+ if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ InitializeDefaultConfigFiles();
+
_configFileLoadActions.LoadConfigFile();
}
+
+ ///
+ /// Copy default configuration files out of the macOS app bundle into ~/.endlessclient/config. This is done only if the files do not already exist.
+ ///
+ [SupportedOSPlatform("OSX")]
+ private static void InitializeDefaultConfigFiles()
+ {
+ var configDirectory = Path.GetDirectoryName(Constants.Default_Config_File);
+ if (!Directory.Exists(configDirectory))
+ {
+ Directory.CreateDirectory(configDirectory);
+ }
+
+ var files = new[] {
+ Constants.Default_Config_File,
+ Constants.InventoryFile,
+ Constants.SpellsFile,
+ Constants.FriendListFile,
+ Constants.IgnoreListFile,
+ Constants.PanelLayoutFile
+ };
+ foreach (var file in files)
+ {
+ if (!File.Exists(file) && file.Contains(PathResolver.LocalFilesRoot))
+ {
+ var index = file.IndexOf(PathResolver.LocalFilesRoot) + PathResolver.LocalFilesRoot.Length + 1;
+ var source = Path.Combine(PathResolver.ResourcesRoot, file[index..]);
+ if (File.Exists(source))
+ {
+ File.Copy(source, file);
+ }
+ }
+ }
+ }
}
}
diff --git a/EndlessClient/Rendering/Character/CharacterAnimationActions.cs b/EndlessClient/Rendering/Character/CharacterAnimationActions.cs
index 163cfe5ba..f0bce8588 100644
--- a/EndlessClient/Rendering/Character/CharacterAnimationActions.cs
+++ b/EndlessClient/Rendering/Character/CharacterAnimationActions.cs
@@ -11,19 +11,17 @@
using EndlessClient.Rendering.Metadata;
using EndlessClient.Rendering.Metadata.Models;
using EOLib;
-using EOLib.Config;
using EOLib.Domain.Character;
using EOLib.Domain.Extensions;
using EOLib.Domain.Map;
using EOLib.Domain.Notifiers;
using EOLib.Domain.Spells;
-using EOLib.IO;
using EOLib.IO.Map;
using EOLib.IO.Repositories;
using EOLib.Localization;
+using EOLib.Shared;
using Moffat.EndlessOnline.SDK.Protocol.Net.Server;
using Optional;
-using Optional.Collections;
namespace EndlessClient.Rendering.Character
{
diff --git a/EndlessClient/Rendering/Character/CharacterRenderer.cs b/EndlessClient/Rendering/Character/CharacterRenderer.cs
index d4d4c07f5..eab3c32e2 100644
--- a/EndlessClient/Rendering/Character/CharacterRenderer.cs
+++ b/EndlessClient/Rendering/Character/CharacterRenderer.cs
@@ -9,12 +9,12 @@
using EndlessClient.Rendering.Metadata;
using EndlessClient.Rendering.Metadata.Models;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Domain.Extensions;
using EOLib.Domain.Map;
using EOLib.Domain.Spells;
using EOLib.IO.Map;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Optional;
diff --git a/EndlessClient/Rendering/Chat/ChatBubble.cs b/EndlessClient/Rendering/Chat/ChatBubble.cs
index 2b2c5c39a..0ed767e32 100644
--- a/EndlessClient/Rendering/Chat/ChatBubble.cs
+++ b/EndlessClient/Rendering/Chat/ChatBubble.cs
@@ -1,8 +1,8 @@
using System;
using System.Diagnostics;
using EndlessClient.GameExecution;
-using EOLib;
using EOLib.Config;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Optional;
diff --git a/EndlessClient/Rendering/Chat/ChatRenderableGenerator.cs b/EndlessClient/Rendering/Chat/ChatRenderableGenerator.cs
index 4d95789a7..5d8674ec4 100644
--- a/EndlessClient/Rendering/Chat/ChatRenderableGenerator.cs
+++ b/EndlessClient/Rendering/Chat/ChatRenderableGenerator.cs
@@ -2,10 +2,9 @@
using System.Collections.Generic;
using System.Linq;
using EndlessClient.Services;
-using EOLib;
using EOLib.Domain.Chat;
using EOLib.Graphics;
-using Microsoft.Xna.Framework.Graphics;
+using EOLib.Shared;
using MonoGame.Extended.BitmapFonts;
using XNAControls;
diff --git a/EndlessClient/Rendering/ContextMenuRenderer.cs b/EndlessClient/Rendering/ContextMenuRenderer.cs
index 6a6051f2f..11c6993d8 100644
--- a/EndlessClient/Rendering/ContextMenuRenderer.cs
+++ b/EndlessClient/Rendering/ContextMenuRenderer.cs
@@ -10,13 +10,13 @@
using EndlessClient.Rendering.Character;
using EndlessClient.Services;
using EndlessClient.UIControls;
-using EOLib;
using EOLib.Domain.Interact;
using EOLib.Domain.Map;
using EOLib.Domain.Party;
using EOLib.Domain.Trade;
using EOLib.Graphics;
using EOLib.Localization;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Moffat.EndlessOnline.SDK.Protocol.Net;
diff --git a/EndlessClient/Rendering/Map/MapRenderer.cs b/EndlessClient/Rendering/Map/MapRenderer.cs
index 1b5096538..7a43738ea 100644
--- a/EndlessClient/Rendering/Map/MapRenderer.cs
+++ b/EndlessClient/Rendering/Map/MapRenderer.cs
@@ -12,6 +12,7 @@
using EOLib.Config;
using EOLib.Domain.Character;
using EOLib.Domain.Map;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
diff --git a/EndlessClient/Rendering/MouseCursorRenderer.cs b/EndlessClient/Rendering/MouseCursorRenderer.cs
index 0018d0ee7..d6af8c0c2 100644
--- a/EndlessClient/Rendering/MouseCursorRenderer.cs
+++ b/EndlessClient/Rendering/MouseCursorRenderer.cs
@@ -1,19 +1,17 @@
using System;
using System.Diagnostics;
using System.Linq;
-using EndlessClient.Controllers;
using EndlessClient.Dialogs;
using EndlessClient.HUD;
using EndlessClient.Input;
-using EOLib;
using EOLib.Domain.Item;
using EOLib.Domain.Map;
using EOLib.Graphics;
using EOLib.IO.Map;
using EOLib.IO.Repositories;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
-using Microsoft.Xna.Framework.Input;
using Optional;
using XNAControls;
diff --git a/EndlessClient/Rendering/NPC/NPCRenderer.cs b/EndlessClient/Rendering/NPC/NPCRenderer.cs
index a104739bb..7574a1a88 100644
--- a/EndlessClient/Rendering/NPC/NPCRenderer.cs
+++ b/EndlessClient/Rendering/NPC/NPCRenderer.cs
@@ -1,6 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
using EndlessClient.GameExecution;
using EndlessClient.Input;
using EndlessClient.Rendering.Chat;
@@ -13,6 +11,7 @@
using EOLib.Domain.Spells;
using EOLib.Graphics;
using EOLib.IO.Repositories;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Optional;
diff --git a/EndlessClient/Subscribers/OtherCharacterEventSubscriber.cs b/EndlessClient/Subscribers/OtherCharacterEventSubscriber.cs
index f1fe5e07f..45efeb1e9 100644
--- a/EndlessClient/Subscribers/OtherCharacterEventSubscriber.cs
+++ b/EndlessClient/Subscribers/OtherCharacterEventSubscriber.cs
@@ -4,10 +4,10 @@
using EndlessClient.HUD.Chat;
using EndlessClient.Rendering.Character;
using EndlessClient.Services;
-using EOLib;
using EOLib.Config;
using EOLib.Domain.Chat;
using EOLib.Domain.Notifiers;
+using EOLib.Shared;
namespace EndlessClient.Subscribers
{
diff --git a/EndlessClient/UIControls/CharacterInfoPanel.cs b/EndlessClient/UIControls/CharacterInfoPanel.cs
index e18bfc981..2db14152d 100644
--- a/EndlessClient/UIControls/CharacterInfoPanel.cs
+++ b/EndlessClient/UIControls/CharacterInfoPanel.cs
@@ -8,9 +8,9 @@
using EndlessClient.Rendering;
using EndlessClient.Rendering.Factories;
using EndlessClient.Rendering.Sprites;
-using EOLib;
using EOLib.Domain.Character;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
diff --git a/EndlessClient/UIControls/ChatTextBox.cs b/EndlessClient/UIControls/ChatTextBox.cs
index db1252349..65425ad97 100644
--- a/EndlessClient/UIControls/ChatTextBox.cs
+++ b/EndlessClient/UIControls/ChatTextBox.cs
@@ -1,8 +1,8 @@
using System;
using EndlessClient.Content;
using EndlessClient.Rendering;
-using EOLib;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
diff --git a/EndlessClient/UIControls/StatusBarLabel.cs b/EndlessClient/UIControls/StatusBarLabel.cs
index 95500fe3b..200fa56ba 100644
--- a/EndlessClient/UIControls/StatusBarLabel.cs
+++ b/EndlessClient/UIControls/StatusBarLabel.cs
@@ -1,8 +1,8 @@
using System;
using EndlessClient.HUD;
using EndlessClient.Rendering;
-using EOLib;
using EOLib.Graphics;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using XNAControls;
@@ -26,7 +26,7 @@ public class StatusBarLabel : XNALabel
public StatusBarLabel(INativeGraphicsManager nativeGraphicsManager,
IClientWindowSizeProvider clientWindowSizeProvider,
IStatusLabelTextProvider statusLabelTextProvider)
- : base(Constants.FontSize07)
+ : base(spriteFontName: Constants.FontSize07)
{
_nativeGraphicsManager = nativeGraphicsManager;
_clientWindowSizeProvider = clientWindowSizeProvider;
diff --git a/EndlessClient/UIControls/TimeLabel.cs b/EndlessClient/UIControls/TimeLabel.cs
index 3436133a1..0e077ff6b 100644
--- a/EndlessClient/UIControls/TimeLabel.cs
+++ b/EndlessClient/UIControls/TimeLabel.cs
@@ -1,6 +1,6 @@
using System;
using EndlessClient.Rendering;
-using EOLib;
+using EOLib.Shared;
using Microsoft.Xna.Framework;
using XNAControls;
diff --git a/README.md b/README.md
index bd75faf96..6ccaac9f0 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,6 @@ As of 2020-05-09, this project is relicensed under the MIT license. Older versio
- [Contributing](contributing.md)
- [Getting started](#GettingStarted)
- [Todo list](#ToDo)
- - [New features (also todo)](#NewFeatures)
- [Changes from the Original Client](#Changes)
- [Included Utility Projects](#Utility)
- [EOBot](#EOBot)
@@ -23,67 +22,54 @@ As of 2020-05-09, this project is relicensed under the MIT license. Older versio
### Dependencies
-Source builds require Visual Studio, the .Net 6.0 SDK, and the .Net 3.1 runtime (for building content with the MonoGame content builder pipeline tool). Other dependencies are installed via Nuget. MonoGame no longer needs to be installed ahead of time!
+Source builds require Visual Studio and the .Net 8.0 SDK. Other dependencies are installed via Nuget. MonoGame no longer needs to be installed ahead of time, and as of the .Net 8.0 upgrade, it no longer requires the .Net 3.1 runtime!
-.Net 6.0 runtime is required to run the pre-built binary.
+.Net 8.0 runtime is required to run the pre-built binary.
### Pre-built binary
-See [releases](https://github.com/ethanmoffat/EndlessClient/releases) on GitHub for Linux and Windows binaries. .Net 6.0 runtime must be installed.
+See [releases](https://github.com/ethanmoffat/EndlessClient/releases) on GitHub for Windows/Linux binaries and macOS app (compiled for both Intel and Apple CPU architectures).
### How to play
-Download the appropriate [release](https://github.com/ethanmoffat/EndlessClient/releases) for your platform, then copy the data directories (data, gfx, jbox, mfx, sfx) from whichever client you normally use to EndlessClient's unzip location. Run EndlessClient by double-clicking the icon (any platform) or running `./EndlessClient` (Linux).
+**Windows/Linux**
+
+Download the appropriate [release](https://github.com/ethanmoffat/EndlessClient/releases) for your platform, then copy the data directories (data, gfx, jbox, mfx, sfx) from whichever client you normally use to EndlessClient's unzip location. Run EndlessClient by double-clicking the icon.
+
+**macOS**
+
+Unzip EndlessClient.app to your hard drive and double-click the app icon. You will need to enable apps from any source to run in your system security settings.
+
+> ⚠️ If the app fails to run with an error "EndlessClient.app is damaged and can't be opened", open a terminal, run the following command: `xattr -dr com.apple.quarantine /path/to/EndlessClient.app`, and relaunch.
+
+Assets for alternate servers may be copied to the app package under `Contents/Resources`. To view package contents, right-click the `EndlessClient.app` file and select "View Package Contents".
+
+Note that the configuration file for the app is stored under `~/.endlessclient/config/settings.ini`. This file will need to be modified to select the new server host and version number.
### Building from source
-After installing, clone (or fork+clone) this repository locally and open the solution in your IDE of choice for your platform.
+Clone (or fork+clone) this repository locally and open the solution in your IDE of choice for your platform. VSCode is supported on all OS flavors. Visual Studio 2022 is supported on Windows.
+
+The .Net 8.0 SDK is required. Install the correct version for your platform/architecture. On macOS, XCode 16.0 or later is required (install from the App Store).
+
+> ⚠️ macOS requires a specific version of the .Net SDK: 8.0.204, due to the .Net team forcing minos version of macOS 15 in later SDKs. If you only want to build for macOS 15 and up, you can use the latest SDK.
-> ⚠️ If you have previously built EndlessClient, you mean need to clear your dotnet tool cache and nuget package cache
+> ⚠️ If you have previously built EndlessClient, you may need to clear your dotnet tool cache and nuget package cache
>
> Run the following commands:
> - `dotnet nuget locals all --clear`
-> - Windows: `rmdir -recurse -force $env:USERPROFILE\\.dotnet\\toolResolverCache`
-> - Linux: `rm -rf ~/.dotnet/toolResolverCache`
+> - Windows (powershell): `rmdir -recurse -force $env:USERPROFILE\\.dotnet\\toolResolverCache`
+> - Linux/macOS: `rm -rf ~/.dotnet/toolResolverCache`
> ⚠️ If you get build errors due to formatting
>
-> Run the following commands:
-> - Windows: `dotnet format EndlessClient.sln`
-> - Linux: `dotnet format EndlessClient.Linux.sln`
-
-### Building on Mac
-
-1. Download and install the [.NET 6.0 SDK (x64)](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/sdk-6.0.403-macos-x64-installer).
-2. Link the binary to so it's in path `sudo ln -s /usr/local/share/dotnet/x64/dotnet /usr/local/bin/dotnet`
-3. Install XCode from the [AppStore](https://apps.apple.com/us/app/xcode/id497799835?ls=1&mt=12)
-4. Run `dotnet build /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained EndlessClient`
-5. The build will fail due to a using alias already being declared
-6. Run `echo '' > EndlessClient/obj/Debug/net6.0-macos/osx-x64/EndlessClient.GlobalUsings.g.*.generated.cs`
-7. Run the build again `dotnet build /p:PublishReadyToRun=false /p:TieredCompilation=false --self-contained EndlessClient`
-
-#### Mac errors
-
-Problem: `error NETSDK1139: The target platform identifier macos was not recognized.`
-Solution: run the command `sudo dotnet workload restore EndlessClient/EndlessClient.csproj` which will install the macos workload for you.
+> Run: `dotnet format EndlessClient.sln`
Todo list
---------------------
See the Github issues for planned features. Anything marked with the 'in progress' label is actively being worked on.
-New features (also todo)
-------------------
-
-Here's a working list of things I want to add that would be additional features on top of the original client specs:
- - Use built-in patching system prior to log-in to transfer files
- - More than 3 characters per account
- - Trading items between characters on the same account
- - Better display scaling, ~~resizable display~~ (done)
- - Timed map weather systems
- - Passive skills
- - Better inventory
-
Changes From Original Client
-------------------------------------
@@ -132,7 +118,7 @@ Activating background music on linux takes a bit of extra work, due to the fact
For troubleshooting purposes, follow the guide here: http://www.tedfelix.com/linux/linux-midi.html
-#### Resizable Game Display (experimental)
+#### Resizable Game Display
The in-game experience can be modified for larger displays by setting the following configuration options in `config/settings.ini`:
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index b8cc47301..edd4628cf 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -19,15 +19,20 @@ schedules:
strategy:
matrix:
linux:
- imageName: "ubuntu-latest"
- solutionName: "EndlessClient.sln"
+ imageName: "ubuntu-22.04"
friendlyPlatform: "Linux"
dropDir: net8.0
+ dotnetVersion: 8.0.x
windows:
- imageName: "windows-latest"
- solutionName: "EndlessClient.sln"
+ imageName: "windows-2022"
friendlyPlatform: "Windows"
dropDir: net8.0-windows
+ dotnetVersion: 8.0.x
+ macos:
+ imageName: "macos-15"
+ friendlyPlatform: "macOS"
+ dropDir: net8.0-macos
+ dotnetVersion: "8.0.204"
pool:
vmImage: $(imageName)
@@ -41,7 +46,26 @@ steps:
- task: UseDotNet@2
displayName: 'Install .Net 8 runtime/sdk'
inputs:
- version: 8.0.x
+ version: $(dotnetVersion)
+- script: |
+ echo Mac OS version:
+ sw_vers -productVersion
+ echo
+ echo Installed Xcode versions:
+ ls /Applications | grep 'Xcode'
+ echo
+ echo currently selected xcode:
+ xcrun xcode-select --print-path
+ echo
+ echo selecting latest xcode...
+ sudo xcode-select -s /Applications/Xcode_16.1_Release_Candidate.app
+ xcrun xcode-select --print-path
+ xcodebuild -version
+ displayName: Select Xcode Version
+ condition: eq(variables.friendlyPlatform, 'macOS')
+
+#############################################
+# Assembly info and nuget properties
- task: Assembly-Info-NetCore@3
displayName: 'Set assembly version and copyright info'
inputs:
@@ -52,7 +76,7 @@ steps:
WriteBOM: false
GenerateDocumentationFile: 'false'
Authors: 'Ethan Moffat'
- Copyright: 'Copyright © 2014-2024 Ethan Moffat'
+ Copyright: 'Copyright © 2014-2025 Ethan Moffat'
VersionNumber: '$(Build.BuildNumber)'
FileVersionNumber: '$(Build.BuildNumber)'
InformationalVersion: '$(Build.BuildNumber)'
@@ -80,28 +104,50 @@ steps:
LogLevel: 'verbose'
FailOnWarning: false
DisableTelemetry: false
+#############################################
+
+#############################################
+# Restore/Build/Test
+- task: DotNetCoreCLI@2
+ displayName: 'dotnet workload restore'
+ condition: eq(variables.friendlyPlatform, 'macOS')
+ inputs:
+ command: 'custom'
+ custom: 'workload'
+ arguments: 'restore $(Build.SourcesDirectory)/EndlessClient/EndlessClient.csproj'
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: 'restore'
verbosityRestore: 'minimal'
- projects: '$(Build.SourcesDirectory)/$(solutionName)'
+ projects: '$(Build.SourcesDirectory)/EndlessClient.sln'
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
command: 'build'
- projects: '$(Build.SourcesDirectory)/$(solutionName)'
+ projects: '$(Build.SourcesDirectory)/EndlessClient.sln'
arguments: '--configuration $(buildConfiguration)'
+- task: DotNetCoreCLI@2
+ displayName: 'dotnet build - osx-arm64'
+ condition: eq(variables.friendlyPlatform, 'macOS')
+ inputs:
+ command: 'build'
+ projects: '$(Build.SourcesDirectory)/EndlessClient/EndlessClient.csproj'
+ arguments: '--configuration $(buildConfiguration) -r osx-arm64'
- task: DotNetCoreCLI@2
displayName: 'dotnet test - skipping EOLib.Graphics.Test (not supported on VSTS agent)'
inputs:
command: 'test'
- projects: '$(Build.SourcesDirectory)/$(solutionName)'
- arguments: '--filter "TestCategory!=GraphicsDevice" --configuration $(buildConfiguration)'
+ projects: '$(Build.SourcesDirectory)/EndlessClient.sln'
+ arguments: '--no-build --filter "TestCategory!=GraphicsDevice" --configuration $(buildConfiguration)'
testRunTitle: $(friendlyPlatform)
+#############################################
+#############################################
+# EndlessClient + EOBot archive
- task: ArchiveFiles@2
displayName: 'ZIP EndlessClient'
+ condition: and(succeeded(), not(eq(variables.friendlyPlatform, 'macOS')))
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/bin/$(buildConfiguration)/client/$(dropDir)/
archiveFile: $(Build.ArtifactStagingDirectory)/zip/EndlessClient.$(friendlyPlatform).zip
@@ -110,11 +156,26 @@ steps:
inputs:
rootFolderOrFile: $(Build.SourcesDirectory)/bin/$(buildConfiguration)/utils/EOBot/net8.0/
archiveFile: $(Build.ArtifactStagingDirectory)/zip/EOBot.$(friendlyPlatform).zip
+# EndlessClient archive (macOS multi-target)
+- task: ArchiveFiles@2
+ displayName: 'ZIP EndlessClient (arm64)'
+ condition: and(succeeded(), eq(variables.friendlyPlatform, 'macOS'))
+ inputs:
+ rootFolderOrFile: $(Build.SourcesDirectory)/bin/$(buildConfiguration)/client/$(dropDir)/osx-arm64/EndlessClient.app
+ archiveFile: $(Build.ArtifactStagingDirectory)/zip/EndlessClient.$(friendlyPlatform).arm64.zip
+- task: ArchiveFiles@2
+ displayName: 'ZIP EndlessClient (x64)'
+ condition: and(succeeded(), eq(variables.friendlyPlatform, 'macOS'))
+ inputs:
+ rootFolderOrFile: $(Build.SourcesDirectory)/bin/$(buildConfiguration)/client/$(dropDir)/osx-x64/EndlessClient.app
+ archiveFile: $(Build.ArtifactStagingDirectory)/zip/EndlessClient.$(friendlyPlatform).x64.zip
+# Publish zip artifacts
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts'
inputs:
PathtoPublish: $(Build.ArtifactStagingDirectory)/zip
ArtifactName: EndlessClient
+#############################################
- task: CopyFiles@2
displayName: 'Copy nuget packages'
diff --git a/global.json b/global.json
index 47cd9439e..0650fccd4 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
- "sdk" : {
- "version": "8.0.0",
- "rollForward": "latestFeature"
- }
-}
\ No newline at end of file
+ "sdk": {
+ "version": "8.0.204",
+ "rollForward": "latestFeature"
+ }
+}