feat(CS-P4): castle-exclusive hunting map (Land of Trials 31) gated to owner guild
Some checks failed
.NET Core / build (push) Has been cancelled
Some checks failed
.NET Core / build (push) Has been cancelled
Ownership reward: only members of the current castle-owning guild may warp into Land of Trials (map 31); sealed while unowned; GMs bypass. Enforced in both WarpAction and WarpGateAction (// ADAMU-CUSTOM). Tax system deferred per user. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,15 @@ public class WarpAction
|
||||
/// <param name="warpInfo">The warp information.</param>
|
||||
public async ValueTask WarpToAsync(Player player, WarpInfo warpInfo)
|
||||
{
|
||||
// ADAMU-CUSTOM: Castle Siege hunting-map access (Land of Trials, owner guild only).
|
||||
var (allowed, csError) = await CastleSiege.CastleSiegeMapAccess
|
||||
.CanEnterMapAsync(player, warpInfo.Gate?.Map?.Number ?? 0).ConfigureAwait(false);
|
||||
if (!allowed)
|
||||
{
|
||||
await player.ShowBlueMessageAsync(csError!).ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.CheckRequirements(player, warpInfo, out var errorMessage))
|
||||
{
|
||||
await player.WarpToAsync(warpInfo.Gate!).ConfigureAwait(false);
|
||||
|
||||
@@ -55,6 +55,15 @@ public class WarpGateAction
|
||||
return false;
|
||||
}
|
||||
|
||||
// ADAMU-CUSTOM: Castle Siege hunting-map access (Land of Trials, owner guild only).
|
||||
var (csAllowed, csError) = await CastleSiege.CastleSiegeMapAccess
|
||||
.CanEnterMapAsync(player, enterGate.TargetGate.Map.Number).ConfigureAwait(false);
|
||||
if (!csAllowed)
|
||||
{
|
||||
await player.ShowBlueMessageAsync(csError!).ConfigureAwait(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
var currentPosition = player.IsWalking ? player.WalkTarget : player.Position;
|
||||
var inaccuracy = player.GameContext.Configuration.InfoRange;
|
||||
if (player.CurrentMap!.Definition.EnterGates.Contains(enterGate)
|
||||
|
||||
Reference in New Issue
Block a user