Rename project to EpinelPS

This commit is contained in:
Mikhail
2024-07-30 13:04:25 -04:00
parent 0990f46266
commit 239c4f293f
204 changed files with 587 additions and 700 deletions

View File

@@ -3,11 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.10.34928.147
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "nksrv", "nksrv\nksrv.csproj", "{5C24A07E-9B8D-4625-BF91-0E9CCBEF5CB0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataFixupUtil", "DataFixupUtil\DataFixupUtil.csproj", "{13124DFB-448B-4F4F-A479-537EE067D836}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProtobufViewUtil", "ProtobufViewUtil\ProtobufViewUtil.csproj", "{FDEDD0D6-9C02-4E58-8110-04E8D5639881}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EpinelPS", "EpinelPS\EpinelPS.csproj", "{5C24A07E-9B8D-4625-BF91-0E9CCBEF5CB0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerSelector", "ServerSelector\ServerSelector.csproj", "{EC613C24-8A35-42E8-92C1-9A8431F74F58}"
EndProject
@@ -15,8 +11,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ServerSelector.Desktop", "S
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{4BB2E77F-84A6-4644-9FB3-38E2A7DCDEC0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameDownloader", "GameDownloader\GameDownloader.csproj", "{E3512D9F-CB94-4C80-B673-0EB83CA21D12}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -57,54 +51,6 @@ Global
{5C24A07E-9B8D-4625-BF91-0E9CCBEF5CB0}.ReleaseDLL|x64.Build.0 = Release|Any CPU
{5C24A07E-9B8D-4625-BF91-0E9CCBEF5CB0}.ReleaseDLL|x86.ActiveCfg = Release|Any CPU
{5C24A07E-9B8D-4625-BF91-0E9CCBEF5CB0}.ReleaseDLL|x86.Build.0 = Release|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.Debug|Any CPU.Build.0 = Debug|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.Debug|x64.ActiveCfg = Debug|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.Debug|x64.Build.0 = Debug|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.Debug|x86.ActiveCfg = Debug|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.Debug|x86.Build.0 = Debug|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.DebugDLL|Any CPU.ActiveCfg = Debug|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.DebugDLL|Any CPU.Build.0 = Debug|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.DebugDLL|x64.ActiveCfg = Debug|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.DebugDLL|x64.Build.0 = Debug|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.DebugDLL|x86.ActiveCfg = Debug|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.DebugDLL|x86.Build.0 = Debug|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.Release|Any CPU.ActiveCfg = Release|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.Release|Any CPU.Build.0 = Release|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.Release|x64.ActiveCfg = Release|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.Release|x64.Build.0 = Release|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.Release|x86.ActiveCfg = Release|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.Release|x86.Build.0 = Release|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.ReleaseDLL|Any CPU.ActiveCfg = Release|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.ReleaseDLL|Any CPU.Build.0 = Release|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.ReleaseDLL|x64.ActiveCfg = Release|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.ReleaseDLL|x64.Build.0 = Release|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.ReleaseDLL|x86.ActiveCfg = Release|Any CPU
{13124DFB-448B-4F4F-A479-537EE067D836}.ReleaseDLL|x86.Build.0 = Release|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.Debug|x64.ActiveCfg = Debug|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.Debug|x64.Build.0 = Debug|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.Debug|x86.ActiveCfg = Debug|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.Debug|x86.Build.0 = Debug|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.DebugDLL|Any CPU.ActiveCfg = Debug|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.DebugDLL|Any CPU.Build.0 = Debug|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.DebugDLL|x64.ActiveCfg = Debug|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.DebugDLL|x64.Build.0 = Debug|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.DebugDLL|x86.ActiveCfg = Debug|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.DebugDLL|x86.Build.0 = Debug|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.Release|Any CPU.Build.0 = Release|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.Release|x64.ActiveCfg = Release|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.Release|x64.Build.0 = Release|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.Release|x86.ActiveCfg = Release|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.Release|x86.Build.0 = Release|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.ReleaseDLL|Any CPU.ActiveCfg = Release|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.ReleaseDLL|Any CPU.Build.0 = Release|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.ReleaseDLL|x64.ActiveCfg = Release|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.ReleaseDLL|x64.Build.0 = Release|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.ReleaseDLL|x86.ActiveCfg = Release|Any CPU
{FDEDD0D6-9C02-4E58-8110-04E8D5639881}.ReleaseDLL|x86.Build.0 = Release|Any CPU
{EC613C24-8A35-42E8-92C1-9A8431F74F58}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC613C24-8A35-42E8-92C1-9A8431F74F58}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC613C24-8A35-42E8-92C1-9A8431F74F58}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -153,30 +99,6 @@ Global
{01D0A73A-A881-439D-9318-54DB5B00D6F5}.ReleaseDLL|x64.Build.0 = Release|Any CPU
{01D0A73A-A881-439D-9318-54DB5B00D6F5}.ReleaseDLL|x86.ActiveCfg = Release|Any CPU
{01D0A73A-A881-439D-9318-54DB5B00D6F5}.ReleaseDLL|x86.Build.0 = Release|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.Debug|x64.ActiveCfg = Debug|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.Debug|x64.Build.0 = Debug|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.Debug|x86.ActiveCfg = Debug|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.Debug|x86.Build.0 = Debug|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.DebugDLL|Any CPU.ActiveCfg = Debug|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.DebugDLL|Any CPU.Build.0 = Debug|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.DebugDLL|x64.ActiveCfg = Debug|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.DebugDLL|x64.Build.0 = Debug|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.DebugDLL|x86.ActiveCfg = Debug|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.DebugDLL|x86.Build.0 = Debug|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.Release|Any CPU.Build.0 = Release|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.Release|x64.ActiveCfg = Release|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.Release|x64.Build.0 = Release|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.Release|x86.ActiveCfg = Release|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.Release|x86.Build.0 = Release|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.ReleaseDLL|Any CPU.ActiveCfg = Release|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.ReleaseDLL|Any CPU.Build.0 = Release|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.ReleaseDLL|x64.ActiveCfg = Release|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.ReleaseDLL|x64.Build.0 = Release|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.ReleaseDLL|x86.ActiveCfg = Release|Any CPU
{E3512D9F-CB94-4C80-B673-0EB83CA21D12}.ReleaseDLL|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -184,7 +106,6 @@ Global
GlobalSection(NestedProjects) = preSolution
{EC613C24-8A35-42E8-92C1-9A8431F74F58} = {4BB2E77F-84A6-4644-9FB3-38E2A7DCDEC0}
{01D0A73A-A881-439D-9318-54DB5B00D6F5} = {4BB2E77F-84A6-4644-9FB3-38E2A7DCDEC0}
{E3512D9F-CB94-4C80-B673-0EB83CA21D12} = {4BB2E77F-84A6-4644-9FB3-38E2A7DCDEC0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F779F2DC-B207-4091-83B8-0EA250461DCE}

