feat(CS): run the siege on ONE designated server (CastleSiegeServerId)
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:
Acentech Dev
2026-07-15 19:10:48 +03:00
parent 3e465c016e
commit fbe75d55be
4 changed files with 53 additions and 0 deletions

View File

@@ -87,6 +87,13 @@ public class CastleSiegeConfiguration
/// </summary>
public int RegistrationFee { get; set; } = 100000;
/// <summary>
/// Gets or sets the game server (SW) id on which the Castle Siege runs. With multiple game servers each
/// has its own map instances, so the siege must happen on ONE designated server; the others skip it (they
/// only honor the shared castle owner for the rewards). Players must be on this server to take part.
/// </summary>
public byte CastleSiegeServerId { get; set; }
// --- Runtime fields (hidden from the AdminPanel; proxied by the friendly properties above) ---
/// <summary>Gets or sets the days of week registration auto-opens (UTC). Empty = every day.</summary>