From 6d9a72ded4905788e59e36ecb5e88b7a1f78356f Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Mon, 29 Jan 2024 08:39:18 +0100 Subject: [PATCH] chore: dependency upgrade & missing refactor from Server to AuthServer --- Benchmarks/Benchmarks.csproj | 5 +- Continuity.AuthServer/AuthSession.cs | 4 +- Continuity.AuthServer/ChannelSession.cs | 2 +- .../Consumers/PacketConsumer.cs | 6 +-- .../Continuity.AuthServer.csproj | 46 +++++++++---------- Continuity.AuthServer/DB/Documents/Account.cs | 2 +- .../DB/Documents/Character.cs | 2 +- Continuity.AuthServer/DB/Documents/Guild.cs | 2 +- .../DB/Documents/GuildMember.cs | 2 +- .../DB/Documents/GuildRank.cs | 2 +- .../DB/Documents/InventoryItem.cs | 2 +- .../DB/Documents/InventoryTab.cs | 2 +- .../20230814114414_Initial.Designer.cs | 1 + ...30817230423_CharacterDataDraft.Designer.cs | 1 + ...143729_AddInventoryToCharacter.Designer.cs | 1 + ...192405_AdditionalCharacterData.Designer.cs | 1 + .../20231114203409_AddGuildData.Designer.cs | 1 + ...31115174714_GuildIsNotRequired.Designer.cs | 1 + ...183824_SwitchToDataAnnotations.Designer.cs | 1 + ...DBPoolingAndLazyLoadingSupport.Designer.cs | 1 + ...162002_FixInventoryItemAsDbset.Designer.cs | 1 + ...singCascadeDeletionOnCharacter.Designer.cs | 1 + ...xingAndVariousOtherAnnotations.Designer.cs | 1 + ...1030_VariousDeletionBehaviours.Designer.cs | 1 + ...5112400_FixEntityRelationships.Designer.cs | 1 + .../WonderkingContextModelSnapshot.cs | 1 + Continuity.AuthServer/DB/WonderkingContext.cs | 4 +- Continuity.AuthServer/Dockerfile | 4 +- .../LoginHandlerLoggerMessages.cs | 4 +- .../LoggerMessages/PacketLoggerMessages.cs | 2 +- .../ChannelSelectionHandler.Projections.cs | 4 +- .../PacketHandlers/ChannelSelectionHandler.cs | 6 +-- .../CharacterCreationHandler.cs | 8 ++-- .../CharacterDeletionHandler.cs | 4 +- .../CharacterMappingItemEntry.cs | 2 +- .../CharacterNameCheckHandler.cs | 4 +- .../PacketHandlers/IPacketHandler.cs | 2 +- .../PacketHandlers/LoginHandler.cs | 11 ++--- Continuity.AuthServer/Packets/RawPacket.cs | 2 +- Continuity.AuthServer/Program.cs | 4 +- .../Services/ItemObjectPoolService.cs | 4 +- .../Services/PacketDistributorService.cs | 8 ++-- .../Services/WonderkingAuthServer.cs | 2 +- Wonderking/Wonderking.csproj | 6 +-- global.json | 2 +- 45 files changed, 94 insertions(+), 80 deletions(-) diff --git a/Benchmarks/Benchmarks.csproj b/Benchmarks/Benchmarks.csproj index 5033ef4..de6663c 100644 --- a/Benchmarks/Benchmarks.csproj +++ b/Benchmarks/Benchmarks.csproj @@ -13,10 +13,11 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + + - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/Continuity.AuthServer/AuthSession.cs b/Continuity.AuthServer/AuthSession.cs index b85a459..d52da17 100644 --- a/Continuity.AuthServer/AuthSession.cs +++ b/Continuity.AuthServer/AuthSession.cs @@ -2,13 +2,13 @@ using System.Net.Sockets; using System.Reflection; +using Continuity.AuthServer.Packets; using MassTransit.Mediator; using Microsoft.Extensions.Logging; using NetCoreServer; -using Server.Packets; using Wonderking.Packets; -namespace Server; +namespace Continuity.AuthServer; public class AuthSession : TcpSession { diff --git a/Continuity.AuthServer/ChannelSession.cs b/Continuity.AuthServer/ChannelSession.cs index 49ecbb1..a8cfac9 100644 --- a/Continuity.AuthServer/ChannelSession.cs +++ b/Continuity.AuthServer/ChannelSession.cs @@ -6,7 +6,7 @@ using MassTransit.Mediator; using Microsoft.Extensions.Logging; using NetCoreServer; -namespace Server; +namespace Continuity.AuthServer; public class ChannelSession : TcpSession { diff --git a/Continuity.AuthServer/Consumers/PacketConsumer.cs b/Continuity.AuthServer/Consumers/PacketConsumer.cs index d733f57..4e42d9f 100644 --- a/Continuity.AuthServer/Consumers/PacketConsumer.cs +++ b/Continuity.AuthServer/Consumers/PacketConsumer.cs @@ -1,10 +1,10 @@ // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. +using Continuity.AuthServer.Packets; +using Continuity.AuthServer.Services; using MassTransit; -using Server.Packets; -using Server.Services; -namespace Server.Consumers; +namespace Continuity.AuthServer.Consumers; public class PacketConsumer : IConsumer { diff --git a/Continuity.AuthServer/Continuity.AuthServer.csproj b/Continuity.AuthServer/Continuity.AuthServer.csproj index 5dbd6a9..d8e72ff 100644 --- a/Continuity.AuthServer/Continuity.AuthServer.csproj +++ b/Continuity.AuthServer/Continuity.AuthServer.csproj @@ -40,20 +40,20 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + - - + + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -61,11 +61,11 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -80,23 +80,23 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + - + - + diff --git a/Continuity.AuthServer/DB/Documents/Account.cs b/Continuity.AuthServer/DB/Documents/Account.cs index 5bffbae..f3b5187 100644 --- a/Continuity.AuthServer/DB/Documents/Account.cs +++ b/Continuity.AuthServer/DB/Documents/Account.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; -namespace Server.DB.Documents; +namespace Continuity.AuthServer.DB.Documents; [Index(nameof(Username), IsUnique = true)] [Index(nameof(Id), IsUnique = true)] diff --git a/Continuity.AuthServer/DB/Documents/Character.cs b/Continuity.AuthServer/DB/Documents/Character.cs index db7d8e0..5d0c80d 100644 --- a/Continuity.AuthServer/DB/Documents/Character.cs +++ b/Continuity.AuthServer/DB/Documents/Character.cs @@ -6,7 +6,7 @@ using Microsoft.EntityFrameworkCore; using Wonderking.Game.Data.Character; using Wonderking.Packets.Outgoing.Data; -namespace Server.DB.Documents; +namespace Continuity.AuthServer.DB.Documents; [Index(nameof(Name), IsUnique = true)] [Index(nameof(Id), IsUnique = true)] diff --git a/Continuity.AuthServer/DB/Documents/Guild.cs b/Continuity.AuthServer/DB/Documents/Guild.cs index 2ca1fbf..8f01574 100644 --- a/Continuity.AuthServer/DB/Documents/Guild.cs +++ b/Continuity.AuthServer/DB/Documents/Guild.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; -namespace Server.DB.Documents; +namespace Continuity.AuthServer.DB.Documents; [Index(nameof(Name), IsUnique = true)] [Index(nameof(Id), IsUnique = true)] diff --git a/Continuity.AuthServer/DB/Documents/GuildMember.cs b/Continuity.AuthServer/DB/Documents/GuildMember.cs index c51d96b..01e55c4 100644 --- a/Continuity.AuthServer/DB/Documents/GuildMember.cs +++ b/Continuity.AuthServer/DB/Documents/GuildMember.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; -namespace Server.DB.Documents; +namespace Continuity.AuthServer.DB.Documents; [Index(nameof(Id), IsUnique = true)] public class GuildMember diff --git a/Continuity.AuthServer/DB/Documents/GuildRank.cs b/Continuity.AuthServer/DB/Documents/GuildRank.cs index b7bc935..156b7f6 100644 --- a/Continuity.AuthServer/DB/Documents/GuildRank.cs +++ b/Continuity.AuthServer/DB/Documents/GuildRank.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. -namespace Server.DB.Documents; +namespace Continuity.AuthServer.DB.Documents; public enum GuildRank : byte { diff --git a/Continuity.AuthServer/DB/Documents/InventoryItem.cs b/Continuity.AuthServer/DB/Documents/InventoryItem.cs index f4df3ee..ec6d870 100644 --- a/Continuity.AuthServer/DB/Documents/InventoryItem.cs +++ b/Continuity.AuthServer/DB/Documents/InventoryItem.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Microsoft.EntityFrameworkCore; -namespace Server.DB.Documents; +namespace Continuity.AuthServer.DB.Documents; public class InventoryItem { diff --git a/Continuity.AuthServer/DB/Documents/InventoryTab.cs b/Continuity.AuthServer/DB/Documents/InventoryTab.cs index a157f6d..cf28d51 100644 --- a/Continuity.AuthServer/DB/Documents/InventoryTab.cs +++ b/Continuity.AuthServer/DB/Documents/InventoryTab.cs @@ -1,6 +1,6 @@ // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. -namespace Server.DB.Documents; +namespace Continuity.AuthServer.DB.Documents; public enum InventoryTab : byte { diff --git a/Continuity.AuthServer/DB/Migrations/20230814114414_Initial.Designer.cs b/Continuity.AuthServer/DB/Migrations/20230814114414_Initial.Designer.cs index cc6b32f..a51fca3 100644 --- a/Continuity.AuthServer/DB/Migrations/20230814114414_Initial.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20230814114414_Initial.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/20230817230423_CharacterDataDraft.Designer.cs b/Continuity.AuthServer/DB/Migrations/20230817230423_CharacterDataDraft.Designer.cs index 73e95aa..983125a 100644 --- a/Continuity.AuthServer/DB/Migrations/20230817230423_CharacterDataDraft.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20230817230423_CharacterDataDraft.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/20231108143729_AddInventoryToCharacter.Designer.cs b/Continuity.AuthServer/DB/Migrations/20231108143729_AddInventoryToCharacter.Designer.cs index bc18ac5..846f027 100644 --- a/Continuity.AuthServer/DB/Migrations/20231108143729_AddInventoryToCharacter.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20231108143729_AddInventoryToCharacter.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/20231113192405_AdditionalCharacterData.Designer.cs b/Continuity.AuthServer/DB/Migrations/20231113192405_AdditionalCharacterData.Designer.cs index 83feb7d..4ee5267 100644 --- a/Continuity.AuthServer/DB/Migrations/20231113192405_AdditionalCharacterData.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20231113192405_AdditionalCharacterData.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/20231114203409_AddGuildData.Designer.cs b/Continuity.AuthServer/DB/Migrations/20231114203409_AddGuildData.Designer.cs index 99c3160..8b8e394 100644 --- a/Continuity.AuthServer/DB/Migrations/20231114203409_AddGuildData.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20231114203409_AddGuildData.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/20231115174714_GuildIsNotRequired.Designer.cs b/Continuity.AuthServer/DB/Migrations/20231115174714_GuildIsNotRequired.Designer.cs index 22f2442..0589bc3 100644 --- a/Continuity.AuthServer/DB/Migrations/20231115174714_GuildIsNotRequired.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20231115174714_GuildIsNotRequired.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/20231115183824_SwitchToDataAnnotations.Designer.cs b/Continuity.AuthServer/DB/Migrations/20231115183824_SwitchToDataAnnotations.Designer.cs index c3cbcd6..5926c5c 100644 --- a/Continuity.AuthServer/DB/Migrations/20231115183824_SwitchToDataAnnotations.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20231115183824_SwitchToDataAnnotations.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/20231116110504_DBPoolingAndLazyLoadingSupport.Designer.cs b/Continuity.AuthServer/DB/Migrations/20231116110504_DBPoolingAndLazyLoadingSupport.Designer.cs index 0b9ebc6..6fb65b7 100644 --- a/Continuity.AuthServer/DB/Migrations/20231116110504_DBPoolingAndLazyLoadingSupport.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20231116110504_DBPoolingAndLazyLoadingSupport.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/20231120162002_FixInventoryItemAsDbset.Designer.cs b/Continuity.AuthServer/DB/Migrations/20231120162002_FixInventoryItemAsDbset.Designer.cs index f519bfa..0e4433d 100644 --- a/Continuity.AuthServer/DB/Migrations/20231120162002_FixInventoryItemAsDbset.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20231120162002_FixInventoryItemAsDbset.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/20231121205726_MissingCascadeDeletionOnCharacter.Designer.cs b/Continuity.AuthServer/DB/Migrations/20231121205726_MissingCascadeDeletionOnCharacter.Designer.cs index ca84bf5..0381609 100644 --- a/Continuity.AuthServer/DB/Migrations/20231121205726_MissingCascadeDeletionOnCharacter.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20231121205726_MissingCascadeDeletionOnCharacter.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/20231122064508_IndexingAndVariousOtherAnnotations.Designer.cs b/Continuity.AuthServer/DB/Migrations/20231122064508_IndexingAndVariousOtherAnnotations.Designer.cs index dfb0d5c..2ec2421 100644 --- a/Continuity.AuthServer/DB/Migrations/20231122064508_IndexingAndVariousOtherAnnotations.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20231122064508_IndexingAndVariousOtherAnnotations.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/20231122091030_VariousDeletionBehaviours.Designer.cs b/Continuity.AuthServer/DB/Migrations/20231122091030_VariousDeletionBehaviours.Designer.cs index 97c8385..265eeab 100644 --- a/Continuity.AuthServer/DB/Migrations/20231122091030_VariousDeletionBehaviours.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20231122091030_VariousDeletionBehaviours.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/20231125112400_FixEntityRelationships.Designer.cs b/Continuity.AuthServer/DB/Migrations/20231125112400_FixEntityRelationships.Designer.cs index 45241c0..6b9e72b 100644 --- a/Continuity.AuthServer/DB/Migrations/20231125112400_FixEntityRelationships.Designer.cs +++ b/Continuity.AuthServer/DB/Migrations/20231125112400_FixEntityRelationships.Designer.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; diff --git a/Continuity.AuthServer/DB/Migrations/WonderkingContextModelSnapshot.cs b/Continuity.AuthServer/DB/Migrations/WonderkingContextModelSnapshot.cs index 8fb7a97..d02d74f 100644 --- a/Continuity.AuthServer/DB/Migrations/WonderkingContextModelSnapshot.cs +++ b/Continuity.AuthServer/DB/Migrations/WonderkingContextModelSnapshot.cs @@ -1,5 +1,6 @@ // using System; +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; diff --git a/Continuity.AuthServer/DB/WonderkingContext.cs b/Continuity.AuthServer/DB/WonderkingContext.cs index 82c18ad..e0b17b4 100644 --- a/Continuity.AuthServer/DB/WonderkingContext.cs +++ b/Continuity.AuthServer/DB/WonderkingContext.cs @@ -1,10 +1,10 @@ // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. +using Continuity.AuthServer.DB.Documents; using JetBrains.Annotations; using Microsoft.EntityFrameworkCore; -using Server.DB.Documents; -namespace Server.DB; +namespace Continuity.AuthServer.DB; public class WonderkingContext : DbContext { diff --git a/Continuity.AuthServer/Dockerfile b/Continuity.AuthServer/Dockerfile index fab2cc1..557f0df 100644 --- a/Continuity.AuthServer/Dockerfile +++ b/Continuity.AuthServer/Dockerfile @@ -9,9 +9,9 @@ ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 RUN echo "Target: $TARGETARCH" && echo "Build: $BUILDPLATFORM" WORKDIR /src -COPY ["Wonderking/Wonderking.csproj", "Wonderking/"] COPY ["Continuity.AuthServer/Continuity.AuthServer.csproj", "Continuity.AuthServer/"] -RUN dotnet restore "Wonderking/Wonderking.csproj" -a $TARGETARCH && dotnet restore "Server/Server.csproj" -a $TARGETARCH +COPY ["Wonderking/Wonderking.csproj", "Wonderking/"] +RUN dotnet restore "Wonderking/Wonderking.csproj" -a $TARGETARCH && dotnet restore "Continuity.AuthServer/Continuity.AuthServer.csproj" -a $TARGETARCH COPY . . FROM build AS publish diff --git a/Continuity.AuthServer/LoggerMessages/LoginHandlerLoggerMessages.cs b/Continuity.AuthServer/LoggerMessages/LoginHandlerLoggerMessages.cs index 4ab8514..9e965c9 100644 --- a/Continuity.AuthServer/LoggerMessages/LoginHandlerLoggerMessages.cs +++ b/Continuity.AuthServer/LoggerMessages/LoginHandlerLoggerMessages.cs @@ -1,9 +1,9 @@ // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. +using Continuity.AuthServer.PacketHandlers; using Microsoft.Extensions.Logging; -using Server.PacketHandlers; -namespace Server.LoggerMessages; +namespace Continuity.AuthServer.LoggerMessages; internal static partial class LoginHandlerLoggerMessages { diff --git a/Continuity.AuthServer/LoggerMessages/PacketLoggerMessages.cs b/Continuity.AuthServer/LoggerMessages/PacketLoggerMessages.cs index 8c31fd1..1332f01 100644 --- a/Continuity.AuthServer/LoggerMessages/PacketLoggerMessages.cs +++ b/Continuity.AuthServer/LoggerMessages/PacketLoggerMessages.cs @@ -4,7 +4,7 @@ using JetBrains.Annotations; using Microsoft.Extensions.Logging; using Wonderking.Packets; -namespace Server.LoggerMessages; +namespace Continuity.AuthServer.LoggerMessages; internal static partial class PacketLoggerMessages { diff --git a/Continuity.AuthServer/PacketHandlers/ChannelSelectionHandler.Projections.cs b/Continuity.AuthServer/PacketHandlers/ChannelSelectionHandler.Projections.cs index 462cf12..b690082 100644 --- a/Continuity.AuthServer/PacketHandlers/ChannelSelectionHandler.Projections.cs +++ b/Continuity.AuthServer/PacketHandlers/ChannelSelectionHandler.Projections.cs @@ -1,10 +1,10 @@ // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. -using Server.DB.Documents; +using Continuity.AuthServer.DB.Documents; using Wonderking.Game.Data.Character; using Wonderking.Packets.Outgoing.Data; -namespace Server.PacketHandlers; +namespace Continuity.AuthServer.PacketHandlers; public partial class ChannelSelectionHandler { diff --git a/Continuity.AuthServer/PacketHandlers/ChannelSelectionHandler.cs b/Continuity.AuthServer/PacketHandlers/ChannelSelectionHandler.cs index 10b4d3a..c177f72 100644 --- a/Continuity.AuthServer/PacketHandlers/ChannelSelectionHandler.cs +++ b/Continuity.AuthServer/PacketHandlers/ChannelSelectionHandler.cs @@ -1,15 +1,15 @@ // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. +using Continuity.AuthServer.DB; +using Continuity.AuthServer.DB.Documents; using DotNext.Collections.Generic; using Microsoft.EntityFrameworkCore; using NetCoreServer; -using Server.DB; -using Server.DB.Documents; using Wonderking.Packets.Incoming; using Wonderking.Packets.Outgoing; using Wonderking.Packets.Outgoing.Data; -namespace Server.PacketHandlers; +namespace Continuity.AuthServer.PacketHandlers; public partial class ChannelSelectionHandler : IPacketHandler { diff --git a/Continuity.AuthServer/PacketHandlers/CharacterCreationHandler.cs b/Continuity.AuthServer/PacketHandlers/CharacterCreationHandler.cs index 76c23bc..2522a67 100644 --- a/Continuity.AuthServer/PacketHandlers/CharacterCreationHandler.cs +++ b/Continuity.AuthServer/PacketHandlers/CharacterCreationHandler.cs @@ -1,17 +1,17 @@ // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. +using Continuity.AuthServer.DB; +using Continuity.AuthServer.DB.Documents; +using Continuity.AuthServer.Services; using Microsoft.EntityFrameworkCore; using NetCoreServer; -using Server.DB; -using Server.DB.Documents; -using Server.Services; using Wonderking.Game.Data.Character; using Wonderking.Game.Mapping; using Wonderking.Packets.Incoming; using Wonderking.Packets.Outgoing; using Wonderking.Packets.Outgoing.Data; -namespace Server.PacketHandlers; +namespace Continuity.AuthServer.PacketHandlers; public class CharacterCreationHandler : IPacketHandler { diff --git a/Continuity.AuthServer/PacketHandlers/CharacterDeletionHandler.cs b/Continuity.AuthServer/PacketHandlers/CharacterDeletionHandler.cs index ea130c6..cff7c4b 100644 --- a/Continuity.AuthServer/PacketHandlers/CharacterDeletionHandler.cs +++ b/Continuity.AuthServer/PacketHandlers/CharacterDeletionHandler.cs @@ -1,12 +1,12 @@ // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using NetCoreServer; -using Server.DB; using Wonderking.Packets.Incoming; using Wonderking.Packets.Outgoing; -namespace Server.PacketHandlers; +namespace Continuity.AuthServer.PacketHandlers; public class CharacterDeletionHandler : IPacketHandler { diff --git a/Continuity.AuthServer/PacketHandlers/CharacterMappingItemEntry.cs b/Continuity.AuthServer/PacketHandlers/CharacterMappingItemEntry.cs index 3f3fd4b..3628168 100644 --- a/Continuity.AuthServer/PacketHandlers/CharacterMappingItemEntry.cs +++ b/Continuity.AuthServer/PacketHandlers/CharacterMappingItemEntry.cs @@ -2,7 +2,7 @@ using System.Runtime.InteropServices; -namespace Server.PacketHandlers; +namespace Continuity.AuthServer.PacketHandlers; [StructLayout(LayoutKind.Auto)] public struct CharacterMappingItemEntry diff --git a/Continuity.AuthServer/PacketHandlers/CharacterNameCheckHandler.cs b/Continuity.AuthServer/PacketHandlers/CharacterNameCheckHandler.cs index 0f8cd66..ddd6c37 100644 --- a/Continuity.AuthServer/PacketHandlers/CharacterNameCheckHandler.cs +++ b/Continuity.AuthServer/PacketHandlers/CharacterNameCheckHandler.cs @@ -1,12 +1,12 @@ // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. +using Continuity.AuthServer.DB; using Microsoft.EntityFrameworkCore; using NetCoreServer; -using Server.DB; using Wonderking.Packets.Incoming; using Wonderking.Packets.Outgoing; -namespace Server.PacketHandlers; +namespace Continuity.AuthServer.PacketHandlers; public class CharacterNameCheckHandler : IPacketHandler { diff --git a/Continuity.AuthServer/PacketHandlers/IPacketHandler.cs b/Continuity.AuthServer/PacketHandlers/IPacketHandler.cs index 60b7b8c..4737145 100644 --- a/Continuity.AuthServer/PacketHandlers/IPacketHandler.cs +++ b/Continuity.AuthServer/PacketHandlers/IPacketHandler.cs @@ -5,7 +5,7 @@ using JetBrains.Annotations; using NetCoreServer; using Wonderking.Packets; -namespace Server.PacketHandlers; +namespace Continuity.AuthServer.PacketHandlers; [UsedImplicitly(ImplicitUseTargetFlags.WithInheritors)] public interface IPacketHandler : IPacketHandler where T : IPacket diff --git a/Continuity.AuthServer/PacketHandlers/LoginHandler.cs b/Continuity.AuthServer/PacketHandlers/LoginHandler.cs index 947036a..c63fd30 100644 --- a/Continuity.AuthServer/PacketHandlers/LoginHandler.cs +++ b/Continuity.AuthServer/PacketHandlers/LoginHandler.cs @@ -3,20 +3,19 @@ using System.Diagnostics; using System.Security.Cryptography; using System.Text; -using DotNext; +using Continuity.AuthServer.DB; +using Continuity.AuthServer.DB.Documents; +using Continuity.AuthServer.LoggerMessages; using Konscious.Security.Cryptography; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using NetCoreServer; -using Server.DB; -using Server.DB.Documents; -using Server.LoggerMessages; using Wonderking.Packets.Incoming; using Wonderking.Packets.Outgoing; using Wonderking.Packets.Outgoing.Data; -namespace Server.PacketHandlers; +namespace Continuity.AuthServer.PacketHandlers; public class LoginHandler : IPacketHandler { @@ -55,7 +54,7 @@ public class LoginHandler : IPacketHandler { var salt = account.Salt; var tempPasswordBytes = await GetPasswordHashAsync(packet.Password, salt, account.Id); - loginResponseReason = tempPasswordBytes.BitwiseEquals(account.Password) + loginResponseReason = tempPasswordBytes.SequenceEqual(account.Password) ? LoginResponseReason.Ok : LoginResponseReason.WrongPassword; } diff --git a/Continuity.AuthServer/Packets/RawPacket.cs b/Continuity.AuthServer/Packets/RawPacket.cs index cb04ac6..2b860e9 100644 --- a/Continuity.AuthServer/Packets/RawPacket.cs +++ b/Continuity.AuthServer/Packets/RawPacket.cs @@ -3,7 +3,7 @@ using MassTransit; using Wonderking.Packets; -namespace Server.Packets; +namespace Continuity.AuthServer.Packets; [MessageUrn("packets")] public class RawPacket diff --git a/Continuity.AuthServer/Program.cs b/Continuity.AuthServer/Program.cs index 05026e6..3d335c3 100644 --- a/Continuity.AuthServer/Program.cs +++ b/Continuity.AuthServer/Program.cs @@ -3,6 +3,8 @@ using System.Net; using System.Reflection; using System.Text.Json; +using Continuity.AuthServer.DB; +using Continuity.AuthServer.Services; using MassTransit; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; @@ -15,8 +17,6 @@ using OpenTelemetry.Logs; using OpenTelemetry.Metrics; using OpenTelemetry.Resources; using OpenTelemetry.Trace; -using Server.DB; -using Server.Services; using Wonderking.Game.Mapping; var builder = Host.CreateApplicationBuilder(); diff --git a/Continuity.AuthServer/Services/ItemObjectPoolService.cs b/Continuity.AuthServer/Services/ItemObjectPoolService.cs index 7708eb3..fadf175 100644 --- a/Continuity.AuthServer/Services/ItemObjectPoolService.cs +++ b/Continuity.AuthServer/Services/ItemObjectPoolService.cs @@ -1,14 +1,14 @@ // Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License. using System.Collections.Concurrent; +using Continuity.AuthServer.DB.Documents; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -using Server.DB.Documents; using Wonderking.Game.Data; using Wonderking.Game.Reader; -namespace Server.Services; +namespace Continuity.AuthServer.Services; public class ItemObjectPoolService : IHostedService { diff --git a/Continuity.AuthServer/Services/PacketDistributorService.cs b/Continuity.AuthServer/Services/PacketDistributorService.cs index 3e8dde6..78ce171 100644 --- a/Continuity.AuthServer/Services/PacketDistributorService.cs +++ b/Continuity.AuthServer/Services/PacketDistributorService.cs @@ -4,6 +4,9 @@ using System.Collections.Concurrent; using System.Collections.Immutable; using System.Diagnostics; using System.Reflection; +using Continuity.AuthServer.LoggerMessages; +using Continuity.AuthServer.PacketHandlers; +using Continuity.AuthServer.Packets; using DotNext.Collections.Generic; using DotNext.Linq.Expressions; using DotNext.Metaprogramming; @@ -13,12 +16,9 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using Microsoft.VisualBasic.CompilerServices; using Newtonsoft.Json; -using Server.LoggerMessages; -using Server.PacketHandlers; -using Server.Packets; using Wonderking.Packets; -namespace Server.Services; +namespace Continuity.AuthServer.Services; using static CodeGenerator; using static ExpressionBuilder; diff --git a/Continuity.AuthServer/Services/WonderkingAuthServer.cs b/Continuity.AuthServer/Services/WonderkingAuthServer.cs index f05988e..5b625f4 100644 --- a/Continuity.AuthServer/Services/WonderkingAuthServer.cs +++ b/Continuity.AuthServer/Services/WonderkingAuthServer.cs @@ -7,7 +7,7 @@ using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using NetCoreServer; -namespace Server.Services; +namespace Continuity.AuthServer.Services; public class WonderkingAuthServer : TcpServer, IHostedService { diff --git a/Wonderking/Wonderking.csproj b/Wonderking/Wonderking.csproj index a5c947d..5e898c2 100644 --- a/Wonderking/Wonderking.csproj +++ b/Wonderking/Wonderking.csproj @@ -14,7 +14,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -22,12 +22,12 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/global.json b/global.json index f7fb55b..76d4763 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "8.0.101", "rollForward": "latestMinor", "allowPrerelease": false }