fix build

This commit is contained in:
Mikhail Tyukin
2025-10-29 22:03:06 -04:00
parent 2ee95caf32
commit 0aed2aff6c
5 changed files with 37 additions and 13 deletions

View File

@@ -496,7 +496,7 @@ namespace EpinelPS.Data
if (QuestDataRecords.Count == 0) throw new Exception("QuestDataRecords should not be empty");
foreach (KeyValuePair<int, MainQuestRecord> item in QuestDataRecords)
{
if (item.Value.ConditionId == stage)
if (item.Value.ConditionId[0].ConditionId == stage)
{
return item.Value;
}

View File

@@ -0,0 +1,21 @@
using EpinelPS.Utils;
using Google.Protobuf;
namespace EpinelPS.LobbyServer.Badge
{
[PacketPath("/badge/permanentcontent")]
public class PermanentContent : LobbyMsgHandler
{
protected override async Task HandleAsync()
{
ReqPermanentContentBadgeData req = await ReadData<ReqPermanentContentBadgeData>();
User user = GetUser();
ResPermanentContentBadgeData response = new();
// TODO
await WriteDataAsync(response);
}
}
}

View File

@@ -11,7 +11,8 @@ namespace EpinelPS.LobbyServer.Event
public static void AddEvents(ref ResGetEventList response)
{
List<LobbyPrivateBannerRecord> lobbyPrivateBanners = [.. GameData.Instance.LobbyPrivateBannerTable.Values.Where(b => b.StartDate <= DateTime.UtcNow && b.EndDate >= DateTime.UtcNow)];
// TODO
List<LobbyPrivateBannerRecord> lobbyPrivateBanners = []; //[.. GameData.Instance.LobbyPrivateBannerTable.Values.Where(b => b.StartDate <= DateTime.UtcNow && b.EndDate >= DateTime.UtcNow)];
Logging.WriteLine($"Found {lobbyPrivateBanners.Count} active lobby private banners.", LogType.Debug);
log.Debug($"Active lobby private banners: {JsonConvert.SerializeObject(lobbyPrivateBanners)}");
@@ -73,7 +74,7 @@ namespace EpinelPS.LobbyServer.Event
public static void AddJoinedGachaEvents(ref ResGetJoinedEvent response)
{
List<LobbyPrivateBannerRecord> lobbyPrivateBanners = [.. GameData.Instance.LobbyPrivateBannerTable.Values.Where(b => b.StartDate <= DateTime.UtcNow && b.EndDate >= DateTime.UtcNow)];
List<LobbyPrivateBannerRecord> lobbyPrivateBanners = [];//[.. GameData.Instance.LobbyPrivateBannerTable.Values.Where(b => b.StartDate <= DateTime.UtcNow && b.EndDate >= DateTime.UtcNow)];
Logging.WriteLine($"Found {lobbyPrivateBanners.Count} active lobby private banners.", LogType.Debug);
log.Debug($"Active lobby private banners: {JsonConvert.SerializeObject(lobbyPrivateBanners)}");
@@ -124,7 +125,7 @@ namespace EpinelPS.LobbyServer.Event
}
// Add the main event associated with the banner
var mainEvent = eventManagers.First(em => em.Id == banner.EventId);
events.Add(new NetEventData()
/* events.Add(new NetEventData()
{
Id = mainEvent.Id,
EventSystemType = (int)mainEvent.EventSystemType,
@@ -132,12 +133,12 @@ namespace EpinelPS.LobbyServer.Event
EventVisibleDate = banner.StartDate.Ticks,
EventDisableDate = banner.EndDate.Ticks,
EventEndDate = banner.EndDate.Ticks
});
});*/
// Add child events associated with the main event
var childEvents = eventManagers.Where(em => em.ParentsEventId == banner.EventId || em.SetField == banner.EventId).ToList();
foreach (var childEvent in childEvents)
{
events.Add(new NetEventData()
/* events.Add(new NetEventData()
{
Id = childEvent.Id,
EventSystemType = (int)childEvent.EventSystemType,
@@ -145,7 +146,7 @@ namespace EpinelPS.LobbyServer.Event
EventVisibleDate = banner.StartDate.Ticks,
EventDisableDate = banner.EndDate.Ticks,
EventEndDate = banner.EndDate.Ticks
});
});*/
}
return events;
}
@@ -183,10 +184,10 @@ namespace EpinelPS.LobbyServer.Event
{
Id = gachaEvent.Id,
EventSystemType = (int)gachaEvent.EventSystemType,
EventStartDate = banner.StartDate.Ticks,
EventVisibleDate = banner.StartDate.Ticks,
EventDisableDate = banner.EndDate.Ticks,
EventEndDate = banner.EndDate.Ticks
//EventStartDate = banner.StartDate.Ticks,
//EventVisibleDate = banner.StartDate.Ticks,
////EventDisableDate = banner.EndDate.Ticks,
//EventEndDate = banner.EndDate.Ticks
});
}
return events;

View File

@@ -16,7 +16,9 @@ namespace EpinelPS.LobbyServer.Pass
ResGetActiveEventPassData response = new(); // fields PassList = NetPassInfo
List<LobbyPrivateBannerRecord> lobbyPrivateBanners = [.. GameData.Instance.LobbyPrivateBannerTable.Values.Where(b => b.StartDate <= DateTime.UtcNow && b.EndDate >= DateTime.UtcNow)];
List<LobbyPrivateBannerRecord> lobbyPrivateBanners = [];//[.. GameData.Instance.LobbyPrivateBannerTable.Values.Where(b => b.PrivateBannerShowDuration <= DateTime.UtcNow && b.EndDate >= DateTime.UtcNow)];
// TODO: PrivateBannerShowDuration
log.Debug($"Active lobby private banners: {JsonConvert.SerializeObject(lobbyPrivateBanners)}");
if (lobbyPrivateBanners.Count <= 0)
{

View File

@@ -16,7 +16,7 @@ namespace EpinelPS.LobbyServer.TriggerController
var completedQuest = GameData.Instance.GetMainQuestByTableId(req.Tid) ?? throw new Exception("Quest not found");
user.AddTrigger(Trigger.CampaignClear, 1, completedQuest.ConditionId);
user.AddTrigger(Trigger.CampaignClear, 1, completedQuest.ConditionId[0].ConditionId);
user.AddTrigger(Trigger.MainQuestClear, 1, completedQuest.Id);
JsonDb.Save();