add all profile frames to user

This commit is contained in:
SELEKCJONER
2024-11-10 17:46:38 +01:00
parent c2a50d5682
commit 8078da421c
4 changed files with 40 additions and 1 deletions

View File

@@ -47,6 +47,7 @@ namespace EpinelPS.StaticInfo
public Dictionary<int, EventManager> eventManagers = new Dictionary<int, EventManager>();
public Dictionary<int, LiveWallpaperRecord> lwptablemgrs = new Dictionary<int, LiveWallpaperRecord>(); // Fixed initialization
private Dictionary<int, AlbumResourceRecord> albumResourceRecords = new Dictionary<int, AlbumResourceRecord>();
public Dictionary<int, UserFrameTableRecord> userFrameTable = new Dictionary<int, UserFrameTableRecord>();
@@ -400,6 +401,12 @@ namespace EpinelPS.StaticInfo
{
lwptablemgrs.Add(obj.id, obj); // Use obj.id as the key and obj (the LiveWallpaperRecord) as the value
}
var userFrameData = await LoadZip<UserFrameTable>("UserFrameTable.json", progress);
foreach (var record in userFrameData.records)
{
userFrameTable[record.id] = record;
}
var albumResourceTable = await LoadZip<AlbumResourceTable>("AlbumResourceTable.json", progress);
foreach (var obj in albumResourceTable.records)

View File

@@ -299,5 +299,23 @@
{
public List<AlbumResourceRecord> records;
}
public class UserFrameTableRecord
{
public int id;
public string resource_id;
public string tab_type;
public string user_profile_type;
public string filter_type;
public int order;
public string name_localkey;
public string description_localkey;
public bool is_sub_resource_prism;
}
public class UserFrameTable
{
public List<UserFrameTableRecord> records;
}
}

View File

@@ -206,6 +206,16 @@ namespace EpinelPS.LobbyServer.Msgs.Event
EventEndDate = DateTime.Now.AddDays(20).Ticks,
EventDisableDate = DateTime.Now.AddDays(20).Ticks,
});
// banner for cinderella i think
response.EventList.Add(new NetEventData()
{
Id = 70070,
EventSystemType = 6,
EventVisibleDate = DateTime.UtcNow.Subtract(TimeSpan.FromDays(7)).Ticks,
EventStartDate = DateTime.UtcNow.Subtract(TimeSpan.FromDays(1)).Ticks,
EventEndDate = DateTime.Now.AddDays(20).Ticks,
EventDisableDate = DateTime.Now.AddDays(20).Ticks,
});

View File

@@ -1,4 +1,5 @@
using EpinelPS.Utils;
using EpinelPS.StaticInfo;
namespace EpinelPS.LobbyServer.Msgs.User
{
@@ -10,7 +11,10 @@ namespace EpinelPS.LobbyServer.Msgs.User
var req = await ReadData<ReqGetProfileFrame>();
var response = new ResGetProfileFrame();
// TODO
foreach (var frameRecord in GameData.Instance.userFrameTable.Values)
{
response.Frames.Add(frameRecord.id);
}
await WriteDataAsync(response);
}