Fix unlocking of hard mode/story mode/surface mode

This commit is contained in:
Mikhail Tyukin
2025-12-06 11:42:05 -05:00
parent bc7416c44a
commit fb062eefae
6 changed files with 73 additions and 9 deletions

View File

@@ -48,6 +48,9 @@ namespace EpinelPS.Data
[LoadRecord("CampaignChapterTable.json", "Chapter")] [LoadRecord("CampaignChapterTable.json", "Chapter")]
public readonly Dictionary<int, CampaignChapterRecord> ChapterCampaignData = []; public readonly Dictionary<int, CampaignChapterRecord> ChapterCampaignData = [];
[LoadRecord("ContentsOpenTable.json", "Id")]
public readonly Dictionary<ContentsOpen, ContentsOpenRecord> ContentsOpenTable = [];
[LoadRecord("CharacterCostumeTable.json", "Id")] [LoadRecord("CharacterCostumeTable.json", "Id")]
public readonly Dictionary<int, CharacterCostumeRecord> CharacterCostumeTable = []; public readonly Dictionary<int, CharacterCostumeRecord> CharacterCostumeTable = [];

View File

@@ -0,0 +1,19 @@
using EpinelPS.Utils;
namespace EpinelPS.LobbyServer.Hexacode;
[PacketPath("/hexacode/get-all")]
public class GetAll : LobbyMsgHandler
{
protected override async Task HandleAsync()
{
ReqGetHexaAll req = await ReadData<ReqGetHexaAll>();
User user = GetUser();
ResGetHexaAll response = new();
// TODO
await WriteDataAsync(response);
}
}

View File

@@ -13,16 +13,21 @@ namespace EpinelPS.LobbyServer.LobbyUser
// this request returns a list of "special" stages that mark when something is unlocked, ex: the shop or interception // this request returns a list of "special" stages that mark when something is unlocked, ex: the shop or interception
List<int> specialStages = [6003003, 6002008, 6002016, 6005003, 6003021, 6011018, 6007021, 6004018, 6005013, 6003009, 6003012, 6009017, 6016039, 6001004, 6000003, 6000001, 6002001, 6004023, 6005026, 6020050, 6006004, 6006023, 6022049];
ResGetContentsOpenData response = new(); ResGetContentsOpenData response = new();
foreach (FieldInfoNew field in user.FieldInfoNew.Values)
foreach (var item in GameData.Instance.ContentsOpenTable)
{ {
foreach (int stage in field.CompletedStages) foreach (var condition in item.Value.OpenCondition)
{ {
if (specialStages.Contains(stage)) if (condition.OpenConditionType == ContentsOpenCondition.StageClear)
response.ClearStageList.Add(stage); {
if (user.IsStageCompleted(condition.OpenConditionValue))
{
response.ClearStageList.Add(condition.OpenConditionValue);
}
}
} }
} }
response.MaxGachaCount = user.GachaTutorialPlayCount; response.MaxGachaCount = user.GachaTutorialPlayCount;
response.MaxGachaPremiumCount = user.GachaTutorialPlayCount; response.MaxGachaPremiumCount = user.GachaTutorialPlayCount;

View File

@@ -0,0 +1,19 @@
using EpinelPS.Utils;
namespace EpinelPS.LobbyServer.Hexacode;
[PacketPath("/Surface/Export/MaxAmount/All")]
public class GetMaximumAmountAll : LobbyMsgHandler
{
protected override async Task HandleAsync()
{
ReqListAllSurfaceCurrencyMaxAmount req = await ReadData<ReqListAllSurfaceCurrencyMaxAmount>();
User user = GetUser();
ResListAllSurfaceCurrencyMaxAmount response = new();
// TODO
await WriteDataAsync(response);
}
}

View File

@@ -0,0 +1,19 @@
using EpinelPS.Utils;
namespace EpinelPS.LobbyServer.Hexacode;
[PacketPath("/surface/lobby/simpledata")]
public class GetSimpleData : LobbyMsgHandler
{
protected override async Task HandleAsync()
{
ReqLobbySurfaceSimpleData req = await ReadData<ReqLobbySurfaceSimpleData>();
User user = GetUser();
ResLobbySurfaceSimpleData response = new();
// TODO
await WriteDataAsync(response);
}
}

View File

@@ -57,7 +57,7 @@ namespace ServerSelector
string certList1 = await File.ReadAllTextAsync(launcherCertList); string certList1 = await File.ReadAllTextAsync(launcherCertList);
if (!certList1.Contains("Good SSL Ca")) if (!certList1.Contains("Good SSL Ca"))
return "Patch missing"; return "SSL Cert Patch missing";
} }
if (File.Exists(gameCertList)) if (File.Exists(gameCertList))
@@ -65,11 +65,10 @@ namespace ServerSelector
string certList2 = await File.ReadAllTextAsync(gameCertList); string certList2 = await File.ReadAllTextAsync(gameCertList);
if (!certList2.Contains("Good SSL Ca")) if (!certList2.Contains("Good SSL Ca"))
return "Patch missing"; return "SSL Cert Patch missing";
} }
// TODO: Check sodium lib // TODO: Check sodium lib
// TODO: Check if gameassembly was patched
// TODO: check hosts file // TODO: check hosts file
return "OK"; return "OK";