Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public override void Init() {
}
}


public void SetHomeSurvey(HomeSurvey survey) {
HomeSurvey = survey;
}
Expand Down
4 changes: 4 additions & 0 deletions Maple2.Server.World/Containers/ChannelClientLookup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down
12 changes: 4 additions & 8 deletions Maple2.Server.World/Migrations/20250304061437_InteractCubeFix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@

#nullable disable

namespace Maple2.Server.World.Migrations
{
namespace Maple2.Server.World.Migrations {
/// <inheritdoc />
public partial class InteractCubeFix : Migration
{
public partial class InteractCubeFix : Migration {
/// <inheritdoc />
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` <> '';");
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
protected override void Down(MigrationBuilder migrationBuilder) {

}
}
Expand Down
18 changes: 6 additions & 12 deletions Maple2.Server.World/Migrations/20250306005429_DungeonInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@

#nullable disable

namespace Maple2.Server.World.Migrations
{
namespace Maple2.Server.World.Migrations {
/// <inheritdoc />
public partial class DungeonInfo : Migration
{
public partial class DungeonInfo : Migration {
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
protected override void Up(MigrationBuilder migrationBuilder) {
migrationBuilder.AddColumn<string>(
name: "DungeonRankRewards",
table: "character-unlock",
Expand All @@ -20,8 +17,7 @@ protected override void Up(MigrationBuilder migrationBuilder)

migrationBuilder.CreateTable(
name: "dungeon-record",
columns: table => new
{
columns: table => new {
DungeonId = table.Column<int>(type: "int", nullable: false),
OwnerId = table.Column<long>(type: "bigint", nullable: false),
ClearTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
Expand All @@ -35,8 +31,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
DailyResetTime = table.Column<DateTime>(type: "datetime(6)", nullable: false),
WeeklyResetTime = table.Column<DateTime>(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",
Expand All @@ -49,8 +44,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
}

/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
protected override void Down(MigrationBuilder migrationBuilder) {
migrationBuilder.DropTable(
name: "dungeon-record");

Expand Down