View File

@@ -1,11 +1,11 @@
using EmbedIO;
using EmbedIO.Routing;
using EmbedIO.WebApi;
using nksrv.Database;
using EpinelPS.Database;
using System.Security.Cryptography;
using System.Text;
namespace nksrv
namespace EpinelPS
{
public class AdminApiController : WebApiController
{

View File

@@ -1,10 +1,10 @@
using Newtonsoft.Json;
using nksrv.LobbyServer;
using nksrv.StaticInfo;
using nksrv.Utils;
using EpinelPS.LobbyServer;
using EpinelPS.StaticInfo;
using EpinelPS.Utils;
using Swan.Logging;
namespace nksrv.Database
namespace EpinelPS.Database
{
public class AccessToken
{

View File

@@ -1,31 +1,18 @@
using ICSharpCode.SharpZipLib.Zip;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using nksrv.Utils;
using EpinelPS.Utils;
using Swan.Logging;
using System.Collections.Generic;
using System.Diagnostics;
using System.Security.Cryptography;
namespace nksrv.StaticInfo
namespace EpinelPS.StaticInfo
{
/// <summary>
/// "Static data" which is what the game calls it, contains data such as map info, characters, quests, rewards and a lot more.
/// </summary>
public class StaticDataParser
public class GameData
{
// These fields were extracted from the game.
public static byte[] PresharedKey = [0xCB, 0xC2, 0x1C, 0x6F, 0xF3, 0xF5, 0x07, 0xF5, 0x05, 0xBA, 0xCA, 0xD4, 0x98, 0x28, 0x84, 0x1F, 0xF0, 0xD1, 0x38, 0xC7, 0x61, 0xDF, 0xD6, 0xE6, 0x64, 0x9A, 0x85, 0x13, 0x3E, 0x1A, 0x6A, 0x0C, 0x68, 0x0E, 0x2B, 0xC4, 0xDF, 0x72, 0xF8, 0xC6, 0x55, 0xE4, 0x7B, 0x14, 0x36, 0x18, 0x3B, 0xA7, 0xD1, 0x20, 0x81, 0x22, 0xD1, 0xA9, 0x18, 0x84, 0x65, 0x13, 0x0B, 0xED, 0xA3, 0x00, 0xE5, 0xD9];
public static RSAParameters RSAParameters = new RSAParameters()
{
Exponent = [0x01, 0x00, 0x01],
Modulus = [0x89, 0xD6, 0x66, 0x00, 0x7D, 0xFC, 0x7D, 0xCE, 0x83, 0xA6, 0x62, 0xE3, 0x1A, 0x5E, 0x9A, 0x53, 0xC7, 0x8A, 0x27, 0xF3, 0x67, 0xC1, 0xF3, 0xD4, 0x37, 0xFE, 0x50, 0x6D, 0x38, 0x45, 0xDF, 0x7E, 0x73, 0x5C, 0xF4, 0x9D, 0x40, 0x4C, 0x8C, 0x63, 0x21, 0x97, 0xDF, 0x46, 0xFF, 0xB2, 0x0D, 0x0E, 0xDB, 0xB2, 0x72, 0xB4, 0xA8, 0x42, 0xCD, 0xEE, 0x48, 0x06, 0x74, 0x4F, 0xE9, 0x56, 0x6E, 0x9A, 0xB1, 0x60, 0x18, 0xBC, 0x86, 0x0B, 0xB6, 0x32, 0xA7, 0x51, 0x00, 0x85, 0x7B, 0xC8, 0x72, 0xCE, 0x53, 0x71, 0x3F, 0x64, 0xC2, 0x25, 0x58, 0xEF, 0xB0, 0xC9, 0x1D, 0xE3, 0xB3, 0x8E, 0xFC, 0x55, 0xCF, 0x8B, 0x02, 0xA5, 0xC8, 0x1E, 0xA7, 0x0E, 0x26, 0x59, 0xA8, 0x33, 0xA5, 0xF1, 0x11, 0xDB, 0xCB, 0xD3, 0xA7, 0x1F, 0xB1, 0xC6, 0x10, 0x39, 0xC8, 0x31, 0x1D, 0x60, 0xDB, 0x0D, 0xA4, 0x13, 0x4B, 0x2B, 0x0E, 0xF3, 0x6F, 0x69, 0xCB, 0xA8, 0x62, 0x03, 0x69, 0xE6, 0x95, 0x6B, 0x8D, 0x11, 0xF6, 0xAF, 0xD9, 0xC2, 0x27, 0x3A, 0x32, 0x12, 0x05, 0xC3, 0xB1, 0xE2, 0x81, 0x4B, 0x40, 0xF8, 0x8B, 0x8D, 0xBA, 0x1F, 0x55, 0x60, 0x2C, 0x09, 0xC6, 0xED, 0x73, 0x96, 0x32, 0xAF, 0x5F, 0xEE, 0x8F, 0xEB, 0x5B, 0x93, 0xCF, 0x73, 0x13, 0x15, 0x6B, 0x92, 0x7B, 0x27, 0x0A, 0x13, 0xF0, 0x03, 0x4D, 0x6F, 0x5E, 0x40, 0x7B, 0x9B, 0xD5, 0xCE, 0xFC, 0x04, 0x97, 0x7E, 0xAA, 0xA3, 0x53, 0x2A, 0xCF, 0xD2, 0xD5, 0xCF, 0x52, 0xB2, 0x40, 0x61, 0x28, 0xB1, 0xA6, 0xF6, 0x78, 0xFB, 0x69, 0x9A, 0x85, 0xD6, 0xB9, 0x13, 0x14, 0x6D, 0xC4, 0x25, 0x36, 0x17, 0xDB, 0x54, 0x0C, 0xD8, 0x77, 0x80, 0x9A, 0x00, 0x62, 0x83, 0xDD, 0xB0, 0x06, 0x64, 0xD0, 0x81, 0x5B, 0x0D, 0x23, 0x9E, 0x88, 0xBD],
DP = null
};
// Fields
private static StaticDataParser? _instance;
public static StaticDataParser Instance
private static GameData? _instance;
public static GameData Instance
{
get
{
@@ -56,22 +43,21 @@ namespace nksrv.StaticInfo
public byte[] Sha256Hash;
public int Size;
static async Task<StaticDataParser> BuildAsync()
static async Task<GameData> BuildAsync()
{
Logger.Info("Decrypting static data");
await Load();
Logger.Info("Loading static data");
Logger.Info("Preparing");
var stopWatch = new Stopwatch();
stopWatch.Start();
await Instance.Parse();
stopWatch.Stop();
Console.WriteLine("Parsing took " + stopWatch.Elapsed);
Console.WriteLine("Preparing took " + stopWatch.Elapsed);
return Instance;
}
public StaticDataParser(string filePath)
public GameData(string filePath)
{
if (!File.Exists(filePath)) throw new ArgumentException("Static data file must exist", nameof(filePath));
@@ -91,16 +77,23 @@ namespace nksrv.StaticInfo
Sha256Hash = SHA256.HashData(rawBytes);
Size = rawBytes.Length;
DecryptStaticDataAndLoadZip(filePath);
LoadGameData(filePath);
if (MainZip == null) throw new Exception("failed to read zip file");
}
#region Decryption
private void DecryptStaticDataAndLoadZip(string file)
#region Data loading
private static byte[] PresharedValue = [0xCB, 0xC2, 0x1C, 0x6F, 0xF3, 0xF5, 0x07, 0xF5, 0x05, 0xBA, 0xCA, 0xD4, 0x98, 0x28, 0x84, 0x1F, 0xF0, 0xD1, 0x38, 0xC7, 0x61, 0xDF, 0xD6, 0xE6, 0x64, 0x9A, 0x85, 0x13, 0x3E, 0x1A, 0x6A, 0x0C, 0x68, 0x0E, 0x2B, 0xC4, 0xDF, 0x72, 0xF8, 0xC6, 0x55, 0xE4, 0x7B, 0x14, 0x36, 0x18, 0x3B, 0xA7, 0xD1, 0x20, 0x81, 0x22, 0xD1, 0xA9, 0x18, 0x84, 0x65, 0x13, 0x0B, 0xED, 0xA3, 0x00, 0xE5, 0xD9];
private static RSAParameters LoadParameters = new RSAParameters()
{
Exponent = [0x01, 0x00, 0x01],
Modulus = [0x89, 0xD6, 0x66, 0x00, 0x7D, 0xFC, 0x7D, 0xCE, 0x83, 0xA6, 0x62, 0xE3, 0x1A, 0x5E, 0x9A, 0x53, 0xC7, 0x8A, 0x27, 0xF3, 0x67, 0xC1, 0xF3, 0xD4, 0x37, 0xFE, 0x50, 0x6D, 0x38, 0x45, 0xDF, 0x7E, 0x73, 0x5C, 0xF4, 0x9D, 0x40, 0x4C, 0x8C, 0x63, 0x21, 0x97, 0xDF, 0x46, 0xFF, 0xB2, 0x0D, 0x0E, 0xDB, 0xB2, 0x72, 0xB4, 0xA8, 0x42, 0xCD, 0xEE, 0x48, 0x06, 0x74, 0x4F, 0xE9, 0x56, 0x6E, 0x9A, 0xB1, 0x60, 0x18, 0xBC, 0x86, 0x0B, 0xB6, 0x32, 0xA7, 0x51, 0x00, 0x85, 0x7B, 0xC8, 0x72, 0xCE, 0x53, 0x71, 0x3F, 0x64, 0xC2, 0x25, 0x58, 0xEF, 0xB0, 0xC9, 0x1D, 0xE3, 0xB3, 0x8E, 0xFC, 0x55, 0xCF, 0x8B, 0x02, 0xA5, 0xC8, 0x1E, 0xA7, 0x0E, 0x26, 0x59, 0xA8, 0x33, 0xA5, 0xF1, 0x11, 0xDB, 0xCB, 0xD3, 0xA7, 0x1F, 0xB1, 0xC6, 0x10, 0x39, 0xC8, 0x31, 0x1D, 0x60, 0xDB, 0x0D, 0xA4, 0x13, 0x4B, 0x2B, 0x0E, 0xF3, 0x6F, 0x69, 0xCB, 0xA8, 0x62, 0x03, 0x69, 0xE6, 0x95, 0x6B, 0x8D, 0x11, 0xF6, 0xAF, 0xD9, 0xC2, 0x27, 0x3A, 0x32, 0x12, 0x05, 0xC3, 0xB1, 0xE2, 0x81, 0x4B, 0x40, 0xF8, 0x8B, 0x8D, 0xBA, 0x1F, 0x55, 0x60, 0x2C, 0x09, 0xC6, 0xED, 0x73, 0x96, 0x32, 0xAF, 0x5F, 0xEE, 0x8F, 0xEB, 0x5B, 0x93, 0xCF, 0x73, 0x13, 0x15, 0x6B, 0x92, 0x7B, 0x27, 0x0A, 0x13, 0xF0, 0x03, 0x4D, 0x6F, 0x5E, 0x40, 0x7B, 0x9B, 0xD5, 0xCE, 0xFC, 0x04, 0x97, 0x7E, 0xAA, 0xA3, 0x53, 0x2A, 0xCF, 0xD2, 0xD5, 0xCF, 0x52, 0xB2, 0x40, 0x61, 0x28, 0xB1, 0xA6, 0xF6, 0x78, 0xFB, 0x69, 0x9A, 0x85, 0xD6, 0xB9, 0x13, 0x14, 0x6D, 0xC4, 0x25, 0x36, 0x17, 0xDB, 0x54, 0x0C, 0xD8, 0x77, 0x80, 0x9A, 0x00, 0x62, 0x83, 0xDD, 0xB0, 0x06, 0x64, 0xD0, 0x81, 0x5B, 0x0D, 0x23, 0x9E, 0x88, 0xBD],
DP = null
};
private void LoadGameData(string file)
{
using var fileStream = File.Open(file, FileMode.Open, FileAccess.Read);
var keyDecryptor = new Rfc2898DeriveBytes(PresharedKey, GameConfig.Root.StaticData.GetSalt2Bytes(), 10000, HashAlgorithmName.SHA256);
var key2 = keyDecryptor.GetBytes(32);
var a = new Rfc2898DeriveBytes(PresharedValue, GameConfig.Root.StaticData.GetSalt2Bytes(), 10000, HashAlgorithmName.SHA256);
var key2 = a.GetBytes(32);
byte[] decryptionKey = key2[0..16];
byte[] iv = key2[16..32];
@@ -111,22 +104,18 @@ namespace nksrv.StaticInfo
aes.Key = decryptionKey;
aes.IV = iv;
var transform = aes.CreateDecryptor();
// Decryption layer 1
using CryptoStream stream = new CryptoStream(fileStream, transform, CryptoStreamMode.Read);
using MemoryStream ms = new MemoryStream();
stream.CopyTo(ms);
var bytes = ms.ToArray();
// Decryption of layer 2
var zip = new ZipFile(ms, false);
var signEntry = zip.GetEntry("sign");
if (signEntry == null) throw new Exception("Sign entry not found in decrypted static data pack");
if (signEntry == null) throw new Exception("error 1");
var dataEntry = zip.GetEntry("data");
if (dataEntry == null) throw new Exception("Data entry not found in decrypted static data pack");
if (dataEntry == null) throw new Exception("error 2");
var signStream = zip.GetInputStream(signEntry);
var dataStream = zip.GetInputStream(dataEntry);
@@ -138,28 +127,26 @@ namespace nksrv.StaticInfo
dataStream.CopyTo(dataMs);
dataMs.Position = 0;
var rsa = RSA.Create(RSAParameters);
var rsa = RSA.Create(LoadParameters);
if (!rsa.VerifyData(dataMs, signMs.ToArray(), HashAlgorithmName.SHA256, RSASignaturePadding.Pkcs1))
throw new Exception("failed to decrypt static data (round 2)");
throw new Exception("error 3");
dataMs.Position = 0;
// Decryption of layer 3
var keyDecryptor2 = new Rfc2898DeriveBytes(PresharedKey, GameConfig.Root.StaticData.GetSalt1Bytes(), 10000, HashAlgorithmName.SHA256);
var keyDecryptor2 = new Rfc2898DeriveBytes(PresharedValue, GameConfig.Root.StaticData.GetSalt1Bytes(), 10000, HashAlgorithmName.SHA256);
var key3 = keyDecryptor2.GetBytes(32);
byte[] decryptionKey2 = key3[0..16];
byte[] val2 = key3[0..16];
byte[] iv2 = key3[16..32];
ZipStream = new MemoryStream();
AesCtrTransform(decryptionKey2, iv2, dataMs, ZipStream);
DoTransformation(val2, iv2, dataMs, ZipStream);
ZipStream.Position = 0;
MainZip = new ZipFile(ZipStream, false);
}
public static void AesCtrTransform(byte[] key, byte[] salt, Stream inputStream, Stream outputStream)
public static void DoTransformation(byte[] key, byte[] salt, Stream inputStream, Stream outputStream)
{
SymmetricAlgorithm aes = Aes.Create();
aes.Mode = CipherMode.ECB;

View File

@@ -1,4 +1,4 @@
namespace nksrv.StaticInfo
namespace EpinelPS.StaticInfo
{
public class MainQuestCompletionRecord
{

View File

@@ -1,4 +1,4 @@
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
internal class AutoLoginEndpoint : IntlMsgHandler
{

View File

@@ -1,4 +1,4 @@
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
public class CodeStatusEndpoint : IntlMsgHandler
{

View File

@@ -1,4 +1,4 @@
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
public class GetNoticeContent : IntlMsgHandler
{

View File

@@ -1,8 +1,8 @@
using nksrv.Utils;
using EpinelPS.Utils;
using System.Net;
using System.Net.Http.Headers;
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
/// <summary>
/// redirect for /account endponts

View File

@@ -1,11 +1,11 @@
using EmbedIO;
using Newtonsoft.Json;
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
using System.Net;
using static nksrv.IntlServer.IntlLogin2Endpoint;
using static EpinelPS.IntlServer.IntlLogin2Endpoint;
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
public class IntlAccountRegisterEndpoint : IntlMsgHandler
{

View File

@@ -1,4 +1,4 @@
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
internal class IntlGetAccountInfo : IntlMsgHandler
{

View File

@@ -1,5 +1,5 @@

namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
internal class IntlGetProfileBindInfo : IntlMsgHandler
{

View File

@@ -1,4 +1,4 @@
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
public class IntlGetProfileInfo : IntlMsgHandler
{

View File

@@ -1,8 +1,8 @@
using EmbedIO;
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
public static class IntlHandler
{

View File

@@ -1,10 +1,10 @@
using EmbedIO;
using Newtonsoft.Json;
using nksrv.Database;
using EpinelPS.Database;
using System.Net;
using static nksrv.IntlServer.IntlLogin2Endpoint;
using static EpinelPS.IntlServer.IntlLogin2Endpoint;
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
public class IntlLogin1Endpoint : IntlMsgHandler
{

View File

@@ -1,9 +1,9 @@
using EmbedIO;
using Newtonsoft.Json;
using nksrv.Database;
using EpinelPS.Database;
using System.Net;
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
/// <summary>
/// This handles the login endpoint.

View File

@@ -1,10 +1,10 @@
using EmbedIO;
using Newtonsoft.Json;
using nksrv.Database;
using EpinelPS.Database;
using Swan.Logging;
using System.Text;
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
public abstract class IntlMsgHandler
{

View File

@@ -1,4 +1,4 @@
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
internal class IntlQueryAccountInfo : IntlMsgHandler
{

View File

@@ -1,4 +1,4 @@
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
public class IntlReturnJsonHandler : IntlMsgHandler
{

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
internal class JuniperLauncherGetRegion : IntlMsgHandler
{

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
internal class JuniperLauncherGetRepoVersion : IntlMsgHandler
{

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
internal class JupiterAuthLogin : IntlMsgHandler
{

View File

@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
internal class JuniperLauncherGetGameLauncher : IntlMsgHandler
{

View File

@@ -1,10 +1,10 @@
using EmbedIO;
using Newtonsoft.Json;
using nksrv.Database;
using EpinelPS.Database;
using System.Net;
using static nksrv.IntlServer.IntlLogin2Endpoint;
using static EpinelPS.IntlServer.IntlLogin2Endpoint;
namespace nksrv.IntlServer
namespace EpinelPS.IntlServer
{
public class SendCodeEndpoint : IntlMsgHandler
{

View File

@@ -1,11 +1,11 @@
using ASodium;
using EmbedIO;
using Google.Protobuf;
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
using Swan.Logging;
namespace nksrv.LobbyServer
namespace EpinelPS.LobbyServer
{
public static class LobbyHandler
{

View File

@@ -1,9 +1,9 @@
using EmbedIO;
using Google.Protobuf;
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
namespace nksrv.LobbyServer
namespace EpinelPS.LobbyServer
{
public abstract class LobbyMsgHandler
{

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Antibot
namespace EpinelPS.LobbyServer.Msgs.Antibot
{
[PacketPath("/antibot/battlereportdata")]
public class BattleReportData : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Antibot
namespace EpinelPS.LobbyServer.Msgs.Antibot
{
[PacketPath("/antibot/recvdata")]
public class RecieveAntibotData : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Archive
namespace EpinelPS.LobbyServer.Msgs.Archive
{
[PacketPath("/bookmark/scenario/exist")]
public class CheckBookmarkScenarioExists : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Archive
namespace EpinelPS.LobbyServer.Msgs.Archive
{
[PacketPath("/archive/get")]
public class GetArchives : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Arena
namespace EpinelPS.LobbyServer.Msgs.Arena
{
[PacketPath("/arena/getbaninfo")]
public class GetArenaBanInfo : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Arena
namespace EpinelPS.LobbyServer.Msgs.Arena
{
[PacketPath("/arena/special/showreward")]
public class ShowSpecialArenaReward : LobbyMsgHandler

View File

@@ -1,7 +1,7 @@
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Auth
namespace EpinelPS.LobbyServer.Msgs.Auth
{
[PacketPath("/auth/logout")]
public class AuthLogout : LobbyMsgHandler

View File

@@ -1,10 +1,10 @@
using EmbedIO;
using Google.Protobuf;
using Google.Protobuf.WellKnownTypes;
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Auth
namespace EpinelPS.LobbyServer.Msgs.Auth
{
[PacketPath("/auth/enterserver")]
public class GetUserOnlineStateLog : LobbyMsgHandler

View File

@@ -1,9 +1,9 @@
using EmbedIO;
using Google.Protobuf.WellKnownTypes;
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Auth
namespace EpinelPS.LobbyServer.Msgs.Auth
{
[PacketPath("/auth/intl")]
public class DoIntlAuth : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Badge
namespace EpinelPS.LobbyServer.Msgs.Badge
{
[PacketPath("/badge/delete")]
public class DeleteBadge : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Badge
namespace EpinelPS.LobbyServer.Msgs.Badge
{
[PacketPath("/badge/sync")]
public class SyncBadge : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Campaign
namespace EpinelPS.LobbyServer.Msgs.Campaign
{
[PacketPath("/shutdownflags/campaignpackage/getall")]
public class CampaignPackageGetAll : LobbyMsgHandler

View File

@@ -1,8 +1,8 @@
using nksrv.LobbyServer.Msgs.Stage;
using nksrv.StaticInfo;
using nksrv.Utils;
using EpinelPS.LobbyServer.Msgs.Stage;
using EpinelPS.StaticInfo;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Campaign
namespace EpinelPS.LobbyServer.Msgs.Campaign
{
[PacketPath("/campaign/getfield")]
public class GetCampaignField : LobbyMsgHandler
@@ -15,7 +15,7 @@ namespace nksrv.LobbyServer.Msgs.Campaign
Console.WriteLine("Map ID: " + req.MapId);
var response = new ResGetCampaignFieldData();
response.Field = GetStage.CreateFieldInfo(user, StaticDataParser.Instance.GetNormalChapterNumberFromFieldName(req.MapId), req.MapId.Contains("hard") ? "Hard" : "Normal");
response.Field = GetStage.CreateFieldInfo(user, GameData.Instance.GetNormalChapterNumberFromFieldName(req.MapId), req.MapId.Contains("hard") ? "Hard" : "Normal");
// todo save this data
response.Team = new NetUserTeamData() { LastContentsTeamNumber = 1, Type = 1 };

View File

@@ -1,7 +1,7 @@
using nksrv.StaticInfo;
using nksrv.Utils;
using EpinelPS.StaticInfo;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Campaign
namespace EpinelPS.LobbyServer.Msgs.Campaign
{
[PacketPath("/campaign/obtain/item")]
public class ObtainItem : LobbyMsgHandler
@@ -13,7 +13,7 @@ namespace nksrv.LobbyServer.Msgs.Campaign
var response = new ResObtainCampaignItem();
var chapter = StaticDataParser.Instance.GetNormalChapterNumberFromFieldName(req.MapId);
var chapter = GameData.Instance.GetNormalChapterNumberFromFieldName(req.MapId);
var mod = req.MapId.Contains("hard") ? "Hard" : "Normal";
var key = chapter + "_" + mod;
var field = user.FieldInfoNew[key];

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Campaign
namespace EpinelPS.LobbyServer.Msgs.Campaign
{
[PacketPath("/campaign/savefield")]
public class SaveField : LobbyMsgHandler

View File

@@ -1,8 +1,8 @@
using nksrv.Database;
using nksrv.StaticInfo;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.StaticInfo;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Campaign
namespace EpinelPS.LobbyServer.Msgs.Campaign
{
[PacketPath("/campaign/savefieldobject")]
public class SaveFieldObject : LobbyMsgHandler
@@ -18,7 +18,7 @@ namespace nksrv.LobbyServer.Msgs.Campaign
Console.WriteLine($"save {req.MapId} with {req.FieldObject.PositionID}");
var chapter = StaticDataParser.Instance.GetNormalChapterNumberFromFieldName(req.MapId);
var chapter = GameData.Instance.GetNormalChapterNumberFromFieldName(req.MapId);
var mod = req.MapId.Contains("hard") ? "Hard" : "Normal";
var key = chapter + "_" + mod;
var field = user.FieldInfoNew[key];

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Character
namespace EpinelPS.LobbyServer.Msgs.Character
{
[PacketPath("/character/attractive/get")]
public class GetCharacterAttractiveList : LobbyMsgHandler

View File

@@ -1,7 +1,7 @@
using nksrv.StaticInfo;
using nksrv.Utils;
using EpinelPS.StaticInfo;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Character
namespace EpinelPS.LobbyServer.Msgs.Character
{
[PacketPath("/character/costume/get")]
public class GetCharacterCostume : LobbyMsgHandler
@@ -13,7 +13,7 @@ namespace nksrv.LobbyServer.Msgs.Character
var response = new ResGetCharacterCostumeData();
// return all
response.CostumeIds.AddRange(StaticDataParser.Instance.GetAllCostumes());
response.CostumeIds.AddRange(GameData.Instance.GetAllCostumes());
await WriteDataAsync(response);
}

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Character
namespace EpinelPS.LobbyServer.Msgs.Character
{
[PacketPath("/character/get")]
public class GetCharacterData : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Character
namespace EpinelPS.LobbyServer.Msgs.Character
{
[PacketPath("/character/synchrodevice/get")]
public class GetSynchrodevice : LobbyMsgHandler

View File

@@ -1,9 +1,9 @@
using nksrv.Database;
using nksrv.StaticInfo;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.StaticInfo;
using EpinelPS.Utils;
using Swan.Logging;
namespace nksrv.LobbyServer.Msgs.Character
namespace EpinelPS.LobbyServer.Msgs.Character
{
[PacketPath("/character/levelup")]
public class LevelUp : LobbyMsgHandler
@@ -13,7 +13,7 @@ namespace nksrv.LobbyServer.Msgs.Character
var req = await ReadData<ReqCharacterLevelUp>();
var user = GetUser();
var response = new ResCharacterLevelUp();
var data = StaticDataParser.Instance.GetCharacterLevelUpData();
var data = GameData.Instance.GetCharacterLevelUpData();
foreach (var item in user.Characters.ToArray())
{

View File

@@ -1,6 +1,6 @@
using nksrv.Database;
using nksrv.StaticInfo;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.StaticInfo;
using EpinelPS.Utils;
using Swan.Logging;
using System;
using System.Collections.Generic;
@@ -8,7 +8,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.LobbyServer.Msgs.Character
namespace EpinelPS.LobbyServer.Msgs.Character
{
[PacketPath("/character/growreset")]
public class ResetLevel : LobbyMsgHandler
@@ -18,7 +18,7 @@ namespace nksrv.LobbyServer.Msgs.Character
var req = await ReadData<ReqCharacterGrowReset>();
var user = GetUser();
var response = new ResCharacterGrowReset();
var data = StaticDataParser.Instance.GetCharacterLevelUpData();
var data = GameData.Instance.GetCharacterLevelUpData();
foreach (var item in user.Characters.ToArray())
{

View File

@@ -1,7 +1,7 @@
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Character
namespace EpinelPS.LobbyServer.Msgs.Character
{
[PacketPath("/character/costume/set")]
public class SetCharacterCostume : LobbyMsgHandler

View File

@@ -1,7 +1,7 @@
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Event
namespace EpinelPS.LobbyServer.Msgs.Event
{
[PacketPath("/event/scenario/complete")]
public class CompleteEventScenario : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Event
namespace EpinelPS.LobbyServer.Msgs.Event
{
[PacketPath("/eventfield/enter")]
public class EnterEventField : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Event
namespace EpinelPS.LobbyServer.Msgs.Event
{
[PacketPath("/event/mission/getclear")]
public class GetClearedMissions : LobbyMsgHandler

View File

@@ -1,7 +1,7 @@
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Event
namespace EpinelPS.LobbyServer.Msgs.Event
{
[PacketPath("/event/scenario/get")]
public class GetEventScenario : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Event
namespace EpinelPS.LobbyServer.Msgs.Event
{
[PacketPath("/event/getjoinedevent")]
public class GetJoinedEvent : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Event
namespace EpinelPS.LobbyServer.Msgs.Event
{
[PacketPath("/event/list")]
public class ListEvents : LobbyMsgHandler

View File

@@ -1,11 +1,11 @@
using nksrv.Utils;
using EpinelPS.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.LobbyServer.Msgs.Event.StoryEvent
namespace EpinelPS.LobbyServer.Msgs.Event.StoryEvent
{
[PacketPath("/event/storydungeon/get")]
public class GetStoryDungeon : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.FavoriteItem
namespace EpinelPS.LobbyServer.Msgs.FavoriteItem
{
[PacketPath("/favoriteitem/library")]
public class GetFavoriteItemLibrary : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.FavoriteItem
namespace EpinelPS.LobbyServer.Msgs.FavoriteItem
{
[PacketPath("/favoriteitem/list")]
public class ListFavoriteItem : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.FavoriteItem
namespace EpinelPS.LobbyServer.Msgs.FavoriteItem
{
[PacketPath("/favoriteitem/quest/list")]
public class ListFavoriteItemQuests : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Friend
namespace EpinelPS.LobbyServer.Msgs.Friend
{
[PacketPath("/friend/get")]
public class GetFriends : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Gacha
namespace EpinelPS.LobbyServer.Msgs.Gacha
{
[PacketPath("/gacha/event/check")]
public class CheckGachaDailyEvent : LobbyMsgHandler

View File

@@ -1,8 +1,8 @@
using nksrv.Database;
using nksrv.StaticInfo;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.StaticInfo;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Gacha
namespace EpinelPS.LobbyServer.Msgs.Gacha
{
[PacketPath("/gacha/execute")]
public class ExecGacha : LobbyMsgHandler
@@ -19,7 +19,7 @@ namespace nksrv.LobbyServer.Msgs.Gacha
// TODO implement reward
response.Reward = new NetRewardData();
foreach (var c in StaticDataParser.Instance.GetAllCharacterTids())
foreach (var c in GameData.Instance.GetAllCharacterTids())
{
if (!user.HasCharacter(c))
{

View File

@@ -1,7 +1,7 @@
using Google.Protobuf.WellKnownTypes;
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs
namespace EpinelPS.LobbyServer.Msgs
{
[PacketPath("/now")]
public class GetCurrentTime : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs
namespace EpinelPS.LobbyServer.Msgs
{
[PacketPath("/Gacha/Get")]
public class GetGacha : LobbyMsgHandler

View File

@@ -1,12 +1,12 @@
using nksrv.Net;
using nksrv.Utils;
using EpinelPS.Net;
using EpinelPS.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.LobbyServer.Msgs.Intercept
namespace EpinelPS.LobbyServer.Msgs.Intercept
{
[PacketPath("/intercept/get")]
public class GetInterceptData : LobbyMsgHandler

View File

@@ -1,12 +1,12 @@
using nksrv.Net;
using nksrv.Utils;
using EpinelPS.Net;
using EpinelPS.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.LobbyServer.Msgs.Intercept
namespace EpinelPS.LobbyServer.Msgs.Intercept
{
[PacketPath("/intercept/check")]
public class CheckClearInterceptToday : LobbyMsgHandler

View File

@@ -1,12 +1,12 @@
using nksrv.Net;
using nksrv.Utils;
using EpinelPS.Net;
using EpinelPS.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.LobbyServer.Msgs.Intercept
namespace EpinelPS.LobbyServer.Msgs.Intercept
{
[PacketPath("/intercept/clear")]
public class ClearInterceptData : LobbyMsgHandler

View File

@@ -1,12 +1,12 @@
using nksrv.Net;
using nksrv.Utils;
using EpinelPS.Net;
using EpinelPS.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.LobbyServer.Msgs.Intercept
namespace EpinelPS.LobbyServer.Msgs.Intercept
{
[PacketPath("/intercept/enter")]
public class EnterInterceptData : LobbyMsgHandler

View File

@@ -1,8 +1,8 @@
using nksrv.Net;
using nksrv.Utils;
using EpinelPS.Net;
using EpinelPS.Utils;
using System.Threading.Tasks;
namespace nksrv.LobbyServer.Msgs.Intercept
namespace EpinelPS.LobbyServer.Msgs.Intercept
{
[PacketPath("/intercept/fastclear")]
public class FastClearInterceptData : LobbyMsgHandler

View File

@@ -1,7 +1,7 @@
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Inventory
namespace EpinelPS.LobbyServer.Msgs.Inventory
{
[PacketPath("/inventory/allclearequipment")]
public class ClearAllEquipment : LobbyMsgHandler

View File

@@ -1,7 +1,7 @@
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Inventory
namespace EpinelPS.LobbyServer.Msgs.Inventory
{
[PacketPath("/inventory/clearequipment")]
public class ClearEquipment : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Inventory
namespace EpinelPS.LobbyServer.Msgs.Inventory
{
[PacketPath("/inventory/get")]
public class GetInventoryData : LobbyMsgHandler

View File

@@ -1,7 +1,7 @@
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Inventory
namespace EpinelPS.LobbyServer.Msgs.Inventory
{
[PacketPath("/inventory/wearequipment")]
public class WearEquipment : LobbyMsgHandler

View File

@@ -1,7 +1,7 @@
using nksrv.Database;
using nksrv.Utils;
using EpinelPS.Database;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Inventory
namespace EpinelPS.LobbyServer.Msgs.Inventory
{
[PacketPath("/inventory/wearequipmentlist")]
public class WearEquipmentList : LobbyMsgHandler

View File

@@ -1,12 +1,12 @@
using nksrv.Net;
using nksrv.Utils;
using EpinelPS.Net;
using EpinelPS.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.LobbyServer.Msgs.Liberate
namespace EpinelPS.LobbyServer.Msgs.Liberate
{
[PacketPath("/liberate/choosecharacter")]
public class ChooseCharacter : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Liberate
namespace EpinelPS.LobbyServer.Msgs.Liberate
{
[PacketPath("/liberate/get")]
public class GetLiberateData : LobbyMsgHandler

View File

@@ -1,12 +1,12 @@
using nksrv.Net;
using nksrv.Utils;
using EpinelPS.Net;
using EpinelPS.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace nksrv.LobbyServer.Msgs.Liberate
namespace EpinelPS.LobbyServer.Msgs.Liberate
{
[PacketPath("/liberate/getprogresslist")]
public class GetProgressList : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Lostsector
namespace EpinelPS.LobbyServer.Msgs.Lostsector
{
[PacketPath("/lostsector/get")]
public class GetLostSectorData : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Messenger
namespace EpinelPS.LobbyServer.Msgs.Messenger
{
[PacketPath("/messenger/daily/pick")]
public class GetDailyMessage : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Messenger
namespace EpinelPS.LobbyServer.Msgs.Messenger
{
[PacketPath("/messenger/get")]
public class GetMessages : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Messenger
namespace EpinelPS.LobbyServer.Msgs.Messenger
{
[PacketPath("/messenger/picked/get")]
public class GetPickedMessage : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Messenger
namespace EpinelPS.LobbyServer.Msgs.Messenger
{
[PacketPath("/messenger/random/pick")]
public class GetRandomPick : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Messenger
namespace EpinelPS.LobbyServer.Msgs.Messenger
{
[PacketPath("/messenger/proceed")]
public class ProceedMsg : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Minigame.Dave
namespace EpinelPS.LobbyServer.Msgs.Minigame.Dave
{
[PacketPath("/event/minigame/dave/getalldavetrigger")]
public class GetAllDaveTrigger : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Minigame
namespace EpinelPS.LobbyServer.Msgs.Minigame
{
[PacketPath("/minigame/nksv2/get")]
public class GetNksv2Minigame : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Minigame.IslandAdventure
namespace EpinelPS.LobbyServer.Msgs.Minigame.IslandAdventure
{
[PacketPath("/event/minigame/islandadventure/get/fishing/stepupreward")]
public class GetFishingStepUpRewardStatus : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Minigame.IslandAdventure
namespace EpinelPS.LobbyServer.Msgs.Minigame.IslandAdventure
{
[PacketPath("/event/minigame/islandadventure/get/photo/stepupreward")]
public class GetPhotoStepUpRewardStatus : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Minigame.IslandAdventure
namespace EpinelPS.LobbyServer.Msgs.Minigame.IslandAdventure
{
[PacketPath("/event/minigame/islandadventure/list/mission")]
public class ListMission : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Minigame.PlaySoda
namespace EpinelPS.LobbyServer.Msgs.Minigame.PlaySoda
{
[PacketPath("/event/minigame/playsoda/challenge/getinfo")]
public class GetChallengeInfo : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Misc
namespace EpinelPS.LobbyServer.Msgs.Misc
{
[PacketPath("/enterlobbyping")]
public class EnterLobbyPing : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Misc
namespace EpinelPS.LobbyServer.Msgs.Misc
{
[PacketPath("/shutdownflags/gacha/getall")]
public class GachaGetAllShutdownFlags : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Misc
namespace EpinelPS.LobbyServer.Msgs.Misc
{
[PacketPath("/featureflags/get")]
public class GetFeatureFlags : LobbyMsgHandler

View File

@@ -1,7 +1,7 @@
using nksrv.Net;
using nksrv.Utils;
using EpinelPS.Net;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Misc
namespace EpinelPS.LobbyServer.Msgs.Misc
{
[PacketPath("/maintenancenotice")]
public class GetMaintenanceNotice : LobbyMsgHandler

View File

@@ -1,7 +1,7 @@
using nksrv.Net;
using nksrv.Utils;
using EpinelPS.Net;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Misc
namespace EpinelPS.LobbyServer.Msgs.Misc
{
[PacketPath("/resourcehosts2")]
public class CheckClientVersion : LobbyMsgHandler

View File

@@ -1,7 +1,7 @@
using nksrv.Net;
using nksrv.Utils;
using EpinelPS.Net;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Misc
namespace EpinelPS.LobbyServer.Msgs.Misc
{
[PacketPath("/system/sentry/getparams")]
public class GetSentryParams : LobbyMsgHandler

View File

@@ -1,7 +1,7 @@
using nksrv.Net;
using nksrv.Utils;
using EpinelPS.Net;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Misc
namespace EpinelPS.LobbyServer.Msgs.Misc
{
[PacketPath("/getserverinfo")]
public class GetServerInfo : LobbyMsgHandler

View File

@@ -1,9 +1,9 @@
using Google.Protobuf;
using nksrv.Net;
using nksrv.StaticInfo;
using nksrv.Utils;
using EpinelPS.Net;
using EpinelPS.StaticInfo;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Misc
namespace EpinelPS.LobbyServer.Msgs.Misc
{
[PacketPath("/staticdatapack")]
public class GetStaticDataPack : LobbyMsgHandler
@@ -15,8 +15,8 @@ namespace nksrv.LobbyServer.Msgs.Misc
var r = new StaticDataPackResponse();
r.Url = GameConfig.Root.StaticData.Url;
r.Version = GameConfig.Root.StaticData.Version;
r.FileSize = StaticDataParser.Instance.Size;
r.Sha256Sum = ByteString.CopyFrom(StaticDataParser.Instance.Sha256Hash);
r.FileSize = GameData.Instance.Size;
r.Sha256Sum = ByteString.CopyFrom(GameData.Instance.Sha256Hash);
r.Salt1 = ByteString.CopyFrom(Convert.FromBase64String(GameConfig.Root.StaticData.Salt1));
r.Salt2 = ByteString.CopyFrom(Convert.FromBase64String(GameConfig.Root.StaticData.Salt2));

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Misc
namespace EpinelPS.LobbyServer.Msgs.Misc
{
[PacketPath("/useronlinestatelog")]
public class GetUserOnlineStateLog : LobbyMsgHandler

View File

@@ -1,6 +1,6 @@
using nksrv.Utils;
using EpinelPS.Utils;
namespace nksrv.LobbyServer.Msgs.Mission
namespace EpinelPS.LobbyServer.Msgs.Mission
{
[PacketPath("/mission/getrewarded/achievement")]
public class GetAchievementRewardedData : LobbyMsgHandler

Some files were not shown because too many files have changed in this diff Show More