fix(CS-P4): Guard portal uses Land of Trials entry ExitGate (no spawn gate exists)
Some checks failed
.NET Core / build (push) Has been cancelled
Some checks failed
.NET Core / build (push) Has been cancelled
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user