diff --git a/.gitignore b/.gitignore index b9b063f..1ce6336 100644 --- a/.gitignore +++ b/.gitignore @@ -370,3 +370,6 @@ FodyWeavers.xsd db/data/pgdata/ db/pgadmin/* !db/pgadmin/pgpass +/src/DiIiS-NA/config.ini +/src/DiIiS-NA/database.Account.config +/src/DiIiS-NA/database.Worlds.config diff --git a/src/DiIiS-NA/BGS-Server/Crypthography/ARC4.cs b/src/DiIiS-NA/BGS-Server/Crypthography/ARC4.cs index 5aca7ad..8742604 100644 --- a/src/DiIiS-NA/BGS-Server/Crypthography/ARC4.cs +++ b/src/DiIiS-NA/BGS-Server/Crypthography/ARC4.cs @@ -32,10 +32,8 @@ { index2 = (byte)(key[index1] + _state[counter] + index2); // swap byte - byte tmp = _state[counter]; - _state[counter] = _state[index2]; - _state[index2] = tmp; - index1 = (byte)((index1 + 1) % key.Length); + (_state[counter], _state[index2]) = (_state[index2], _state[counter]); + index1 = (byte)((index1 + 1) % key.Length); } } @@ -46,11 +44,9 @@ x = (byte)(x + 1); y = (byte)(_state[x] + y); // swap byte - byte tmp = _state[x]; - _state[x] = _state[y]; - _state[y] = tmp; + (_state[x], _state[y]) = (_state[y], _state[x]); - byte xorIndex = (byte)(_state[x] + _state[y]); + byte xorIndex = (byte)(_state[x] + _state[y]); outputBuffer[outputOffset + counter] = (byte)(inputBuffer[inputOffset + counter] ^ _state[xorIndex]); } return inputCount; diff --git a/src/DiIiS-NA/Core/Storage/AccountDataBase/SessionProvider.cs b/src/DiIiS-NA/Core/Storage/AccountDataBase/SessionProvider.cs index 2d102ea..b61bb18 100644 --- a/src/DiIiS-NA/Core/Storage/AccountDataBase/SessionProvider.cs +++ b/src/DiIiS-NA/Core/Storage/AccountDataBase/SessionProvider.cs @@ -35,10 +35,16 @@ namespace DiIiS_NA.Core.Storage.AccountDataBase if (_config == null) { _config = new Configuration(); - _config = _config.Configure(Path.Combine(FileHelpers.AssemblyRoot, "database.Account.config")); +#if DEBUG + if (File.Exists(Path.Combine(FileHelpers.AssemblyRoot, "database.Account.Debug.config"))) + _config = _config.Configure(Path.Combine(FileHelpers.AssemblyRoot, "database.Account.Debug.config")); + else + _config = _config.Configure(Path.Combine(FileHelpers.AssemblyRoot, "database.Account.config")); +#else + _config = _config.Configure(Path.Combine(FileHelpers.AssemblyRoot, "database.Account.config")); +#endif - - var replacedProperties = new Dictionary(); + var replacedProperties = new Dictionary(); foreach (var prop in _config.Properties) { var newvalue = prop.Value; diff --git a/src/DiIiS-NA/D3-GameServer/GameModsConfig.cs b/src/DiIiS-NA/D3-GameServer/GameModsConfig.cs index e66ffac..034164a 100644 --- a/src/DiIiS-NA/D3-GameServer/GameModsConfig.cs +++ b/src/DiIiS-NA/D3-GameServer/GameModsConfig.cs @@ -155,7 +155,7 @@ public class GameModsConfig return; } - Logger.Fatal("An error occured whilst loading $[white on red]$config.mods.json$[/]$ file. Please verify if the file is correct. Delete the file and try again."); + Logger.Fatal("An error occurred whilst loading $[white on red]$config.mods.json$[/]$ file. Please verify if the file is correct. Delete the file and try again."); Program.Shutdown(ex); } }