diff --git a/Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.cs b/Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.cs index e6d6327e3..de50067fa 100644 --- a/Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.cs +++ b/Maple2.Server.Game/Manager/Field/FieldManager/FieldManager.cs @@ -427,9 +427,7 @@ public bool UsePortal(GameSession session, int portalId, string password) { session.Player.MoveToPosition(destinationCube.Position, default); return true; case CubePortalDestination.SelectedMap: - session.Send(session.PrepareField(srcPortal.TargetMapId, portalId: srcPortal.TargetPortalId) - ? FieldEnterPacket.Request(session.Player) - : FieldEnterPacket.Error(MigrationError.s_move_err_default)); + session.MigrateOutOfInstance(srcPortal.TargetMapId); return true; case CubePortalDestination.FriendHome: { using GameStorage.Request db = session.GameStorage.Context(); diff --git a/Maple2.Server.Game/Manager/Field/FieldManager/HomeFieldManager.cs b/Maple2.Server.Game/Manager/Field/FieldManager/HomeFieldManager.cs index 61651a85d..6a12891f8 100644 --- a/Maple2.Server.Game/Manager/Field/FieldManager/HomeFieldManager.cs +++ b/Maple2.Server.Game/Manager/Field/FieldManager/HomeFieldManager.cs @@ -24,7 +24,6 @@ public override void Init() { } } - public void SetHomeSurvey(HomeSurvey survey) { HomeSurvey = survey; } diff --git a/Maple2.Server.World/Containers/ChannelClientLookup.cs b/Maple2.Server.World/Containers/ChannelClientLookup.cs index 2a2c3daad..8e0f73e92 100644 --- a/Maple2.Server.World/Containers/ChannelClientLookup.cs +++ b/Maple2.Server.World/Containers/ChannelClientLookup.cs @@ -179,7 +179,9 @@ private async Task MonitorChannel(Channel channel, CancellationTokenSource cance if (channel.Status is ChannelStatus.Active) { logger.Information("Channel {Channel} has become inactive due to {Status}", channel.Id, response.Status); channel.Status = ChannelStatus.Inactive; +#if !DEBUG await cancellationTokenSource.CancelAsync(); +#endif } break; } @@ -189,7 +191,9 @@ private async Task MonitorChannel(Channel channel, CancellationTokenSource cance } if (channel.Status is ChannelStatus.Active) { logger.Information("Channel {Channel} has become inactive", channel.Id); +#if !DEBUG await cancellationTokenSource.CancelAsync(); +#endif } channel.Status = ChannelStatus.Inactive; } diff --git a/Maple2.Server.World/Migrations/20250304061437_InteractCubeFix.cs b/Maple2.Server.World/Migrations/20250304061437_InteractCubeFix.cs index b7fcc5c4f..7cfa98f82 100644 --- a/Maple2.Server.World/Migrations/20250304061437_InteractCubeFix.cs +++ b/Maple2.Server.World/Migrations/20250304061437_InteractCubeFix.cs @@ -2,21 +2,17 @@ #nullable disable -namespace Maple2.Server.World.Migrations -{ +namespace Maple2.Server.World.Migrations { /// - public partial class InteractCubeFix : Migration - { + public partial class InteractCubeFix : Migration { /// - protected override void Up(MigrationBuilder migrationBuilder) - { + protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.Sql("DELETE FROM `game-server`.`ugcmap-cube` WHERE `Interact` IS NOT NULL AND `Interact` <> '';"); migrationBuilder.Sql("DELETE FROM `game-server`.`home-layout-cube` WHERE `Interact` IS NOT NULL AND `Interact` <> '';"); } /// - protected override void Down(MigrationBuilder migrationBuilder) - { + protected override void Down(MigrationBuilder migrationBuilder) { } } diff --git a/Maple2.Server.World/Migrations/20250306005429_DungeonInfo.cs b/Maple2.Server.World/Migrations/20250306005429_DungeonInfo.cs index 4ac0b6868..513fa4502 100644 --- a/Maple2.Server.World/Migrations/20250306005429_DungeonInfo.cs +++ b/Maple2.Server.World/Migrations/20250306005429_DungeonInfo.cs @@ -3,14 +3,11 @@ #nullable disable -namespace Maple2.Server.World.Migrations -{ +namespace Maple2.Server.World.Migrations { /// - public partial class DungeonInfo : Migration - { + public partial class DungeonInfo : Migration { /// - protected override void Up(MigrationBuilder migrationBuilder) - { + protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "DungeonRankRewards", table: "character-unlock", @@ -20,8 +17,7 @@ protected override void Up(MigrationBuilder migrationBuilder) migrationBuilder.CreateTable( name: "dungeon-record", - columns: table => new - { + columns: table => new { DungeonId = table.Column(type: "int", nullable: false), OwnerId = table.Column(type: "bigint", nullable: false), ClearTime = table.Column(type: "datetime(6)", nullable: false), @@ -35,8 +31,7 @@ protected override void Up(MigrationBuilder migrationBuilder) DailyResetTime = table.Column(type: "datetime(6)", nullable: false), WeeklyResetTime = table.Column(type: "datetime(6)", nullable: false) }, - constraints: table => - { + constraints: table => { table.PrimaryKey("PK_dungeon-record", x => new { x.OwnerId, x.DungeonId }); table.ForeignKey( name: "FK_dungeon-record_character_OwnerId", @@ -49,8 +44,7 @@ protected override void Up(MigrationBuilder migrationBuilder) } /// - protected override void Down(MigrationBuilder migrationBuilder) - { + protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "dungeon-record");