diff --git a/Server/PacketHandlers/ChannelSelectionHandler.cs b/Server/PacketHandlers/ChannelSelectionHandler.cs index dbba883..12c2030 100644 --- a/Server/PacketHandlers/ChannelSelectionHandler.cs +++ b/Server/PacketHandlers/ChannelSelectionHandler.cs @@ -1,3 +1,4 @@ +using Microsoft.EntityFrameworkCore; using Wonderking.Packets.Incoming; namespace Server.PacketHandlers; @@ -28,7 +29,9 @@ public class ChannelSelectionHandler : IPacketHandler public Task HandleAsync(ChannelSelectionPacket packet, TcpSession session) { var authSession = (AuthSession)session; - var charactersOfAccount = this._wonderkingContext.Accounts.FirstOrDefault(a => a.Id == authSession.AccountId); + var charactersOfAccount = this._wonderkingContext.Accounts.Include(account => account.Characters) + .FirstOrDefault(a => a.Id == authSession.AccountId) + ?.Characters; return Task.CompletedTask; } }