feat(CS): run the siege on ONE designated server (CastleSiegeServerId)
Some checks failed
.NET Core / build (push) Has been cancelled
Some checks failed
.NET Core / build (push) Has been cancelled
With multiple game servers each has its own map instances, so the siege ran independently on all of them - a guild could win uncontested on an empty server's Valley of Loren. Now the siege (tick/spawn/battle/registration) runs only on the server whose Id == config.CastleSiegeServerId (AdminPanel-editable). Other servers skip the siege and just mirror the shared castle owner from config so the hunting-map gate + castle flag rewards still work everywhere. The Guardsman on non-siege servers tells players which server to switch to.
This commit is contained in:
@@ -43,6 +43,12 @@ public class CastleSiegeGuardsmanTalkPlugIn : IPlayerTalkToNpcPlugIn
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CastleSiegeEventPlugIn.IsCastleSiegeServer(player.GameContext))
|
||||
{
|
||||
await ShowAsync(player, $"The Castle Siege runs on server {context.Configuration.CastleSiegeServerId}. Switch to that server to register and fight.").ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
if (context.Phase != CastleSiegePhase.Registration)
|
||||
{
|
||||
await ShowAsync(player, "Castle Siege registration is not open right now.").ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user