From f03f6aa7adfdc261471c6520a4c5d78d6d066257 Mon Sep 17 00:00:00 2001 From: Acentech Dev Date: Wed, 15 Jul 2026 11:55:54 +0300 Subject: [PATCH] fix(CS-P4): Guard portal uses Land of Trials entry ExitGate (no spawn gate exists) Land of Trials (31) has no IsSpawnGate, so SafeZoneSpawnGate was null -> portal said 'not available'. Fall back to the map's single entry ExitGate (60-69,10-19, the real map entrance) so owner-guild members actually warp in. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../CastleSiege/CastleSiegeHuntingPortalTalkPlugIn.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/GameLogic/CastleSiege/CastleSiegeHuntingPortalTalkPlugIn.cs b/src/GameLogic/CastleSiege/CastleSiegeHuntingPortalTalkPlugIn.cs index f736f80..f5c506d 100644 --- a/src/GameLogic/CastleSiege/CastleSiegeHuntingPortalTalkPlugIn.cs +++ b/src/GameLogic/CastleSiege/CastleSiegeHuntingPortalTalkPlugIn.cs @@ -4,6 +4,7 @@ namespace MUnique.OpenMU.GameLogic.CastleSiege; +using System.Linq; using System.Runtime.InteropServices; using MUnique.OpenMU.GameLogic.NPC; using MUnique.OpenMU.GameLogic.PlugIns; @@ -45,7 +46,11 @@ public class CastleSiegeHuntingPortalTalkPlugIn : IPlayerTalkToNpcPlugIn } var map = await player.GameContext.GetMapAsync((ushort)CastleSiegeMapAccess.CastleHuntingMapNumber).ConfigureAwait(false); - if (map?.SafeZoneSpawnGate is not { } gate) + + // Land of Trials has no spawn gate defined; fall back to its single entry ExitGate (the designated + // map entrance at ~60-69,10-19) so the player lands on walkable ground. + var gate = map?.SafeZoneSpawnGate ?? map?.Definition.ExitGates?.FirstOrDefault(); + if (gate is null) { await ShowAsync(player, "The castle hunting ground is not available right now.").ConfigureAwait(false); return;