mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-14 16:04:36 +01:00
Generate static data schema, use pascal case for it
This commit is contained in:
@@ -17,7 +17,7 @@ namespace EpinelPS.LobbyServer.LobbyUser
|
||||
Msn = 3,
|
||||
Nickname = "nick",
|
||||
Title = new() { IsPlain = true, Str = "Our Server Fell" },
|
||||
Text = new() { IsPlain = true, Str = "Our Game Was Down For 1 Second because the HP Laptop Which Hosted the Server Got Shut Down by the Lid Closing. As for the Reward for the Inconvience, free paid gems" },
|
||||
Text = new() { IsPlain = true, Str = "Our Game Was Down For 1 Second because the HP Laptop Which Hosted the Server Got Shut Down by the LId Closing. As for the Reward for the Inconvience, free paId gems" },
|
||||
HasReward = true,
|
||||
Sender = 102
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@ namespace EpinelPS.LobbyServer.LobbyUser
|
||||
ReqGetProfileFrame req = await ReadData<ReqGetProfileFrame>();
|
||||
ResGetProfileFrame response = new();
|
||||
|
||||
foreach (UserFrameTableRecord frameRecord in GameData.Instance.userFrameTable.Values)
|
||||
foreach (var frameRecord in GameData.Instance.userFrameTable.Values)
|
||||
{
|
||||
response.Frames.Add(frameRecord.id);
|
||||
response.Frames.Add(frameRecord.Id);
|
||||
}
|
||||
|
||||
await WriteDataAsync(response);
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace EpinelPS.LobbyServer.LobbyUser
|
||||
response.LastClearedNormalMainStageId = user.LastNormalStageCleared;
|
||||
|
||||
// Restore completed tutorials. GroupID is the first 4 digits of the Table ID.
|
||||
foreach (KeyValuePair<int, Data.ClearedTutorialData> item in user.ClearedTutorialData)
|
||||
foreach (KeyValuePair<int, ClearedTutorialData> item in user.ClearedTutorialData)
|
||||
{
|
||||
int groupId = item.Value.GroupId;
|
||||
int version = item.Value.VersionGroup;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace EpinelPS.LobbyServer.LobbyUser
|
||||
|
||||
// Fetch all the wallpaper IDs from the LiveWallpaperTable,
|
||||
// excluding records where livewallpaper_type is "SkillCutScene"
|
||||
List<int> wallpaperIds = [.. GameData.Instance.lwptablemgrs.Where(w => w.Value.livewallpaper_type != "SkillCutScene").Select(w => w.Key)];
|
||||
List<int> wallpaperIds = [.. GameData.Instance.lwptablemgrs.Where(w => w.Value.LivewallpaperType != Livewallpaper_type.SkillCutScene).Select(w => w.Key)];
|
||||
|
||||
// Add the filtered wallpaper IDs to the LivewallpaperIds field
|
||||
r.LivewallpaperIds.AddRange(wallpaperIds);
|
||||
|
||||
@@ -19,9 +19,9 @@ namespace EpinelPS.LobbyServer.LobbyUser
|
||||
|
||||
user.CompletedScenarios.Add(req.ScenarioId);
|
||||
|
||||
if (GameData.Instance.ScenarioRewards.TryGetValue(req.ScenarioId, out ScenarioRewardRecord? record))
|
||||
if (GameData.Instance.ScenarioRewards.TryGetValue(req.ScenarioId, out ScenarioRewardsRecord? record))
|
||||
{
|
||||
response.Reward = RewardUtils.RegisterRewardsForUser(user, record.reward_id);
|
||||
response.Reward = RewardUtils.RegisterRewardsForUser(user, record.RewardId);
|
||||
}
|
||||
|
||||
JsonDb.Save();
|
||||
|
||||
@@ -14,9 +14,17 @@ namespace EpinelPS.LobbyServer.LobbyUser.Tutorial
|
||||
|
||||
if (!user.ClearedTutorialData.ContainsKey(req.LastClearedTid))
|
||||
{
|
||||
ClearedTutorialData cleared = GameData.Instance.GetTutorialDataById(req.LastClearedTid);
|
||||
cleared.id = req.LastClearedTid;
|
||||
user.ClearedTutorialData.Add(req.LastClearedTid, cleared);
|
||||
var cleared = GameData.Instance.GetTutorialDataById(req.LastClearedTid);
|
||||
cleared.Id = req.LastClearedTid;
|
||||
user.ClearedTutorialData.Add(req.LastClearedTid, new ClearedTutorialData()
|
||||
{
|
||||
ClearedStageId = cleared.ClearedStageId,
|
||||
GroupId = cleared.GroupId,
|
||||
Id = cleared.GroupId,
|
||||
NextId = cleared.NextId,
|
||||
SaveTutorial = cleared.SaveTutorial,
|
||||
VersionGroup = cleared.VersionGroup
|
||||
});
|
||||
}
|
||||
JsonDb.Save();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user