From 64ba76e41a453ccab1c414839d4bc7c40eaf88d2 Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Mon, 13 Nov 2023 21:17:44 +0100 Subject: [PATCH] fix: add default empty response packet --- Server/PacketHandlers/ChannelSelectionHandler.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Server/PacketHandlers/ChannelSelectionHandler.cs b/Server/PacketHandlers/ChannelSelectionHandler.cs index eedeb90..1818578 100644 --- a/Server/PacketHandlers/ChannelSelectionHandler.cs +++ b/Server/PacketHandlers/ChannelSelectionHandler.cs @@ -33,7 +33,9 @@ public class ChannelSelectionHandler : IPacketHandler { var authSession = (AuthSession)session; var charactersOfAccount = this._wonderkingContext.Accounts.Include(account => account.Characters) - .ThenInclude(character => character.InventoryItems) + .ThenInclude(character => character.InventoryItems).Include(account => account.Characters) + .ThenInclude(character => character.JobData).Include(account => account.Characters) + .ThenInclude(character => character.BaseStats) .FirstOrDefault(a => a.Id == authSession.AccountId) ?.Characters; ChannelSelectionResponsePacket responsePacket; @@ -71,7 +73,15 @@ public class ChannelSelectionHandler : IPacketHandler } else { - responsePacket = CreateTestChannelSelectionResponsePacket(); + responsePacket = testingChars + ? CreateTestChannelSelectionResponsePacket() + : new ChannelSelectionResponsePacket + { + ChannelIsFullFlag = 0, + Endpoint = "127.0.0.1", + Port = 12345, + Characters = Array.Empty() + }; } authSession.Send(responsePacket);