fix: add default empty response packet
All checks were successful
Build, Package and Push Images / preprocess (push) Successful in 2s
Build, Package and Push Images / build (push) Successful in 33s
Build, Package and Push Images / sonarqube (push) Has been skipped
Build, Package and Push Images / sbom-scan (push) Successful in 39s
Build, Package and Push Images / container-build (push) Successful in 1m20s
Build, Package and Push Images / container-sbom-scan (push) Successful in 36s

This commit is contained in:
Timothy Schenk 2023-11-13 21:17:44 +01:00
parent a9f382963b
commit 64ba76e41a

View file

@ -33,7 +33,9 @@ public class ChannelSelectionHandler : IPacketHandler<ChannelSelectionPacket>
{
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<ChannelSelectionPacket>
}
else
{
responsePacket = CreateTestChannelSelectionResponsePacket();
responsePacket = testingChars
? CreateTestChannelSelectionResponsePacket()
: new ChannelSelectionResponsePacket
{
ChannelIsFullFlag = 0,
Endpoint = "127.0.0.1",
Port = 12345,
Characters = Array.Empty<CharacterData>()
};
}
authSession.Send(responsePacket);