Compare commits

..
Author SHA1 Message Date
ДмитрийandClaude Sonnet 5.5 64bfe33778 A failed module build is an error, never an old package installed in its place
install_module_sources ignored BuildResult.success, so a failing build (for example a
CMake error) installed the package an earlier build had left and reported success.
Found while checking the Update button. The dev mock also shows an available update.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 14:27:03 +05:00
ДмитрийandClaude Sonnet 5.5 e8bf35f95d Bot deploy shows the module's refusal; modules update only when the owner asks
- Deploy: a refusal text of the bot module (switched off, rejected, 0 created) is an
  error, not a started job; the outdated-module message points to the Modules page.
- Modules: a module whose build differs from the commit the core recommends shows
  an Update button. Nothing updates by itself, not even on a core change. Needs the
  world stopped, merges the module's settings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 13:54:48 +05:00
ДмитрийandClaude Sonnet 5.5 5db6691b8b Merge master into the Modules Preview line
Keeps the preview identity (name, version, identifier) and its restructured Modules
page; takes master's translated client patch card and the release notes; the built-in
client download stays removed as on master.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 13:52:05 +05:00
github-actions[bot] 657229aafc Update published Manager changelog 2026-11-23 17:20:00 +00:00
Corfirean b5abc6fc4f Merge pull request #237 from Corfirean/release/manager-0.9.17
Manager 0.9.17: client link points to conquestofazerothcore.to
2026-11-23 21:52:24 +05:00
ДмитрийandClaude Sonnet 5.5 81c5556ffe Point the client setup link to conquestofazerothcore.to and prepare Manager 0.9.17
The old community site (coa-development.org) no longer works. The client setup dialog, the open-link
allowlist and the six translations now use https://conquestofazerothcore.to/, which serves the launcher
download and account sign-up. Version 0.9.17 (Manager only), reviewed note and its translations added.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 21:51:53 +05:00
github-actions[bot] 10cfdcf5a2 Update published Manager changelog 2026-11-20 17:37:52 +00:00
Corfirean 316ef078e8 Merge pull request #233 from Corfirean/release/manager-0.9.16
Manager 0.9.16
2026-11-20 22:08:03 +05:00
ДмитрийandClaude Sonnet 5.5 1974ff54e3 Prepare Manager 0.9.16 with reviewed notes in six languages
Version 0.9.16 (Manager only; no server release). Reviewed notes: the client download now comes from
the community launcher, HD graphics hint and translated Custom Races patch card, companions startup
limit creates the missing ones, weekly world restart, server log auto-cleanup. Translations in ru,
de, fr, es and zh for these five notes and for the 0.9.15 note, which the history test requires.
Bundled server history stays at 0.261115.110; notes of later server releases show in English until
a Manager refreshes and translates them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 21:57:49 +05:00
Corfirean de3af82e5d Merge pull request #231 from Corfirean/feat/weekly-restart-log-cleanup-on-master
Settings: weekly world restart and server log auto-cleanup
2026-11-20 21:43:38 +05:00
Corfirean 802bde220c Merge pull request #230 from Corfirean/feat/startup-fleet-top-up
Companions: the startup limit creates the missing ones
2026-11-20 21:43:30 +05:00
Corfirean dfe7ac656b Merge pull request #229 from Corfirean/fix/client-download-launcher-on-master
Remove the dead built-in client download; point players to the launcher
2026-11-20 21:43:21 +05:00
Corfirean cee5139879 Merge pull request #232 from Corfirean/fix/changelog-fragment-length
Changelog: shorten the Custom Races 2.0.2 fragment to the 300-character limit
2026-11-20 21:43:12 +05:00
ДмитрийandClaude Sonnet 5.5 1ea2c8318b docs(changelog): shorten the Custom Races 2.0.2 fragment to the 300-character limit
Its body was 375 characters, so `changelog.py check` over the whole directory failed. The title is
unchanged, so the published 0.9.15 note is the same.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 21:43:02 +05:00
ДмитрийandClaude Sonnet 5.5 2b7dbf8e1e feat(settings): translations and changelog for weekly restart and log auto-cleanup
The weekly restart schedule and the server log auto-cleanup (previous commit) had strings only in
en and ru and no changelog fragments. Adds de/es/fr/zh for the weekday names, the weekly toggle
and the log settings, and one fragment per change.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 21:37:01 +05:00
Дмитрий 4ff190f6d1 feat(settings): add weekly restart schedule and server log auto-cleanup 2026-11-20 21:34:23 +05:00
ДмитрийandClaude Sonnet 5.5 bff5248591 feat(companions): the startup limit is a fleet size, so missing companions are created
CoaBots.AutoLogin.MaxCount only makes the server log in companions that already exist: with 50
companions and a limit of 300, 50 came online. The Manager now creates the difference.

- coa-core: fleet_shortfall / queue_fleet_top_up queue one durable pending job per realm for
  limit - existing (at most 2000 per job, the most one server command takes). Nothing is queued
  when the fleet is complete or an unfinished job exists for the realm.
- start_server: after the world is up, each realm whose auto-login is on is topped up before its
  pending job runs (shared reconcile_realm_companions helper). If the existing count cannot be
  read, nothing is created.
- Saving the startup settings of a running server tops up right away (new top_up_startup_fleet
  command); a shortfall above 200 asks for confirmation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 21:31:32 +05:00
ДмитрийandClaude Sonnet 5.5 f5205662a9 feat(client): say where HD graphics is switched, translate the Custom Races patch card
The community launcher owns the Standard/HD choice (Settings -> "HD graphics"; its setup
also offers it), so the Manager cannot toggle it. The client setup dialog now points players
there. The Custom Races client patch status badges, hints and Install/Repair/Uninstall
buttons were English/Russian ternaries; they are now i18n keys in all six locales.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 21:08:55 +05:00
ДмитрийandClaude Sonnet 5.5 169d8b8977 feat(client): drop built-in client download, point players to the community launcher
The community moved the game client behind its official launcher (account
sign-in, signed manifest, its own CDN), so the public manifest now answers 404
and the Manager must not pose as the launcher. Remove the client download and
update path (clientdl, plan/sync/download/cancel commands, update job and
progress UI, version tracking) and reduce "Set up the game client" to: open
coa-development.org for the launcher, or pick a folder that already has the
game. Linking a folder, realmlist switch, companion addon and the custom-race
patch are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 21:08:50 +05:00
ДмитрийandClaude Sonnet 5.5 954088192e Modules Preview: translate the 0.9.15 Manager note in five languages
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 01:43:01 +05:00
ДмитрийandClaude Sonnet 5.5 2f04207d50 Modules Preview: install the exact compiler next to older Build Tools
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-20 01:31:07 +05:00
ДмитрийandClaude Sonnet 5.5 9f6d35fb9f Merge master (Manager 0.9.15, Custom Races 2.0.2 client) into the Modules Preview
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-19 13:45:55 +05:00
ДмитрийandClaude Sonnet 5.5 41977442e9 Merge master into integrate/manager-0.9.15
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-19 13:12:54 +05:00
github-actions[bot] c75785d13e Update published Manager changelog 2026-11-19 07:59:40 +00:00
ДмитрийandClaude Sonnet 5.5 2b9021ce07 Manager 0.9.15: Custom Races client 2.0.2
Installs the 2.0.2 client set (retail body cache, subclass and HD patches, current
CoACustomRace.exe, newer subclass addon without the Skinshifter collection),
with the 2.0 inventory kept for installs that still carry that manifest.
Archive sizes and hashes verified against the real release archives.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-18 21:38:11 +05:00
ДмитрийandClaude Opus 5.5 d812b7868f Preview 0.9.14: release note for the fixed new-server install
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:43:00 +05:00
Дмитрий 8cce092d16 Merge preview 0.9.12: one copy of the bot strength settings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	package-lock.json
#	package.json
#	src-tauri/tauri.conf.json
2026-11-17 07:42:50 +05:00
ДмитрийandClaude Opus 5.5 d087d65444 Merge Manager 0.9.14 (master) into the Modules Preview
Brings the rest of Manager 0.9.14: multi-realm playerbots, Companions on
Wildcard/Reborn, and the reviewed 0.9.14 notes. Preview 0.9.14 keeps its own
name, identifier and updater; installing the current stable server needs
Manager 0.9.13 or newer, which 0.9.11/0.9.12 could not meet.

modules.rs: Companions follow master's per-build Wildcard/Reborn rule; the
version shown still comes from the plugin registry first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 07:42:32 +05:00
Corfirean b9e663079e Merge integrate/manager-0.9.14: Manager 0.9.14 (Rust launcher, fast races switch, ports, realm names, addons, companions on Wildcard/Reborn) 2026-11-16 18:14:10 +05:00
github-actions[bot] d7693b0878 Update published Manager changelog 2026-11-16 10:21:01 +00:00
ДмитрийandClaude Opus 5.5 1f64da3ae0 Prepare Manager 0.9.14 with reviewed notes in six languages
Version 0.9.14; reviewed Manager (12) and server (6) records with translations in all
five languages; server components from the lock of build run 43758471036; bundled server
history through 0.261115.110 from build main 45c013be9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 14:00:33 +05:00
ДмитрийandClaude Opus 5.5 1aec8e5394 Release note title the collector keeps (no technical word)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 02:18:18 +05:00
Дмитрий 326a4fe3d3 Merge feat/companions-realms: companion bots on Wildcard and Warcraft Reborn
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	crates/coa-core/src/ra.rs
2026-11-16 00:52:15 +05:00
ДмитрийandClaude Opus 5.5 e951eb134b Companions open on Wildcard and Reborn when the server build plays them
The module list blocked Companions on every realm but Conquest of Azeroth, so the
multi-realm bot work could not be switched on. It is allowed (as experimental) when the
world server or its bots plugin carries the standard-class bot profiles of the multi-realm
bots build; SQUID and Dungeon Clear stay CoA-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 00:27:54 +05:00
ДмитрийandClaude Opus 5.5 6cbf007d72 Companions on Wildcard/Reborn: pending bot jobs survive crashes, validated spawn requests
The uncommitted RC hardening of the multirealm Manager branch: a per-realm pending job
state machine reconciled against the database (no duplicate bots after a crash or an RA
timeout), cancelled by Stop spawning / Delete all bots, legacy file migrated; spawn
requests and build ids validated; tests JOB-01..JOB-14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 00:20:50 +05:00
Дмитрий 07e9bc497d feat(manager): dynamic wildcard archetypes, realm-isolated pending jobs, and hardened bot deployment 2026-11-16 00:17:08 +05:00
Дмитрий e4edb7cbdd feat(manager): multi-realm character database routing, RA dispatch & extended bot manager UI 2026-11-16 00:16:51 +05:00
Дмитрий ca2514c790 feat(manager): expand multi-realm bot fleet controls, DB routing, and compatibility guards 2026-11-16 00:16:15 +05:00
Дмитрий 69c9938aba feat(manager): enable multi-realm playerbots support across CoA, Wildcard, and Reborn 2026-11-16 00:16:15 +05:00
ДмитрийandClaude Opus 5.5 4acc07d6fd Keep a single copy of the bot strength settings in the Modules Preview (schema and translations)
The previous commit only removed the duplicate release note; this one removes the
Bots > Combat copy of the ten CoaBots.Scaling.* settings and their translations,
leaving the Preview's Bot Strength section exactly as in preview 0.9.11.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 12:07:25 +05:00
ДмитрийandClaude Opus 5.5 993a7b8e63 Keep a single copy of the bot strength settings in the Modules Preview
Merging Manager 0.9.12 added its Bots > Combat copy of the ten CoaBots.Scaling.*
settings next to the Preview's own Bot Strength section, so the schema failed to
load (duplicate key). The Preview keeps its section, translations and release note,
as shipped since preview 0.9.10.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 11:53:35 +05:00
Corfirean 1d9817bd7a Merge remote-tracking branch 'origin/integrate/release-0.9.12' into preview/release-0.9.12 2026-11-14 00:15:31 +05:00
CorfireanandClaude Opus 5.5 cbaca4f917 Merge Manager 0.9.12 into the Modules Preview (preview 0.9.12)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 00:09:36 +05:00
72 changed files with 12249 additions and 2767 deletions

No files matched your search

+39
View File
@@ -8,6 +8,45 @@ Published releases and previews. Pre-release entries do not change the stable up
Dates follow GitHub publication (UTC); legacy records retain their archived dates. Newest releases first. Dates follow GitHub publication (UTC); legacy records retain their archived dates. Newest releases first.
## 0.9.17 — 2026-11-23
- The game client link points to the new community site, conquestofazerothcore.to.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.17) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.16...v0.9.17)
## 0.9.16 — 2026-11-20
- The game client now comes from the community launcher, not from the Manager.
- Client setup says where to switch HD graphics; Custom Races patch card is translated.
- Clean server logs by hand or automatically when they grow too big.
- The startup limit for companions now creates the ones that are missing.
- Restart the world every week on a chosen day and time.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.16) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.15...v0.9.16)
## 0.9.15 — 2026-11-19
- The Custom Races client update brings version 2.0.2.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.15) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.14...v0.9.15)
## 0.9.14 — 2026-11-16
- Install community addons from the Manager.
- Old item and creature data is cleared before every Play.
- Turning the custom races client patch on or off takes seconds again.
- The database moves to a free port when Windows reserves or another program takes 3307.
- Your own MySQL settings survive restarts and updates.
- Disabled custom races stay disabled after a server update that adds races.
- Rename your realms in the Manager.
- The account for a friend's server is in the login box at every Play.
- Restart the world every day at a chosen time.
- Switches for the Custom Races V2 subclasses, Hero Races and the /dev menu.
- Companion bots on Wildcard and Warcraft Reborn.
- The Custom Races card tells which characters stay out while races are off.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.14) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.9.13...v0.9.14)
## 0.9.13 — 2026-11-15 ## 0.9.13 — 2026-11-15
- The custom races client is updated to Custom Races V2. - The custom races client is updated to Custom Races V2.
Generated
+5 -4
View File
@@ -586,7 +586,7 @@ dependencies = [
[[package]] [[package]]
name = "coa-core" name = "coa-core"
version = "0.9.11" version = "0.9.15"
dependencies = [ dependencies = [
"base64 0.22.1", "base64 0.22.1",
"chrono", "chrono",
@@ -621,7 +621,7 @@ dependencies = [
[[package]] [[package]]
name = "coa-launcher" name = "coa-launcher"
version = "0.9.11" version = "0.9.15"
dependencies = [ dependencies = [
"coa-core", "coa-core",
"serde_json", "serde_json",
@@ -644,7 +644,7 @@ dependencies = [
[[package]] [[package]]
name = "coa-release" name = "coa-release"
version = "0.9.11" version = "0.9.15"
dependencies = [ dependencies = [
"chrono", "chrono",
"coa-core", "coa-core",
@@ -782,7 +782,7 @@ dependencies = [
[[package]] [[package]]
name = "csm-modules-preview" name = "csm-modules-preview"
version = "0.9.11" version = "0.9.15"
dependencies = [ dependencies = [
"coa-control-proto", "coa-control-proto",
"coa-core", "coa-core",
@@ -798,6 +798,7 @@ dependencies = [
"tauri-plugin-updater", "tauri-plugin-updater",
"tauri-plugin-window-state", "tauri-plugin-window-state",
"tracing", "tracing",
"uuid",
] ]
[[package]] [[package]]
+1 -1
View File
@@ -4,7 +4,7 @@ members = ["crates/coa-core", "crates/coa-launcher", "crates/coa-release", "crat
exclude = ["services/coa-registry", "services/coa-registry-e2e", "services/coa-coordinator", "services/coa-relay"] exclude = ["services/coa-registry", "services/coa-registry-e2e", "services/coa-coordinator", "services/coa-relay"]
[workspace.package] [workspace.package]
version = "0.9.11" version = "0.9.15"
edition = "2021" edition = "2021"
license = "AGPL-3.0-only" license = "AGPL-3.0-only"
@@ -1,7 +0,0 @@
---
area: manager
type: added
audience: admins
title: Settings for how much help bots get in dungeons and raids
---
Bot damage, healing, damage taken and tank threat can now be tuned under Bots, Combat. Everything defaults to 1 (no change); a switch turns the extra help for four hard bosses on.
+1 -1
View File
@@ -2,6 +2,6 @@
area: manager area: manager
type: added type: added
audience: players audience: players
title: The game cache is cleared before every Play title: Old item and creature data is cleared before every Play
--- ---
After a server update the game showed old names and stats from its own cache (Cache/WDB). Play now clears that cache first; it fills again within seconds. A switch next to the client graphics settings turns it off. After a server update the game showed old names and stats from its own cache (Cache/WDB). Play now clears that cache first; it fills again within seconds. A switch next to the client graphics settings turns it off.
@@ -0,0 +1,7 @@
---
area: manager
type: added
audience: admins
title: Companion bots on Wildcard and Warcraft Reborn
---
With a server build that supports it, Companions can be switched on for Wildcard and Warcraft Reborn: bots get whole Wildcard archetypes or Reborn abilities by level, and bot creation survives a crash without duplicates.
@@ -0,0 +1,7 @@
---
area: manager
type: changed
audience: players
title: The game client now comes from the community launcher, not from the Manager
---
The client download moved behind the community launcher's sign-in, so the Manager's built-in download and update are removed. Get the launcher at coa-development.org, then choose your game folder in the Manager.
@@ -0,0 +1,7 @@
---
area: manager
type: fixed
audience: admins
title: Installing a new server works again in the Modules Preview
---
The newest server release needs a newer Manager than the previous preview, so a fresh install stopped with "This package needs a newer version". This preview meets that requirement.
@@ -0,0 +1,7 @@
---
area: manager
type: changed
audience: players
title: The Custom Races client update brings version 2.0.2
---
Updating the Custom Races client installs 2.0.2, including the retail body models, subclass and HD patches and the Two-Players bar. About 4.4 GB of new files are fetched. Update the Manager before the server.
@@ -0,0 +1,7 @@
---
area: manager
type: changed
audience: players
title: Client setup says where to switch HD graphics; Custom Races patch card is translated
---
HD or standard graphics is a launcher setting; the client setup dialog now says so. The Custom Races client patch status and buttons are now translated into every language the Manager offers.
@@ -0,0 +1,7 @@
---
area: manager
type: fixed
audience: admins
title: Installing the C++ Build Tools now gets the exact compiler the core needs
---
Plugins must be built by the same compiler build as the core. On a PC whose Visual Studio Build Tools were installed earlier, the installer kept the older compiler and the modules stayed switched off. When the existing Build Tools cannot supply the compiler this core names, the Manager now installs Microsoft's current Build Tools next to them and leaves the existing installation untouched.
@@ -0,0 +1,7 @@
---
area: manager
type: added
audience: admins
title: Clean server logs by hand or automatically when they grow too big
---
Server logging settings show how much the logs take and clean them with one button. Optionally the Manager cleans them above a size you choose; logs the running server uses are kept.
@@ -0,0 +1,7 @@
---
area: manager
type: changed
audience: players
title: The startup limit for companions now creates the ones that are missing
---
With 50 companions and a startup limit of 300, the Manager now creates the missing 250 instead of logging in only 50. Companions that exist are never created again. Up to 2000 are created at a time.
@@ -0,0 +1,7 @@
---
area: manager
type: added
audience: admins
title: Restart the world every week on a chosen day and time
---
Next to the daily restart, pick a weekday, a time and the in-game countdown in the scheduled restart settings. Existing daily schedules keep working.
+7
View File
@@ -0,0 +1,7 @@
---
area: manager
type: fixed
audience: players
title: The game client link points to the new community site, conquestofazerothcore.to
---
The old community website no longer works, so the client setup dialog now opens conquestofazerothcore.to, where you download the launcher and sign in.
@@ -0,0 +1,7 @@
---
area: manager
type: fixed
audience: admins
title: Deploying companions shows why the server refused, instead of a bar stuck at 0
---
When the bot module refused a Deploy request, the page kept showing "Creating bots 0 / N" forever. It now shows the module's own reply, and the message for an outdated bot module points to the Modules page.
@@ -0,0 +1,7 @@
---
area: manager
type: added
audience: admins
title: Update an installed module to the build your server recommends, when you choose
---
The Modules page now says when your server recommends a newer build of an installed module and offers an Update button. Nothing updates on its own, not even with a new server core; the server must be stopped, and the module's settings are kept.
+79 -1
View File
@@ -178,7 +178,26 @@
"Corfirean/coa-server-manager:20261031-validation-mysql-reuse.md", "Corfirean/coa-server-manager:20261031-validation-mysql-reuse.md",
"Corfirean/coa-server-manager:20261103-isolated-login-port.md", "Corfirean/coa-server-manager:20261103-isolated-login-port.md",
"Corfirean/coa-server-manager:20261107-bot-strength-scaling-settings.md", "Corfirean/coa-server-manager:20261107-bot-strength-scaling-settings.md",
"Corfirean/coa-server-manager:20261115-custom-races-v2-client.md" "Corfirean/coa-server-manager:20261115-addon-catalog.md",
"Corfirean/coa-server-manager:20261115-clear-game-cache.md",
"Corfirean/coa-server-manager:20261115-custom-races-fast-toggle.md",
"Corfirean/coa-server-manager:20261115-custom-races-v2-client.md",
"Corfirean/coa-server-manager:20261115-database-port-relocation.md",
"Corfirean/coa-server-manager:20261115-mysql-custom-options.md",
"Corfirean/coa-server-manager:20261115-race-restriction-kept.md",
"Corfirean/coa-server-manager:20261115-realm-names.md",
"Corfirean/coa-server-manager:20261115-remembered-friend-login.md",
"Corfirean/coa-server-manager:20261115-scheduled-restart.md",
"Corfirean/coa-server-manager:20261115-v2-feature-switches.md",
"Corfirean/coa-server-manager:20261116-companions-wildcard-reborn.md",
"Corfirean/coa-server-manager:20261116-custom-race-characters-off.md",
"Corfirean/coa-server-manager:20261117-client-download-needs-launcher.md",
"Corfirean/coa-server-manager:20261118-custom-races-2-0-2-client.md",
"Corfirean/coa-server-manager:20261120-hd-graphics-hint-and-patch-labels.md",
"Corfirean/coa-server-manager:20261120-server-log-auto-cleanup.md",
"Corfirean/coa-server-manager:20261120-startup-fleet-creates-missing-companions.md",
"Corfirean/coa-server-manager:20261120-weekly-world-restart.md",
"Corfirean/coa-server-manager:20261123-client-site-link.md"
], ],
"releases": [ "releases": [
{ {
@@ -936,6 +955,65 @@
], ],
"commit": "d3527312803fb5a3e1cd48e01496645a8bbc9dcf", "commit": "d3527312803fb5a3e1cd48e01496645a8bbc9dcf",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.12...v0.9.13" "compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.12...v0.9.13"
},
{
"tag": "v0.9.14",
"version": "0.9.14",
"date": "2026-11-16",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.14",
"notes": [
"Install community addons from the Manager",
"Old item and creature data is cleared before every Play",
"Turning the custom races client patch on or off takes seconds again",
"The database moves to a free port when Windows reserves or another program takes 3307",
"Your own MySQL settings survive restarts and updates",
"Disabled custom races stay disabled after a server update that adds races",
"Rename your realms in the Manager",
"The account for a friend's server is in the login box at every Play",
"Restart the world every day at a chosen time",
"Switches for the Custom Races V2 subclasses, Hero Races and the /dev menu",
"Companion bots on Wildcard and Warcraft Reborn",
"The Custom Races card tells which characters stay out while races are off"
],
"commit": "1f64da3ae064b3f02d2bb11d818c44d26a557045",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.13...v0.9.14"
},
{
"tag": "v0.9.15",
"version": "0.9.15",
"date": "2026-11-19",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.15",
"notes": [
"The Custom Races client update brings version 2.0.2"
],
"commit": "2b9021ce072e3b6c7e9c8106f8a54f59f1b37424",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.14...v0.9.15"
},
{
"tag": "v0.9.16",
"version": "0.9.16",
"date": "2026-11-20",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.16",
"notes": [
"The game client now comes from the community launcher, not from the Manager",
"Client setup says where to switch HD graphics; Custom Races patch card is translated",
"Clean server logs by hand or automatically when they grow too big",
"The startup limit for companions now creates the ones that are missing",
"Restart the world every week on a chosen day and time"
],
"commit": "316ef078e8047c790cb081f0991d9e0d618fcd2d",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.15...v0.9.16"
},
{
"tag": "v0.9.17",
"version": "0.9.17",
"date": "2026-11-23",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.9.17",
"notes": [
"The game client link points to the new community site, conquestofazerothcore.to"
],
"commit": "b5abc6fc4f6ab348efd57521136a2153ec948ca0",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.9.16...v0.9.17"
} }
] ]
} }
-75
View File
@@ -1,75 +0,0 @@
//! Live check of the client download path against the community launcher's public server:
//! reads the manifest and downloads the few smallest files into a temp folder (never a real client).
//! Usage: cargo run -p coa-core --example client_probe (PROBE_SKIP=n skips the n smallest files)
use coa_core::clientdl::{self, Apply, Manifest};
use coa_core::download::{Cancel, HttpTransport};
fn main() {
let full = clientdl::fetch_latest().expect("manifest");
println!(
"version {} · {} files · {:.1} GB",
full.version,
full.files.len(),
full.total_bytes() as f64 / 1e9
);
let mut small = full.files.clone();
small.sort_by_key(|f| f.size);
let skip: usize = std::env::var("PROBE_SKIP")
.ok()
.and_then(|v| v.parse().ok())
.unwrap_or(0);
let small: Vec<_> = small.into_iter().skip(skip).take(6).collect();
let manifest = Manifest {
version: full.version.clone(),
published_at: None,
files: small,
};
let dir = std::env::temp_dir().join(format!("coa-client-probe-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let cancel = Cancel::default();
let plan = clientdl::plan(&dir, &manifest, &Default::default(), &cancel, &|_| {}).unwrap();
println!(
"plan: {} files, {} bytes",
plan.items.len(),
plan.download_bytes
);
let transport = HttpTransport::new().unwrap();
clientdl::apply(
&Apply {
client: &dir,
manifest: &manifest,
plan: &plan,
keep_modified: false,
transport: &transport,
objects_url: clientdl::OBJECTS_URL,
cancel: &cancel,
},
&|s| {
println!(
"{} {}/{} {}",
s.phase,
s.done,
s.total,
s.file.unwrap_or_default()
)
},
)
.expect("apply");
let again = clientdl::plan(
&dir,
&manifest,
&clientdl::load_state(&dir).unwrap(),
&cancel,
&|_| {},
)
.unwrap();
println!(
"second plan: {} to do, {} up to date, version {:?}",
again.items.len(),
again.up_to_date_files,
clientdl::local(&dir).version
);
std::fs::remove_dir_all(&dir).unwrap();
}
-975
View File
@@ -1,975 +0,0 @@
//! Download and update of the game client from the community launcher's public manifest.
//!
//! The manifest lists every file with its size and SHA-256; each file is fetched by hash and verified before it is
//! moved into place (`download::fetch_with`, resumable). The Manager keeps a small state file inside the client
//! folder (`.coa-manager/client-state.json`) so that later checks are cheap and so that files the player changed
//! are recognised: they are never overwritten without being asked, and a replaced file is moved aside, not deleted.
//! WTF, Cache, other addons, logs and `realmlist.wtf` are not part of what the Manager synchronises.
use std::collections::{BTreeMap, HashMap};
use std::fs::{self, File};
use std::io::Read;
use std::path::{Path, PathBuf};
use std::time::{Instant, UNIX_EPOCH};
use serde::{Deserialize, Serialize};
use sha2::{Digest, Sha256};
use crate::download::{self, Cancel, HttpTransport, Job, Transport};
use crate::error::{Error, Result};
use crate::fsx;
pub const MANIFEST_URL: &str =
"https://launcher-api.coa-development.org/downloads/client/latest.json";
pub const OBJECTS_URL: &str = "https://launcher-api.coa-development.org/downloads/client/objects";
const STATE_DIR: &str = ".coa-manager";
const MAX_MANIFEST_BYTES: u64 = 16 * 1024 * 1024;
const MAX_FILE_BYTES: u64 = 16 * 1024 * 1024 * 1024;
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ManifestFile {
pub path: String,
pub size: u64,
pub sha256: String,
}
#[derive(Debug, Clone, Serialize)]
pub struct Manifest {
pub version: String,
pub published_at: Option<String>,
pub files: Vec<ManifestFile>,
}
impl Manifest {
pub fn total_bytes(&self) -> u64 {
self.files.iter().map(|f| f.size).sum()
}
}
#[derive(Deserialize)]
struct RawManifest {
schema: u32,
version: String,
#[serde(rename = "publishedAt")]
published_at: Option<String>,
files: Vec<ManifestFile>,
}
/// Things the Manager never writes, even if a manifest lists them: logs, the realmlist, the player's own settings,
/// caches and the companion addon (those have their own safe paths).
fn is_excluded(path: &str) -> bool {
let p = path.replace('\\', "/").to_ascii_lowercase();
p.ends_with(".log")
|| p.rsplit('/').next() == Some("realmlist.wtf")
|| p.starts_with("wtf/")
|| p.starts_with("cache/")
|| p.starts_with("errors/")
|| p.starts_with("logs/")
|| p.starts_with(".coa-manager/")
|| p.starts_with("interface/addons/coabotui/")
}
/// Files players customise: graphics wrappers and their configuration. If one exists and differs from the published
/// file it is left exactly as it is, whatever the "keep my files" choice; it is only created when missing.
fn is_player_owned(path: &str) -> bool {
let name = path.rsplit('/').next().unwrap_or(path).to_ascii_lowercase();
matches!(
name.as_str(),
"d3d8.dll" | "d3d9.dll" | "d3d10core.dll" | "d3d11.dll" | "dxgi.dll" | "dxvk.conf"
) || matches!(
name.rsplit('.').next(),
Some("ini" | "conf" | "cfg" | "wtf")
)
}
pub fn parse_manifest(text: &str) -> Result<Manifest> {
let raw: RawManifest = serde_json::from_str(text)
.map_err(|e| Error::Invalid(format!("The client list could not be read: {e}")))?;
if raw.schema != 1 {
return Err(Error::Invalid(format!(
"The client list uses a newer format ({}); update the Manager.",
raw.schema
)));
}
if raw.version.trim().is_empty() || raw.version.len() > 64 {
return Err(Error::Invalid("The client list has no version.".into()));
}
let root = Path::new("client-root");
let mut files = Vec::with_capacity(raw.files.len());
for f in raw.files {
fsx::safe_join(root, &f.path)?;
let hash_ok = f.sha256.len() == 64 && f.sha256.bytes().all(|b| b.is_ascii_hexdigit());
if !hash_ok || f.size > MAX_FILE_BYTES {
return Err(Error::Invalid(format!(
"The client list has a bad entry for {}.",
f.path
)));
}
if is_excluded(&f.path) {
continue;
}
files.push(ManifestFile {
path: f.path.replace('\\', "/"),
size: f.size,
sha256: f.sha256.to_ascii_lowercase(),
});
}
if files.is_empty() {
return Err(Error::Invalid("The client list is empty.".into()));
}
Ok(Manifest {
version: raw.version,
published_at: raw.published_at,
files,
})
}
pub fn fetch_manifest(transport: &dyn Transport, url: &str) -> Result<Manifest> {
let mut reply = transport
.get(url, 0)
.map_err(|e| Error::Invalid(format!("Could not reach the client download server: {e}")))?;
if reply.status != 200 {
return Err(Error::Invalid(format!(
"The client download server answered {}.",
reply.status
)));
}
let mut text = String::new();
reply
.body
.by_ref()
.take(MAX_MANIFEST_BYTES)
.read_to_string(&mut text)
.map_err(|e| Error::Invalid(format!("Could not read the client list: {e}")))?;
parse_manifest(&text)
}
pub fn fetch_latest() -> Result<Manifest> {
download::check_url(MANIFEST_URL)?;
fetch_manifest(&HttpTransport::with_total_timeout(30)?, MANIFEST_URL)
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Entry {
pub size: u64,
pub mtime: u64,
pub sha256: String,
/// The player chose to keep this file although the manifest has a different one (this is the manifest hash
/// they were asked about; a newer manifest asks again).
#[serde(default)]
pub kept_against: Option<String>,
}
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct State {
/// The manifest version this folder was brought to; None while a download is unfinished.
pub version: Option<String>,
pub files: BTreeMap<String, Entry>,
}
fn state_path(client: &Path) -> PathBuf {
client.join(STATE_DIR).join("client-state.json")
}
pub fn load_state(client: &Path) -> Option<State> {
fsx::read_json(&state_path(client)).ok()
}
fn save_state(client: &Path, state: &State) -> Result<()> {
fsx::atomic_write_json(&state_path(client), state)
}
#[derive(Debug, Clone, Serialize)]
pub struct Local {
/// The Manager downloaded or adopted this folder (a state file exists).
pub managed: bool,
pub version: Option<String>,
}
pub fn local(client: &Path) -> Local {
let s = load_state(client);
Local {
managed: s.is_some(),
version: s.and_then(|s| s.version),
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum Kind {
/// Not in the folder.
Missing,
/// Still as the Manager left it; the manifest has a newer file.
Changed,
/// Different from the manifest and not as the Manager left it (changed by the player or by something else).
Modified,
}
#[derive(Debug, Clone, Serialize)]
pub struct Item {
pub path: String,
pub size: u64,
pub kind: Kind,
#[serde(skip)]
sha256: String,
}
#[derive(Debug, Clone, Serialize)]
pub struct Plan {
pub version: String,
pub items: Vec<Item>,
pub download_bytes: u64,
pub total_files: usize,
pub up_to_date_files: usize,
pub kept_files: usize,
#[serde(skip)]
confirmed: BTreeMap<String, Entry>,
}
impl Plan {
pub fn modified(&self) -> Vec<&Item> {
self.items
.iter()
.filter(|i| i.kind == Kind::Modified)
.collect()
}
}
#[derive(Debug, Clone, Serialize)]
pub struct Step {
/// "scan" while comparing files, "download" while fetching, "finish" at the end.
pub phase: &'static str,
pub done: u64,
pub total: u64,
pub bytes_per_sec: u64,
pub file: Option<String>,
}
fn cancelled() -> Error {
Error::Invalid("Download cancelled.".into())
}
fn mtime_secs(m: &fs::Metadata) -> u64 {
m.modified()
.ok()
.and_then(|t| t.duration_since(UNIX_EPOCH).ok())
.map(|d| d.as_secs())
.unwrap_or(0)
}
fn hash_file(path: &Path, cancel: &Cancel, on_bytes: &mut dyn FnMut(u64)) -> Result<String> {
let mut f = File::open(path)?;
let mut hasher = Sha256::new();
let mut buf = vec![0u8; 1 << 20];
loop {
if cancel.is_set() {
return Err(cancelled());
}
let n = f.read(&mut buf)?;
if n == 0 {
return Ok(hex::encode(hasher.finalize()));
}
hasher.update(&buf[..n]);
on_bytes(n as u64);
}
}
/// Compare the folder with the manifest. Files are hashed only when their size or modification time no longer
/// matches what the state file recorded, so a routine check of a managed folder is quick.
pub fn plan(
client: &Path,
m: &Manifest,
state: &State,
cancel: &Cancel,
on_step: &dyn Fn(Step),
) -> Result<Plan> {
let total = m.total_bytes();
let mut done = 0u64;
let mut items = Vec::new();
let mut confirmed = BTreeMap::new();
let (mut up_to_date, mut kept) = (0usize, 0usize);
for f in &m.files {
if cancel.is_set() {
return Err(cancelled());
}
on_step(Step {
phase: "scan",
done,
total,
bytes_per_sec: 0,
file: Some(f.path.clone()),
});
if crate::client_graphics::disabled(client, &f.path)? {
kept += 1;
done += f.size;
continue;
}
let path = fsx::safe_join(client, &f.path)?;
let meta = match fs::metadata(&path) {
Ok(meta) if meta.is_file() => meta,
_ => {
items.push(Item {
path: f.path.clone(),
size: f.size,
kind: Kind::Missing,
sha256: f.sha256.clone(),
});
done += f.size;
continue;
}
};
let (size, mtime) = (meta.len(), mtime_secs(&meta));
let entry = state.files.get(&f.path);
let trusted = entry.filter(|e| e.size == size && e.mtime == mtime);
let local: Option<String> = if let Some(e) = trusted {
Some(e.sha256.clone())
} else if size == f.size || entry.map(|e| e.size == size).unwrap_or(false) {
let base = done;
let mut seen = 0u64;
let h = hash_file(&path, cancel, &mut |n| {
seen += n;
on_step(Step {
phase: "scan",
done: base + seen.min(f.size),
total,
bytes_per_sec: 0,
file: Some(f.path.clone()),
});
})?;
Some(h)
} else {
None
};
done += f.size;
if is_player_owned(&f.path) && local.as_deref() != Some(f.sha256.as_str()) {
let sha = match local {
Some(h) => h,
None => hash_file(&path, cancel, &mut |_| {})?,
};
kept += 1;
confirmed.insert(
f.path.clone(),
Entry {
size,
mtime,
sha256: sha,
kept_against: Some(f.sha256.clone()),
},
);
continue;
}
if local.as_deref() == Some(f.sha256.as_str()) {
up_to_date += 1;
confirmed.insert(
f.path.clone(),
Entry {
size,
mtime,
sha256: f.sha256.clone(),
kept_against: None,
},
);
continue;
}
let as_left = entry.filter(|e| local.as_deref() == Some(e.sha256.as_str()));
match as_left {
Some(e) if e.kept_against.as_deref() == Some(f.sha256.as_str()) => {
kept += 1;
confirmed.insert(
f.path.clone(),
Entry {
size,
mtime,
sha256: e.sha256.clone(),
kept_against: e.kept_against.clone(),
},
);
}
Some(e) if e.kept_against.is_none() => {
items.push(Item {
path: f.path.clone(),
size: f.size,
kind: Kind::Changed,
sha256: f.sha256.clone(),
});
}
_ => items.push(Item {
path: f.path.clone(),
size: f.size,
kind: Kind::Modified,
sha256: f.sha256.clone(),
}),
}
}
on_step(Step {
phase: "scan",
done: total,
total,
bytes_per_sec: 0,
file: None,
});
let download_bytes = items.iter().map(|i| i.size).sum();
Ok(Plan {
version: m.version.clone(),
items,
download_bytes,
total_files: m.files.len(),
up_to_date_files: up_to_date,
kept_files: kept,
confirmed,
})
}
pub struct Apply<'a> {
pub client: &'a Path,
pub manifest: &'a Manifest,
pub plan: &'a Plan,
/// Leave files the player changed alone (they are remembered, and asked about again only when the manifest changes).
pub keep_modified: bool,
pub transport: &'a dyn Transport,
pub objects_url: &'a str,
pub cancel: &'a Cancel,
}
fn blocked(path: &str, e: std::io::Error) -> Error {
Error::Invalid(format!("Could not replace {path}: {e}. Close the game and anything else using the client, then try again."))
}
/// Download what the plan lists. Progress is saved after every file, so an interrupted run resumes where it stopped.
pub fn apply(a: &Apply, on_step: &dyn Fn(Step)) -> Result<()> {
let mut state = State {
version: None,
files: a.plan.confirmed.clone(),
};
save_state(a.client, &state)?;
let mut todo = Vec::new();
for item in &a.plan.items {
if crate::client_graphics::disabled(a.client, &item.path)? {
continue;
}
if item.kind == Kind::Modified && a.keep_modified {
let path = fsx::safe_join(a.client, &item.path)?;
let meta = fs::metadata(&path)?;
let sha = hash_file(&path, a.cancel, &mut |_| {})?;
state.files.insert(
item.path.clone(),
Entry {
size: meta.len(),
mtime: mtime_secs(&meta),
sha256: sha,
kept_against: Some(item.sha256.clone()),
},
);
} else {
todo.push(item);
}
}
let total: u64 = todo.iter().map(|i| i.size).sum();
fsx::require_space(a.client, total)?;
let staging = a.client.join(STATE_DIR).join("staging");
let replaced = a
.client
.join(STATE_DIR)
.join("replaced")
.join(chrono::Utc::now().format("%Y%m%d-%H%M%S").to_string());
let mut done = 0u64;
let mut placed: HashMap<&str, PathBuf> = HashMap::new();
for item in todo {
if a.cancel.is_set() {
save_state(a.client, &state)?;
return Err(cancelled());
}
let target = fsx::safe_join(a.client, &item.path)?;
let started = Instant::now();
let staged = staging.join(&item.sha256);
let copy_from = placed.get(item.sha256.as_str()).cloned();
if copy_from.is_none() {
let job = Job {
url: format!("{}/{}", a.objects_url, item.sha256),
dest: staged.clone(),
sha256: item.sha256.clone(),
size: item.size,
};
let base = done;
let result = download::fetch_with(a.transport, &job, a.cancel, &|p| {
on_step(Step {
phase: "download",
done: base + p.downloaded,
total,
bytes_per_sec: p.bytes_per_sec,
file: Some(item.path.clone()),
});
});
if let Err(e) = result {
let _ = save_state(a.client, &state);
return Err(e);
}
}
if let Some(parent) = target.parent() {
fs::create_dir_all(parent)?;
}
if target.exists() {
if item.kind == Kind::Modified {
let keep = fsx::safe_join(&replaced, &item.path)?;
if let Some(parent) = keep.parent() {
fs::create_dir_all(parent)?;
}
fs::rename(&target, &keep).map_err(|e| blocked(&item.path, e))?;
} else {
fs::remove_file(&target).map_err(|e| blocked(&item.path, e))?;
}
}
match copy_from {
Some(src) => {
fs::copy(&src, &target).map_err(|e| blocked(&item.path, e))?;
}
None => fs::rename(&staged, &target).map_err(|e| blocked(&item.path, e))?,
}
placed.insert(&item.sha256, target.clone());
let meta = fs::metadata(&target)?;
state.files.insert(
item.path.clone(),
Entry {
size: meta.len(),
mtime: mtime_secs(&meta),
sha256: item.sha256.clone(),
kept_against: None,
},
);
save_state(a.client, &state)?;
done += item.size;
let secs = started.elapsed().as_secs_f64().max(0.001);
on_step(Step {
phase: "download",
done,
total,
bytes_per_sec: (item.size as f64 / secs) as u64,
file: Some(item.path.clone()),
});
}
state.version = Some(a.manifest.version.clone());
save_state(a.client, &state)?;
let _ = fs::remove_dir_all(&staging);
on_step(Step {
phase: "finish",
done: total,
total,
bytes_per_sec: 0,
file: None,
});
Ok(())
}
#[cfg(test)]
mod tests {
use super::*;
use crate::download::Reply;
use std::io::Cursor;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Mutex;
/// Serves objects by hash; remembers what was requested and can fail after N objects.
struct Server {
objects: Mutex<HashMap<String, Vec<u8>>>,
requested: Mutex<Vec<String>>,
cancel_after: Option<(AtomicUsize, Cancel)>,
}
impl Server {
fn new(files: &[(&str, &[u8])]) -> Self {
let s = Server {
objects: Default::default(),
requested: Default::default(),
cancel_after: None,
};
for (_, body) in files {
s.objects
.lock()
.unwrap()
.insert(fsx::sha256_bytes(body), body.to_vec());
}
s
}
}
impl Transport for Server {
fn get(&self, url: &str, from: u64) -> std::result::Result<Reply, String> {
let sha = url.rsplit('/').next().unwrap().to_string();
self.requested.lock().unwrap().push(sha.clone());
if let Some((left, cancel)) = &self.cancel_after {
if left.fetch_sub(1, Ordering::SeqCst) == 1 {
cancel.cancel();
}
}
let body = self
.objects
.lock()
.unwrap()
.get(&sha)
.cloned()
.ok_or("404")?;
let (status, start) = if from > 0 {
(206, from as usize)
} else {
(200, 0)
};
let cr = (from > 0).then(|| format!("bytes {from}-{}/{}", body.len() - 1, body.len()));
Ok(Reply {
status,
content_range: cr,
body: Box::new(Cursor::new(body[start..].to_vec())),
})
}
}
fn manifest(version: &str, files: &[(&str, &[u8])]) -> Manifest {
Manifest {
version: version.into(),
published_at: None,
files: files
.iter()
.map(|(p, b)| ManifestFile {
path: p.to_string(),
size: b.len() as u64,
sha256: fsx::sha256_bytes(b),
})
.collect(),
}
}
const V1: [(&str, &[u8]); 4] = [
("Wow.exe", b"exe-1"),
("Data/common.MPQ", b"common-mpq-data"),
("Data/patch-A.MPQ", b"patch-a-1"),
("Data/enUS/locale.MPQ", b"locale"),
];
fn sync(dir: &Path, m: &Manifest, server: &Server, keep: bool) -> Result<Plan> {
let state = load_state(dir).unwrap_or_default();
let cancel = Cancel::default();
let p = plan(dir, m, &state, &cancel, &|_| {})?;
apply(
&Apply {
client: dir,
manifest: m,
plan: &p,
keep_modified: keep,
transport: server,
objects_url: "https://x.invalid/objects",
cancel: &cancel,
},
&|_| {},
)?;
Ok(p)
}
#[test]
fn manifest_rejects_traversal_and_bad_entries_and_skips_personal_files() {
let ok = r#"{"schema":1,"version":"v1","files":[
{"path":"Wow.exe","size":3,"sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},
{"path":"Data/enUS/realmlist.wtf","size":3,"sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},
{"path":"WTF/Config.wtf","size":3,"sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},
{"path":"Interface/AddOns/CoABotUI/x.lua","size":3,"sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"},
{"path":"MemoryBridge.log","size":3,"sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}]}"#;
let m = parse_manifest(ok).unwrap();
assert_eq!(
m.files.iter().map(|f| f.path.as_str()).collect::<Vec<_>>(),
["Wow.exe"]
);
for bad in [
r#"{"schema":1,"version":"v","files":[{"path":"../evil.dll","size":1,"sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}]}"#,
r#"{"schema":1,"version":"v","files":[{"path":"C:/evil.dll","size":1,"sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}]}"#,
r#"{"schema":1,"version":"v","files":[{"path":"a.dll","size":1,"sha256":"short"}]}"#,
r#"{"schema":2,"version":"v","files":[]}"#,
r#"{"schema":1,"version":"v","files":[]}"#,
] {
assert!(parse_manifest(bad).is_err(), "{bad}");
}
}
#[test]
fn fresh_download_installs_every_file_verified_and_leaves_nothing_behind() {
let d = tempfile::tempdir().unwrap();
let (m, s) = (manifest("v1", &V1), Server::new(&V1));
let p = sync(d.path(), &m, &s, false).unwrap();
assert_eq!(p.items.len(), 4);
for (path, body) in V1 {
assert_eq!(fs::read(d.path().join(path)).unwrap(), body);
}
let st = load_state(d.path()).unwrap();
assert_eq!(st.version.as_deref(), Some("v1"));
assert_eq!(st.files.len(), 4);
assert!(!d.path().join(".coa-manager/staging").exists());
assert!(local(d.path()).managed);
}
#[test]
fn an_update_downloads_only_what_changed_and_a_second_check_is_empty() {
let d = tempfile::tempdir().unwrap();
sync(d.path(), &manifest("v1", &V1), &Server::new(&V1), false).unwrap();
let mut v2 = V1.to_vec();
v2[2] = ("Data/patch-A.MPQ", b"patch-a-2-longer");
v2.push(("Data/new.MPQ", b"brand new"));
let (m2, s2) = (manifest("v2", &v2), Server::new(&v2));
let p = sync(d.path(), &m2, &s2, false).unwrap();
let kinds: Vec<_> = p.items.iter().map(|i| (i.path.as_str(), i.kind)).collect();
assert_eq!(
kinds,
[
("Data/patch-A.MPQ", Kind::Changed),
("Data/new.MPQ", Kind::Missing)
]
);
assert_eq!(
s2.requested.lock().unwrap().len(),
2,
"unchanged files were not downloaded again"
);
assert_eq!(
fs::read(d.path().join("Data/patch-A.MPQ")).unwrap(),
b"patch-a-2-longer"
);
assert!(
!d.path().join(".coa-manager/replaced").exists(),
"a file the Manager itself wrote needs no backup"
);
let again = sync(d.path(), &m2, &s2, false).unwrap();
assert!(again.items.is_empty() && again.up_to_date_files == 5);
assert_eq!(load_state(d.path()).unwrap().version.as_deref(), Some("v2"));
}
#[test]
fn a_file_the_player_changed_is_asked_about_kept_when_told_to_and_saved_when_replaced() {
let d = tempfile::tempdir().unwrap();
sync(d.path(), &manifest("v1", &V1), &Server::new(&V1), false).unwrap();
fs::write(d.path().join("Wow.exe"), b"my patched exe").unwrap();
let mut v2 = V1.to_vec();
v2[0] = ("Wow.exe", b"exe-2");
let (m2, s2) = (manifest("v2", &v2), Server::new(&v2));
let p = sync(d.path(), &m2, &s2, true).unwrap();
assert_eq!(p.modified().len(), 1);
assert_eq!(
fs::read(d.path().join("Wow.exe")).unwrap(),
b"my patched exe",
"kept"
);
assert!(
s2.requested.lock().unwrap().is_empty(),
"nothing needed downloading"
);
let quiet = sync(d.path(), &m2, &s2, true).unwrap();
assert!(
quiet.items.is_empty() && quiet.kept_files == 1,
"the decision is remembered"
);
let mut v3 = V1.to_vec();
v3[0] = ("Wow.exe", b"exe-3");
let (m3, s3) = (manifest("v3", &v3), Server::new(&v3));
let again = sync(d.path(), &m3, &s3, false).unwrap();
assert_eq!(again.modified().len(), 1, "a newer client asks again");
assert_eq!(fs::read(d.path().join("Wow.exe")).unwrap(), b"exe-3");
let saved = fs::read_dir(d.path().join(".coa-manager/replaced"))
.unwrap()
.next()
.unwrap()
.unwrap()
.path();
assert_eq!(
fs::read(saved.join("Wow.exe")).unwrap(),
b"my patched exe",
"the player's version was moved aside, not lost"
);
}
#[test]
fn disabled_launcher_renderers_are_never_restored_even_with_a_stale_plan() {
let dir = tempfile::tempdir().unwrap();
let files: Vec<(&str, &[u8])> = vec![("d3d9.dll", b"dxvk"), ("dxgi.dll", b"enhancements")];
let manifest = manifest("v1", &files);
let cancel = Cancel::default();
let old_plan = plan(dir.path(), &manifest, &State::default(), &cancel, &|_| {}).unwrap();
fs::write(dir.path().join("d3d9.dll.DISABLED"), b"custom disabled").unwrap();
crate::client_graphics::set(dir.path(), "dxgi.dll", true).unwrap();
let server = Server::new(&files);
apply(
&Apply {
client: dir.path(),
manifest: &manifest,
plan: &old_plan,
keep_modified: false,
transport: &server,
objects_url: "https://x.invalid/objects",
cancel: &cancel,
},
&|_| {},
)
.unwrap();
assert!(server.requested.lock().unwrap().is_empty());
assert!(!dir.path().join("d3d9.dll").exists());
assert!(!dir.path().join("dxgi.dll").exists());
assert_eq!(
fs::read(dir.path().join("d3d9.dll.DISABLED")).unwrap(),
b"custom disabled"
);
let after = plan(
dir.path(),
&manifest,
&load_state(dir.path()).unwrap(),
&cancel,
&|_| {},
)
.unwrap();
assert!(after.items.is_empty());
crate::client_graphics::set(dir.path(), "d3d9.dll", false).unwrap();
assert_eq!(
fs::read(dir.path().join("d3d9.dll")).unwrap(),
b"custom disabled"
);
}
#[test]
fn renderer_files_configs_and_everything_not_in_the_manifest_survive_an_update_untouched() {
let d = tempfile::tempdir().unwrap();
let v1: Vec<(&str, &[u8])> = vec![
("Wow.exe", b"exe-1"),
("d3d9.dll", b"official d3d9"),
("dxvk.conf", b"official conf"),
("Data/common.MPQ", b"common-1"),
];
sync(d.path(), &manifest("v1", &v1), &Server::new(&v1), false).unwrap();
// the player's own setup: custom renderer + configs, addons, WTF, realmlist, extra archives, backups
let mine: Vec<(&str, &[u8])> = vec![
("d3d9.dll", b"my renderer"),
("dxvk.conf", b"my conf"),
("ModernWoWRenderer.ini", b"cfg"),
("GraphicsEffects.ini.bak", b"bak"),
(
"Data/enUS/realmlist.wtf",
b"set realmlist 127.0.0.1
",
),
("Data/patch-5.MPQ", b"extra archive"),
("Interface/AddOns/ElvUI/ElvUI.toc", b"## Title: Elv"),
("WTF/Account/x/SavedVariables.lua", b"vars"),
("Cache/x.wdb", b"cache"),
];
for (p, b) in &mine {
let path = d.path().join(p);
fs::create_dir_all(path.parent().unwrap()).unwrap();
fs::write(path, b).unwrap();
}
let before: BTreeMap<String, String> = mine
.iter()
.map(|(p, b)| (p.to_string(), fsx::sha256_bytes(b)))
.collect();
let v2: Vec<(&str, &[u8])> = vec![
("Wow.exe", b"exe-2"),
("d3d9.dll", b"official d3d9 v2"),
("dxvk.conf", b"official conf v2"),
("Data/common.MPQ", b"common-2"),
];
let (m2, s2) = (manifest("v2", &v2), Server::new(&v2));
for keep in [false, true] {
sync(d.path(), &m2, &s2, keep).unwrap();
for (p, h) in &before {
assert_eq!(
&fsx::sha256_file(&d.path().join(p)).unwrap(),
h,
"{p} must not change (keep_modified={keep})"
);
}
assert_eq!(fs::read(d.path().join("Wow.exe")).unwrap(), b"exe-2");
assert_eq!(
fs::read(d.path().join("Data/common.MPQ")).unwrap(),
b"common-2"
);
}
assert!(
!d.path().join(".coa-manager/replaced").exists(),
"nothing of the player's was displaced"
);
}
#[test]
fn an_existing_client_without_state_is_compared_by_content() {
let d = tempfile::tempdir().unwrap();
for (p, b) in V1 {
let path = d.path().join(p);
fs::create_dir_all(path.parent().unwrap()).unwrap();
fs::write(path, b).unwrap();
}
fs::write(d.path().join("Data/patch-A.MPQ"), b"patch-a-X").unwrap(); // same size, different content
fs::remove_file(d.path().join("Data/enUS/locale.MPQ")).unwrap();
fs::create_dir_all(d.path().join("WTF")).unwrap();
fs::write(d.path().join("WTF/Config.wtf"), b"mine").unwrap();
let m = manifest("v1", &V1);
let p = plan(d.path(), &m, &State::default(), &Cancel::default(), &|_| {}).unwrap();
let kinds: Vec<_> = p.items.iter().map(|i| (i.path.as_str(), i.kind)).collect();
assert_eq!(
kinds,
[
("Data/patch-A.MPQ", Kind::Modified),
("Data/enUS/locale.MPQ", Kind::Missing)
]
);
assert_eq!(p.up_to_date_files, 2);
assert_eq!(fs::read(d.path().join("WTF/Config.wtf")).unwrap(), b"mine");
}
#[test]
fn cancel_keeps_finished_files_and_the_next_run_only_fetches_the_rest() {
let d = tempfile::tempdir().unwrap();
let m = manifest("v1", &V1);
let mut s = Server::new(&V1);
let cancel = Cancel::default();
s.cancel_after = Some((AtomicUsize::new(3), cancel.clone()));
let state = State::default();
let p = plan(d.path(), &m, &state, &cancel, &|_| {}).unwrap();
let r = apply(
&Apply {
client: d.path(),
manifest: &m,
plan: &p,
keep_modified: false,
transport: &s,
objects_url: "https://x.invalid/o",
cancel: &cancel,
},
&|_| {},
);
assert!(r.is_err());
let st = load_state(d.path()).unwrap();
assert!(
st.version.is_none() && !st.files.is_empty() && st.files.len() < 4,
"unfinished but remembered: {}",
st.files.len()
);
assert!(local(d.path()).managed && local(d.path()).version.is_none());
let s2 = Server::new(&V1);
sync(d.path(), &m, &s2, false).unwrap();
assert_eq!(
s2.requested.lock().unwrap().len(),
4 - st.files.len(),
"only the missing files were requested"
);
assert_eq!(load_state(d.path()).unwrap().version.as_deref(), Some("v1"));
}
#[test]
fn a_wrong_object_never_reaches_the_client_folder() {
let d = tempfile::tempdir().unwrap();
let m = manifest("v1", &V1);
let s = Server::new(&V1);
// the server returns different bytes under the right hash
let sha = fsx::sha256_bytes(b"exe-1");
s.objects.lock().unwrap().insert(sha, b"EVIL!".to_vec());
assert!(sync(d.path(), &m, &s, false).is_err());
assert!(!d.path().join("Wow.exe").exists());
assert!(load_state(d.path()).unwrap().version.is_none());
}
}
File diff suppressed because it is too large. Load diff
+83 -16
View File
@@ -14,24 +14,34 @@ use crate::download::Cancel;
use crate::error::{Error, Result}; use crate::error::{Error, Result};
use crate::fsx; use crate::fsx;
pub const CLIENT_VERSION: &str = "2.0"; pub const CLIENT_VERSION: &str = "2.0.2";
pub const MANIFEST_FILENAME: &str = "custom_races_patch_manifest.txt"; pub const MANIFEST_FILENAME: &str = "custom_races_patch_manifest.txt";
/// Files earlier releases installed that the current release no longer ships (removed on update). /// Files earlier releases installed that the current release no longer ships (removed on update).
#[cfg(test)] #[cfg(test)]
const RETIRED_FILES: &[&str] = &["Ascension.exe"]; const RETIRED_FILES: &[&str] = &["Ascension.exe"];
/// The client archives of the coa-custom-2.0 release. The server archive is read only for its client /// The client archives of the coa-custom-2.0.2 release. Clients 1 to 9 are byte for byte the 2.0 archives and keep their
/// addons (files/addons: subclass interface, dev menu, teleports, spell activation overlay). /// 2.0 file names, so a verified copy in the cache or in Downloads is not fetched again. The server archive is read
/// only for its client addons; the SkinCollection (Skinshifter) addon in Client 17 is not installed (see RACE_ADDONS).
/// Order matters: a later archive replaces a file of an earlier one, and Client 17 carries the newer Ascension_Subclass.
pub const ARCHIVES: &[(&str, &str)] = &[ pub const ARCHIVES: &[(&str, &str)] = &[
("CoA-Custom-V2-Client-1.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-1.zip"), ("CoA-Custom-V2-Client-1.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-1.zip"),
("CoA-Custom-V2-Client-2.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-2.zip"), ("CoA-Custom-V2-Client-2.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-2.zip"),
("CoA-Custom-V2-Client-3.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-3.zip"), ("CoA-Custom-V2-Client-3.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-3.zip"),
("CoA-Custom-V2-Client-4.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-4.zip"), ("CoA-Custom-V2-Client-4.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-4.zip"),
("CoA-Custom-V2-Client-5.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-5.zip"), ("CoA-Custom-V2-Client-5.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-5.zip"),
("CoA-Custom-V2-Client-6.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-6.zip"), ("CoA-Custom-V2-Client-6.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-6.zip"),
("CoA-Custom-V2-Client-7.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-7.zip"), ("CoA-Custom-V2-Client-7.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-7.zip"),
("CoA-Custom-V2-Client-8.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-8.zip"), ("CoA-Custom-V2-Client-8.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-8.zip"),
("CoA-Custom-V2-Client-9.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-9.zip"), ("CoA-Custom-V2-Client-9.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-9.zip"),
("CoA-Custom-V2-Server.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Server.zip"), ("CoA-Custom-V2.0.2-Client-10.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-10.zip"),
("CoA-Custom-V2.0.2-Client-11.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-11.zip"),
("CoA-Custom-V2.0.2-Client-12.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-12.zip"),
("CoA-Custom-V2.0.2-Client-13.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-13.zip"),
("CoA-Custom-V2.0.2-Client-14.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-14.zip"),
("CoA-Custom-V2.0.2-Client-15.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-15.zip"),
("CoA-Custom-V2.0.2-Client-16.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-16.zip"),
("CoA-Custom-V2.0.2-Server.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Server.zip"),
("CoA-Custom-V2.0.2-Client-17.zip", "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0.2/CoA-Custom-V2.0.2-Client-17.zip"),
]; ];
pub const RACE_MPQS: &[&str] = &[ pub const RACE_MPQS: &[&str] = &[
@@ -111,6 +121,24 @@ pub const RACE_MPQS: &[&str] = &[
"patch-ZZZZZW.MPQ", "patch-ZZZZZW.MPQ",
"patch-ZZZZZX.MPQ", "patch-ZZZZZX.MPQ",
"patch-ZZZZZY.MPQ", "patch-ZZZZZY.MPQ",
"patch-ZZZZZY-SUBMA.MPQ",
"patch-ZZZZZY-SUBVA.MPQ",
"patch-ZZZZZY-SUBVB.MPQ",
"patch-ZZZZZY-SUBVC.MPQ",
"patch-ZZZZZY-SUBXA-HD.MPQ",
"patch-ZZZZZY-SUBXB-HD.MPQ",
"patch-ZZZZZY-SUBXC-HD.MPQ",
"patch-ZZZZZZ.MPQ",
"patch-ZZZZZZA.MPQ",
"patch-ZZZZZZB.MPQ",
"patch-ZZZZZZC.MPQ",
"patch-ZZZZZZD.MPQ",
"patch-ZZZZZZE.MPQ",
"patch-retail-001.mpq",
"patch-retail-002.mpq",
"patch-retail-003.mpq",
"patch-retail-004.mpq",
"patch-retail-005.mpq",
]; ];
pub const RACE_ADDONS: &[&str] = &[ pub const RACE_ADDONS: &[&str] = &[
@@ -118,13 +146,18 @@ pub const RACE_ADDONS: &[&str] = &[
"Ascension_Subclass/Ascension_Subclass.toc", "Ascension_Subclass/Ascension_Subclass.toc",
"Ascension_Subclass/Bindings.xml", "Ascension_Subclass/Bindings.xml",
"Ascension_Subclass/SubclassBar.lua", "Ascension_Subclass/SubclassBar.lua",
"Ascension_Subclass/SubclassBonk.lua",
"Ascension_Subclass/SubclassCarry.lua",
"Ascension_Subclass/SubclassCastBar.lua", "Ascension_Subclass/SubclassCastBar.lua",
"Ascension_Subclass/SubclassChoices.lua", "Ascension_Subclass/SubclassChoices.lua",
"Ascension_Subclass/SubclassGlow.lua", "Ascension_Subclass/SubclassGlow.lua",
"Ascension_Subclass/SubclassNodes.lua", "Ascension_Subclass/SubclassNodes.lua",
"Ascension_Subclass/SubclassOrbs.lua", "Ascension_Subclass/SubclassOrbs.lua",
"Ascension_Subclass/SubclassPairs.lua",
"Ascension_Subclass/SubclassPetBar.lua",
"Ascension_Subclass/SubclassPowerBar.lua", "Ascension_Subclass/SubclassPowerBar.lua",
"Ascension_Subclass/SubclassRaceBackground.lua", "Ascension_Subclass/SubclassRaceBackground.lua",
"Ascension_Subclass/Textures/IceFrame.tga",
"CoAHideArmor/CoAHideArmor.lua", "CoAHideArmor/CoAHideArmor.lua",
"CoAHideArmor/CoAHideArmor.toc", "CoAHideArmor/CoAHideArmor.toc",
"CoAQuestSafe/CoAQuestSafe.lua", "CoAQuestSafe/CoAQuestSafe.lua",
@@ -405,6 +438,8 @@ fn patch_files(client: &Path) -> Result<Vec<PatchFile>> {
include_str!("custom_races_hashes_1_9_1.json") include_str!("custom_races_hashes_1_9_1.json")
} else if manifest.lines().any(|line| line == "# CoA Custom 1.9.2") { } else if manifest.lines().any(|line| line == "# CoA Custom 1.9.2") {
include_str!("custom_races_hashes_1_9_2.json") include_str!("custom_races_hashes_1_9_2.json")
} else if manifest.lines().any(|line| line == "# CoA Custom 2.0") {
include_str!("custom_races_hashes_2_0.json")
} else { } else {
include_str!("custom_races_hashes.json") include_str!("custom_races_hashes.json")
}; };
@@ -1100,9 +1135,41 @@ fn archive_job(filename: &str, url: &str, cache: &Path) -> Result<crate::downloa
195_235_400, 195_235_400,
"0764893543084a12d15578fe734f66ba4519740794a6b3b3a38a08594c38c640", "0764893543084a12d15578fe734f66ba4519740794a6b3b3a38a08594c38c640",
), ),
"CoA-Custom-V2-Server.zip" => ( "CoA-Custom-V2.0.2-Client-10.zip" => (
63_983_587, 73_099_250,
"8970d61eea40f53cea4c27481edd85d2b2647cd32eb88932e0077da3b4a77d23", "035720776b66a18b965bbd7262154ea398f5425b8cd116fdfc5f663cd800316e",
),
"CoA-Custom-V2.0.2-Client-11.zip" => (
178_667_276,
"9a66f782be47f66ce4ec9f4f70cb1970218fe48950a031b39aa79c091008901b",
),
"CoA-Custom-V2.0.2-Client-12.zip" => (
1_053_880_101,
"f7a90890a0248967eb4572c641f5dee1bd0cafba12d1841360821b79cd5b1c3e",
),
"CoA-Custom-V2.0.2-Client-13.zip" => (
950_360_503,
"8ae00b9bebc4e21d6d6d32ddbf319c341f3c418349a3aeb3d840dffb0fa14d3f",
),
"CoA-Custom-V2.0.2-Client-14.zip" => (
971_472_467,
"511ec3fd1933b9342920262f6a5eae7e451671a49679e93612632b77c31ba57f",
),
"CoA-Custom-V2.0.2-Client-15.zip" => (
1_106_537_793,
"b65505a047508cbd15f4fec670d3953873014250efc484aa3bdb75cb3b3cbbf1",
),
"CoA-Custom-V2.0.2-Client-16.zip" => (
11_874_081,
"5442dc06147e60140c43eebfae14f6ad5f19e6fed974db471b65211497609a27",
),
"CoA-Custom-V2.0.2-Client-17.zip" => (
947_478,
"707e09c8b95926e2d83bdc16adab763901951566caf6bf4fcebfdf4d7ba0e62a",
),
"CoA-Custom-V2.0.2-Server.zip" => (
96_857_277,
"36d0cba993623064ce01f364116f99330423cec3cef22101e50cf941dfd85afe",
), ),
_ => return Err(Error::Invalid("Unknown custom races archive.".into())), _ => return Err(Error::Invalid("Unknown custom races archive.".into())),
}; };
+30 -7
View File
@@ -1,5 +1,5 @@
{ {
"CoACustomRace.exe": "428e41f5cb349f66b9ac133c711c2ffb92bd2be28c595f67268924df8a5c89cc", "CoACustomRace.exe": "8c283dcd464418e6859217dd53ad522b6a61f064c6db349c77d3cb90412690d9",
"CoAVolFog-regions.ini": "a21c2616c866ea29bdf2c75af2607e8cb982fdaaef1167375b23f1490325a0a5", "CoAVolFog-regions.ini": "a21c2616c866ea29bdf2c75af2607e8cb982fdaaef1167375b23f1490325a0a5",
"CoAVolFog.dll": "65c9abb6d44ce41bc943b25a83ab4292dd0697d6490a60385e75610fe66801ce", "CoAVolFog.dll": "65c9abb6d44ce41bc943b25a83ab4292dd0697d6490a60385e75610fe66801ce",
"CoAVolFog.ini": "921d99e3dd5a85db4d815c4baf94851639e85e74a5bb5b5f610548a0fbf94483", "CoAVolFog.ini": "921d99e3dd5a85db4d815c4baf94851639e85e74a5bb5b5f610548a0fbf94483",
@@ -4798,7 +4798,7 @@
"Data/patch-ZZZZX.MPQ": "d4b1352e62f3b47b2a8fe38cf751825f20f58e4feee0a1b04e935e2211554f30", "Data/patch-ZZZZX.MPQ": "d4b1352e62f3b47b2a8fe38cf751825f20f58e4feee0a1b04e935e2211554f30",
"Data/patch-ZZZZY.MPQ": "f9d05e9e0b0c31264c5d5dfd3bb3d486acfd0f3380186a3dec73cd2fa92c4859", "Data/patch-ZZZZY.MPQ": "f9d05e9e0b0c31264c5d5dfd3bb3d486acfd0f3380186a3dec73cd2fa92c4859",
"Data/patch-ZZZZZ.MPQ": "9d94a39178f2e8b34e612321ed1ad484d60be395520a38818546b5a8e96c94f4", "Data/patch-ZZZZZ.MPQ": "9d94a39178f2e8b34e612321ed1ad484d60be395520a38818546b5a8e96c94f4",
"Data/patch-ZZZZZA.MPQ": "23d62f92116106039afbe37e7ad8199a99ec8401e6c65728d6293c8155591e89", "Data/patch-ZZZZZA.MPQ": "dad9d283885b69d4f11daacfd667acec691220cfc22d3abbbad557739a38da51",
"Data/patch-ZZZZZB.MPQ": "07146bfd6501d3022133bf661786f1061e57393993b79b6115b12ddc77e9946c", "Data/patch-ZZZZZB.MPQ": "07146bfd6501d3022133bf661786f1061e57393993b79b6115b12ddc77e9946c",
"Data/patch-ZZZZZC.MPQ": "94b21941edef2e81b4461716f8945d7b19e8f0fb09071f4b777c26d9dccd2670", "Data/patch-ZZZZZC.MPQ": "94b21941edef2e81b4461716f8945d7b19e8f0fb09071f4b777c26d9dccd2670",
"Data/patch-ZZZZZM.MPQ": "cebe58e8c25192593afeabab9e23ec2757de6811e944823350af709ba15b6ab8", "Data/patch-ZZZZZM.MPQ": "cebe58e8c25192593afeabab9e23ec2757de6811e944823350af709ba15b6ab8",
@@ -4813,7 +4813,25 @@
"Data/patch-ZZZZZV.MPQ": "f0a7c595575ae2bbb58b6c525fc61c613ae2960e9b76742c128a83247f6b240c", "Data/patch-ZZZZZV.MPQ": "f0a7c595575ae2bbb58b6c525fc61c613ae2960e9b76742c128a83247f6b240c",
"Data/patch-ZZZZZW.MPQ": "80d9288310710cb6a438621f95dfa22798f335a347b4a62c7cabd22a656b431b", "Data/patch-ZZZZZW.MPQ": "80d9288310710cb6a438621f95dfa22798f335a347b4a62c7cabd22a656b431b",
"Data/patch-ZZZZZX.MPQ": "775539db1818068f4d676cbcb7fb1f87f61f303f0952d9843e273fe105eba019", "Data/patch-ZZZZZX.MPQ": "775539db1818068f4d676cbcb7fb1f87f61f303f0952d9843e273fe105eba019",
"Data/patch-ZZZZZY-SUBMA.MPQ": "389255c799b27a8c82d2f39911433cc3e91c4f4ad1f244cccc9661ccb1dc82a2",
"Data/patch-ZZZZZY-SUBVA.MPQ": "93c6aad4289ade86eee6c49377d21f34b7b29fa92edb31bb1798df9cc66b1494",
"Data/patch-ZZZZZY-SUBVB.MPQ": "ea1d10a77c84dae77f137ff7307bc00e27891ee873789a58ddf924681e0ada5b",
"Data/patch-ZZZZZY-SUBVC.MPQ": "23b02a87cde6a443046de12ac13fc7b1ea3e1a74e7f5ce3723292da24ff3f099",
"Data/patch-ZZZZZY-SUBXA-HD.MPQ": "19c88cd704511375ee98730d05e9aded49894c9497d9ee2ad7823028b0104668",
"Data/patch-ZZZZZY-SUBXB-HD.MPQ": "7fb6172edd64f6fc27816964d0ed13ba351afc9c07b2920564a5d41694e5ae1b",
"Data/patch-ZZZZZY-SUBXC-HD.MPQ": "765a0158bc501c435b828e64923f06f981a1408ea27b42a38b9ea2b467dcd54f",
"Data/patch-ZZZZZY.MPQ": "05b8cbd7a45cc9933a84ee991ff3193063cb2d040296843b947e190e8c64e741", "Data/patch-ZZZZZY.MPQ": "05b8cbd7a45cc9933a84ee991ff3193063cb2d040296843b947e190e8c64e741",
"Data/patch-ZZZZZZ.MPQ": "b3f95a34f2c5d2157f54191124e864db4d2cb559156d2b7fccb119d9ae247ec8",
"Data/patch-ZZZZZZA.MPQ": "2c8f9caef8e3f3cf33b9b35bf5782123b4759a8fecb92a326be59d2f918608f7",
"Data/patch-ZZZZZZB.MPQ": "cb3107c155b57e6b77e92d881be3f2113a5401c101be185175d06b0a7ffdf6ab",
"Data/patch-ZZZZZZC.MPQ": "0fbd43a7208a11ee02a2ed31ed1da90bf4240074e7e508ed801f20de50e697d4",
"Data/patch-ZZZZZZD.MPQ": "53f4dac665280030ac8764cd2b45fc8ff65c5e85981b3f3ddcff34d5bc8d3c7f",
"Data/patch-ZZZZZZE.MPQ": "64fb42fc12367bc0b8b95489315c882d36c195c90732bd5a8ed449f7373653cf",
"Data/patch-retail-001.mpq": "1b0fafbdc6d01b92b5f09566f05510361972879a0407a79c03d1146f3440b764",
"Data/patch-retail-002.mpq": "6802c1c9530a9fb4107fd56bf18185484257cda69ead36a170ab557cea5b64d3",
"Data/patch-retail-003.mpq": "ae3f030fdb0b340a420ee9a3f027c47798e2646ab73bcac62b6f6b6c8589ca9b",
"Data/patch-retail-004.mpq": "ed857958adcf96266d25c2ab2da882359fc302d9d2f2da9032010061a0ca0a37",
"Data/patch-retail-005.mpq": "4fb237c92ccfccb7de90ff3ef184d04edb08dfda0ed2b2f16de802dff0455a5e",
"EsteriaAppearance.bin": "90d9cfaeaf6de10f014f1d1610ea10453ec9b240255759aea99513cac488a3ec", "EsteriaAppearance.bin": "90d9cfaeaf6de10f014f1d1610ea10453ec9b240255759aea99513cac488a3ec",
"EsteriaAppearance.dll": "88e268d3be9eca3b0644f543d823f4bdcc04a9700a6e8ed73fd2a1260ad191af", "EsteriaAppearance.dll": "88e268d3be9eca3b0644f543d823f4bdcc04a9700a6e8ed73fd2a1260ad191af",
"EsteriaAppearanceGeometry.bin": "cacd2086eabf43391bca07b622e17444de91b30593827e9e1e54758fe4dcd8e7", "EsteriaAppearanceGeometry.bin": "cacd2086eabf43391bca07b622e17444de91b30593827e9e1e54758fe4dcd8e7",
@@ -4894,17 +4912,22 @@
"EsteriaVulperaTextures.bin": "1ab844e74684aced2b069f1b91cd563aade45e05bd5e23f866a6c0c301cb098e", "EsteriaVulperaTextures.bin": "1ab844e74684aced2b069f1b91cd563aade45e05bd5e23f866a6c0c301cb098e",
"EsteriaWretched.bin": "a407b49ef55e6d76411bee2f522a2087b3571e8ec5d12b630a859cdbcdbde890", "EsteriaWretched.bin": "a407b49ef55e6d76411bee2f522a2087b3571e8ec5d12b630a859cdbcdbde890",
"EsteriaWretchedTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433", "EsteriaWretchedTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"Interface/AddOns/Ascension_Subclass/Ascension_Subclass.lua": "30710edd3d3bbdf393c6665850bd022f5cabffa58ae66bd1476769799635c7a0", "Interface/AddOns/Ascension_Subclass/Ascension_Subclass.lua": "b769f6c64d93c5e1850456782cfaebca073e97ad23fbf5e6b0068a58399d64ad",
"Interface/AddOns/Ascension_Subclass/Ascension_Subclass.toc": "9498ac1dd7f810d3314b0bf4a2404c3f49df9825b73469952a72c28c2419ff7c", "Interface/AddOns/Ascension_Subclass/Ascension_Subclass.toc": "c840e4396adb66534586f5d55ee58586d0f2343108383322e6de5bbbceee563c",
"Interface/AddOns/Ascension_Subclass/Bindings.xml": "cd057da400c0d40277ca5b310f021b78ac2b4e95b6a9445460b8651fffa83b8e", "Interface/AddOns/Ascension_Subclass/Bindings.xml": "cd057da400c0d40277ca5b310f021b78ac2b4e95b6a9445460b8651fffa83b8e",
"Interface/AddOns/Ascension_Subclass/SubclassBar.lua": "c3b809a024780ba7fac3689b329dc3b906aa046ede233fc5ef522a029d7ed2fe", "Interface/AddOns/Ascension_Subclass/SubclassBar.lua": "af91304e5628d6e0327dfa2472fcbf9ad317ee32ca7777b3c09cfe60062174fe",
"Interface/AddOns/Ascension_Subclass/SubclassBonk.lua": "3cdc86792529c75d4186accaa1ed5b8a7541c17b0b9a022cf3ebdadf802b4c54",
"Interface/AddOns/Ascension_Subclass/SubclassCarry.lua": "e915f4a2e52f0d417e46654d5e5d438cc258be429661018c0155c4cd007aacb9",
"Interface/AddOns/Ascension_Subclass/SubclassCastBar.lua": "395ccda4bc0733cfa34dd506a2578ae73867305b5cd09dc988ff615a7d8a1e78", "Interface/AddOns/Ascension_Subclass/SubclassCastBar.lua": "395ccda4bc0733cfa34dd506a2578ae73867305b5cd09dc988ff615a7d8a1e78",
"Interface/AddOns/Ascension_Subclass/SubclassChoices.lua": "3e313f30eade45b32c7827d8e045ed74ff05ff5fb9263d8f28e4c6c98ad74288", "Interface/AddOns/Ascension_Subclass/SubclassChoices.lua": "3e313f30eade45b32c7827d8e045ed74ff05ff5fb9263d8f28e4c6c98ad74288",
"Interface/AddOns/Ascension_Subclass/SubclassGlow.lua": "c9a4c900c97a4f215f00ed3fd3c703058522c4f5180d8c4dd76e60b1611e0366", "Interface/AddOns/Ascension_Subclass/SubclassGlow.lua": "c9a4c900c97a4f215f00ed3fd3c703058522c4f5180d8c4dd76e60b1611e0366",
"Interface/AddOns/Ascension_Subclass/SubclassNodes.lua": "cdc91d73d066664133bc3f621c4994360474486bd6ffe1bc96964bfc35faf2c7", "Interface/AddOns/Ascension_Subclass/SubclassNodes.lua": "cdc91d73d066664133bc3f621c4994360474486bd6ffe1bc96964bfc35faf2c7",
"Interface/AddOns/Ascension_Subclass/SubclassOrbs.lua": "cc29fbabe955cdd994d0f3281dff758ea4146dbe5fd6e65e0ad87b8b5fd2238e", "Interface/AddOns/Ascension_Subclass/SubclassOrbs.lua": "e4d337628d267f338846b5d0aefe5204de91e1dec6d933a4bca208eccfdf0052",
"Interface/AddOns/Ascension_Subclass/SubclassPairs.lua": "670b67e6fc400ead68ef0324172467219e14342dce9b9015e674414d1a6efc5d",
"Interface/AddOns/Ascension_Subclass/SubclassPetBar.lua": "ab487a1b2eabef221a2c23eb8e3f52dfb90194a75db46c88c006e3fad3ac5926",
"Interface/AddOns/Ascension_Subclass/SubclassPowerBar.lua": "609819307864810cdc36bb52305ab0525094466e5e2be135d96c878081cf69f6", "Interface/AddOns/Ascension_Subclass/SubclassPowerBar.lua": "609819307864810cdc36bb52305ab0525094466e5e2be135d96c878081cf69f6",
"Interface/AddOns/Ascension_Subclass/SubclassRaceBackground.lua": "b63fa918438386a0c1cd861b4655785cd63b1089e721c6e3bd9585e372950b68", "Interface/AddOns/Ascension_Subclass/SubclassRaceBackground.lua": "d38352928ee3e546eaa25c77e0e961ddfe1bd383020904f84907a4b3f5fce132",
"Interface/AddOns/Ascension_Subclass/Textures/IceFrame.tga": "91cefa31a6f32a847c888651bc3f90a2a91fb07b7a33c74bf8090efc92d22705",
"Interface/AddOns/CoAHideArmor/CoAHideArmor.lua": "8c1c7403524fc9bd56c0809b4101b141da700ba163701209bf1420f2ef106aa7", "Interface/AddOns/CoAHideArmor/CoAHideArmor.lua": "8c1c7403524fc9bd56c0809b4101b141da700ba163701209bf1420f2ef106aa7",
"Interface/AddOns/CoAHideArmor/CoAHideArmor.toc": "123580d92fd5ceee258e96296f42c359b7e83cdff151af49c50c6c4e2059677c", "Interface/AddOns/CoAHideArmor/CoAHideArmor.toc": "123580d92fd5ceee258e96296f42c359b7e83cdff151af49c50c6c4e2059677c",
"Interface/AddOns/CoAQuestSafe/CoAQuestSafe.lua": "062de55c91228971553f482fd2c8753f4752993b4e8e49d4ded04fa18b98bde7", "Interface/AddOns/CoAQuestSafe/CoAQuestSafe.lua": "062de55c91228971553f482fd2c8753f4752993b4e8e49d4ded04fa18b98bde7",
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -178,7 +178,7 @@ impl ErrorCode {
), ),
ErrorCode::CompanionCommandUnsupported => ( ErrorCode::CompanionCommandUnsupported => (
"This server version can not do that yet", "This server version can not do that yet",
"The bot module of this server build has no such command. Update the server, or restart it to stop what is running.", "The bot module on this server is older than this Manager and does not know this command. Update the bot module on the Modules page (or update the server), then restart the world.",
&[ShowDetails], &[ShowDetails],
), ),
ErrorCode::Unknown => ("Something went wrong", "See the technical details.", &[ShowDetails]), ErrorCode::Unknown => ("Something went wrong", "See the technical details.", &[ShowDetails]),
+169 -21
View File
@@ -5,7 +5,7 @@
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use std::time::Duration; use std::time::Duration;
use chrono::{Local, NaiveDateTime, NaiveTime, Timelike}; use chrono::{Datelike, Local, NaiveDateTime, NaiveTime, Timelike};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use crate::error::{Error, Result}; use crate::error::{Error, Result};
@@ -20,14 +20,53 @@ const LATE: Duration = Duration::from_secs(15 * 60);
/// A world that has not come back within this time no longer counts as restarting. /// A world that has not come back within this time no longer counts as restarting.
const UNDER_WAY_LIMIT: Duration = Duration::from_secs(45 * 60); const UNDER_WAY_LIMIT: Duration = Duration::from_secs(45 * 60);
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize, Default)]
#[serde(rename_all = "lowercase")]
pub enum Weekday {
Monday,
Tuesday,
Wednesday,
Thursday,
Friday,
Saturday,
#[default]
Sunday,
}
impl Weekday {
fn to_chrono(self) -> chrono::Weekday {
match self {
Self::Monday => chrono::Weekday::Mon,
Self::Tuesday => chrono::Weekday::Tue,
Self::Wednesday => chrono::Weekday::Wed,
Self::Thursday => chrono::Weekday::Thu,
Self::Friday => chrono::Weekday::Fri,
Self::Saturday => chrono::Weekday::Sat,
Self::Sunday => chrono::Weekday::Sun,
}
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct DueRestart {
pub moment: NaiveDateTime,
pub warning_minutes: u32,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase", default)]
pub struct RestartSchedule { pub struct RestartSchedule {
pub enabled: bool, pub enabled: bool,
/// Local time, `HH:MM`. /// Local time, `HH:MM`.
pub time: String, pub time: String,
/// The in-game countdown before the restart, in minutes (1-60). /// The in-game countdown before the restart, in minutes (1-60).
pub warning_minutes: u32, pub warning_minutes: u32,
pub weekly_enabled: bool,
pub weekly_day: Weekday,
/// Local time for weekly restart, `HH:MM`.
pub weekly_time: String,
/// The in-game countdown before the weekly restart, in minutes (1-60).
pub weekly_warning_minutes: u32,
} }
impl Default for RestartSchedule { impl Default for RestartSchedule {
@@ -36,35 +75,72 @@ impl Default for RestartSchedule {
enabled: false, enabled: false,
time: "05:00".into(), time: "05:00".into(),
warning_minutes: 5, warning_minutes: 5,
weekly_enabled: false,
weekly_day: Weekday::Sunday,
weekly_time: "05:00".into(),
weekly_warning_minutes: 5,
} }
} }
} }
impl RestartSchedule { impl RestartSchedule {
fn at(&self) -> Option<NaiveTime> { fn parse_time(text: &str) -> Option<NaiveTime> {
NaiveTime::parse_from_str(self.time.trim(), "%H:%M").ok() NaiveTime::parse_from_str(text.trim(), "%H:%M").ok()
} }
fn validate(&self) -> Result<()> { fn validate_entry(time: &str, warning_minutes: u32) -> Result<()> {
if self.at().is_none() { if Self::parse_time(time).is_none() {
return Err(Error::Invalid("The restart time must be HH:MM, for example 05:00.".into())); return Err(Error::Invalid("The restart time must be HH:MM, for example 05:00.".into()));
} }
if !(1..=60).contains(&self.warning_minutes) { if !(1..=60).contains(&warning_minutes) {
return Err(Error::Invalid("The restart warning must be 1 to 60 minutes.".into())); return Err(Error::Invalid("The restart warning must be 1 to 60 minutes.".into()));
} }
Ok(()) Ok(())
} }
/// The scheduled moment of `now`'s day, when a restart is due at `now` for a world started at `started`: fn validate(&self) -> Result<()> {
/// the moment has passed by less than [`LATE`] and the world was already running before it. if self.enabled {
pub fn due(&self, now: NaiveDateTime, started: NaiveDateTime) -> Option<NaiveDateTime> { Self::validate_entry(&self.time, self.warning_minutes)?;
if !self.enabled {
return None;
} }
let moment = now.date().and_time(self.at()?); if self.weekly_enabled {
Self::validate_entry(&self.weekly_time, self.weekly_warning_minutes)?;
}
Ok(())
}
fn due_at(time_str: &str, now: NaiveDateTime, started: NaiveDateTime) -> Option<NaiveDateTime> {
let at = Self::parse_time(time_str)?;
let moment = now.date().and_time(at);
let late = now.signed_duration_since(moment).to_std().ok()?; let late = now.signed_duration_since(moment).to_std().ok()?;
(late <= LATE && started < moment).then_some(moment) (late <= LATE && started < moment).then_some(moment)
} }
/// The scheduled moment of `now`'s day, when a daily or weekly restart is due at `now` for a world started at `started`:
/// the moment has passed by less than [`LATE`] and the world was already running before it.
pub fn due_restart(&self, now: NaiveDateTime, started: NaiveDateTime) -> Option<DueRestart> {
if self.weekly_enabled && now.weekday() == self.weekly_day.to_chrono() {
if let Some(moment) = Self::due_at(&self.weekly_time, now, started) {
return Some(DueRestart {
moment,
warning_minutes: self.weekly_warning_minutes,
});
}
}
if self.enabled {
if let Some(moment) = Self::due_at(&self.time, now, started) {
return Some(DueRestart {
moment,
warning_minutes: self.warning_minutes,
});
}
}
None
}
/// The scheduled moment of `now`'s day, when a restart is due at `now` for a world started at `started`.
pub fn due(&self, now: NaiveDateTime, started: NaiveDateTime) -> Option<NaiveDateTime> {
self.due_restart(now, started).map(|d| d.moment)
}
} }
/// The folder whose schedule a world follows: an extra world (`<server>/.realms/<name>`) follows its server's. /// The folder whose schedule a world follows: an extra world (`<server>/.realms/<name>`) follows its server's.
@@ -84,11 +160,14 @@ pub fn load(root: &Path) -> RestartSchedule {
pub fn save(root: &Path, schedule: &RestartSchedule) -> Result<RestartSchedule> { pub fn save(root: &Path, schedule: &RestartSchedule) -> Result<RestartSchedule> {
let mut schedule = schedule.clone(); let mut schedule = schedule.clone();
schedule.time = schedule.time.trim().to_string(); schedule.time = schedule.time.trim().to_string();
if schedule.enabled { schedule.weekly_time = schedule.weekly_time.trim().to_string();
schedule.validate()?; schedule.validate()?;
} else if schedule.at().is_none() { if !schedule.enabled && RestartSchedule::parse_time(&schedule.time).is_none() {
schedule.time = RestartSchedule::default().time; schedule.time = RestartSchedule::default().time;
} }
if !schedule.weekly_enabled && RestartSchedule::parse_time(&schedule.weekly_time).is_none() {
schedule.weekly_time = RestartSchedule::default().weekly_time;
}
crate::fsx::atomic_write_json(&owner(root).join(FILE), &schedule)?; crate::fsx::atomic_write_json(&owner(root).join(FILE), &schedule)?;
Ok(schedule) Ok(schedule)
} }
@@ -127,7 +206,7 @@ mod tests {
#[test] #[test]
fn a_restart_is_due_once_after_its_time_for_a_world_that_ran_before_it() { fn a_restart_is_due_once_after_its_time_for_a_world_that_ran_before_it() {
let s = RestartSchedule { enabled: true, time: "05:00".into(), warning_minutes: 5 }; let s = RestartSchedule { enabled: true, time: "05:00".into(), warning_minutes: 5, ..RestartSchedule::default() };
let started = at("2026-11-14 20:00"); let started = at("2026-11-14 20:00");
assert_eq!(s.due(at("2026-11-15 04:59"), started), None); assert_eq!(s.due(at("2026-11-15 04:59"), started), None);
assert_eq!(s.due(at("2026-11-15 05:00"), started), Some(at("2026-11-15 05:00"))); assert_eq!(s.due(at("2026-11-15 05:00"), started), Some(at("2026-11-15 05:00")));
@@ -140,19 +219,88 @@ mod tests {
assert_eq!(off.due(at("2026-11-15 05:00"), started), None); assert_eq!(off.due(at("2026-11-15 05:00"), started), None);
} }
#[test]
fn weekly_restart_triggers_only_on_configured_weekday_and_independently_of_daily() {
// 2026-11-15 is Sunday; 2026-11-16 is Monday.
let s = RestartSchedule {
enabled: false,
weekly_enabled: true,
weekly_day: Weekday::Sunday,
weekly_time: "04:00".into(),
weekly_warning_minutes: 15,
..RestartSchedule::default()
};
let started = at("2026-11-14 20:00");
assert_eq!(s.due_restart(at("2026-11-15 03:59"), started), None);
assert_eq!(
s.due_restart(at("2026-11-15 04:05"), started),
Some(DueRestart { moment: at("2026-11-15 04:00"), warning_minutes: 15 })
);
// Monday does not trigger Sunday's weekly restart.
assert_eq!(s.due_restart(at("2026-11-16 04:05"), started), None);
// Both daily and weekly enabled: each triggers on its own schedule.
let both = RestartSchedule { enabled: true, time: "05:00".into(), warning_minutes: 5, ..s };
assert_eq!(
both.due_restart(at("2026-11-15 04:05"), started),
Some(DueRestart { moment: at("2026-11-15 04:00"), warning_minutes: 15 })
);
assert_eq!(
both.due_restart(at("2026-11-15 05:02"), at("2026-11-15 04:16")),
Some(DueRestart { moment: at("2026-11-15 05:00"), warning_minutes: 5 })
);
}
#[test] #[test]
fn schedules_are_validated_and_extra_worlds_follow_their_server() { fn schedules_are_validated_and_extra_worlds_follow_their_server() {
let d = tempfile::tempdir().unwrap(); let d = tempfile::tempdir().unwrap();
assert_eq!(load(d.path()), RestartSchedule::default()); assert_eq!(load(d.path()), RestartSchedule::default());
let bad = RestartSchedule { enabled: true, time: "25:00".into(), warning_minutes: 5 }; let bad = RestartSchedule { enabled: true, time: "25:00".into(), warning_minutes: 5, ..RestartSchedule::default() };
assert!(save(d.path(), &bad).is_err()); assert!(save(d.path(), &bad).is_err());
let quiet = RestartSchedule { enabled: true, time: "05:00".into(), warning_minutes: 0 }; let quiet = RestartSchedule { enabled: true, time: "05:00".into(), warning_minutes: 0, ..RestartSchedule::default() };
assert!(save(d.path(), &quiet).is_err()); assert!(save(d.path(), &quiet).is_err());
let good = RestartSchedule { enabled: true, time: " 04:30 ".into(), warning_minutes: 10 }; let bad_weekly = RestartSchedule {
assert_eq!(save(d.path(), &good).unwrap().time, "04:30"); weekly_enabled: true,
weekly_time: "99:00".into(),
..RestartSchedule::default()
};
assert!(save(d.path(), &bad_weekly).is_err());
let quiet_weekly = RestartSchedule {
weekly_enabled: true,
weekly_warning_minutes: 61,
..RestartSchedule::default()
};
assert!(save(d.path(), &quiet_weekly).is_err());
let good = RestartSchedule {
enabled: true,
time: " 04:30 ".into(),
warning_minutes: 10,
weekly_enabled: true,
weekly_day: Weekday::Wednesday,
weekly_time: " 03:15 ".into(),
weekly_warning_minutes: 20,
};
let saved = save(d.path(), &good).unwrap();
assert_eq!(saved.time, "04:30");
assert_eq!(saved.weekly_time, "03:15");
assert_eq!(saved.weekly_day, Weekday::Wednesday);
let extra = d.path().join(".realms/secondary"); let extra = d.path().join(".realms/secondary");
std::fs::create_dir_all(&extra).unwrap(); std::fs::create_dir_all(&extra).unwrap();
assert!(load(&extra).enabled); assert!(load(&extra).enabled);
assert!(load(&extra).weekly_enabled);
// Legacy schedule JSON without weekly fields loads cleanly with defaults.
std::fs::write(
d.path().join(FILE),
r#"{"enabled":true,"time":"06:00","warningMinutes":10}"#,
)
.unwrap();
let legacy = load(d.path());
assert!(legacy.enabled);
assert_eq!(legacy.time, "06:00");
assert!(!legacy.weekly_enabled);
assert_eq!(legacy.weekly_day, Weekday::Sunday);
assert!(!under_way(d.path())); assert!(!under_way(d.path()));
mark_under_way(d.path()).unwrap(); mark_under_way(d.path()).unwrap();
assert!(under_way(d.path())); assert!(under_way(d.path()));
+17 -3
View File
@@ -174,7 +174,13 @@ fn spawn_relay(root: &Path, launcher: Option<&Path>) -> Result<Proc> {
pub fn watch_world(root: &Path, launcher: Option<&Path>, offset: i32, log: Progress) -> Result<()> { pub fn watch_world(root: &Path, launcher: Option<&Path>, offset: i32, log: Progress) -> Result<()> {
squid::validate_bots(root)?; squid::validate_bots(root)?;
let mut relay: Option<Proc> = None; let mut relay: Option<Proc> = None;
let mut last_log_clean = Instant::now();
loop { loop {
if let Some(report) = crate::server_logging::auto_clean_if_needed(root) {
if report.freed_bytes > 0 {
log(&format!("Auto-cleaned server logs ({} MB freed).", report.freed_bytes / (1024 * 1024)));
}
}
let world = spawn_child(root, "world", &root.join("Core/worldserver.exe"), &["-c", "configs/worldserver.conf"], &root.join("Core"), &root.join("Core/Logs/world-console.log"))?; let world = spawn_child(root, "world", &root.join("Core/worldserver.exe"), &["-c", "configs/worldserver.conf"], &root.join("Core"), &root.join("Core/Logs/world-console.log"))?;
let started = schedule::now(); let started = schedule::now();
let mut requested = false; let mut requested = false;
@@ -204,8 +210,8 @@ pub fn watch_world(root: &Path, launcher: Option<&Path>, offset: i32, log: Progr
} }
if !requested { if !requested {
let plan = schedule::load(root); let plan = schedule::load(root);
if plan.due(schedule::now(), started).is_some() { if let Some(due) = plan.due_restart(schedule::now(), started) {
let seconds = plan.warning_minutes * 60; let seconds = due.warning_minutes * 60;
let asked = Settings::load(root, offset).and_then(|cfg| { let asked = Settings::load(root, offset).and_then(|cfg| {
crate::ra::Ra::connect_to(cfg.ra_port, &cfg.ra_username, &cfg.ra_password) crate::ra::Ra::connect_to(cfg.ra_port, &cfg.ra_username, &cfg.ra_password)
.and_then(|mut ra| ra.run(&format!("server restart {seconds}"))) .and_then(|mut ra| ra.run(&format!("server restart {seconds}")))
@@ -214,12 +220,20 @@ pub fn watch_world(root: &Path, launcher: Option<&Path>, offset: i32, log: Progr
Ok(_) => { Ok(_) => {
schedule::mark_under_way(root)?; schedule::mark_under_way(root)?;
requested = true; requested = true;
log(&format!("Scheduled restart: the world restarts in {} minutes.", plan.warning_minutes)); log(&format!("Scheduled restart: the world restarts in {} minutes.", due.warning_minutes));
} }
Err(e) => log(&format!("Scheduled restart could not be requested ({e}); retrying.")), Err(e) => log(&format!("Scheduled restart could not be requested ({e}); retrying.")),
} }
} }
} }
if last_log_clean.elapsed() >= Duration::from_secs(300) {
last_log_clean = Instant::now();
if let Some(report) = crate::server_logging::auto_clean_if_needed(root) {
if report.freed_bytes > 0 {
log(&format!("Auto-cleaned server logs ({} MB freed).", report.freed_bytes / (1024 * 1024)));
}
}
}
} }
std::thread::sleep(Duration::from_secs(2)); std::thread::sleep(Duration::from_secs(2));
}; };
-1
View File
@@ -20,7 +20,6 @@ pub mod character_start_check;
pub mod cleanbase; pub mod cleanbase;
pub mod client; pub mod client;
pub mod client_graphics; pub mod client_graphics;
pub mod clientdl;
pub mod companions; pub mod companions;
pub mod config; pub mod config;
pub mod console; pub mod console;
+59 -1
View File
@@ -168,6 +168,9 @@ pub struct ModuleView {
pub component_type: ComponentType, pub component_type: ComponentType,
pub can_remove: bool, pub can_remove: bool,
pub source_commit: Option<String>, pub source_commit: Option<String>,
/// A newer build of this module is recommended by the server's core; updating is the owner's choice.
#[serde(default)]
pub available_commit: Option<String>,
pub part_of: Option<String>, pub part_of: Option<String>,
} }
@@ -229,6 +232,32 @@ fn installed_module_commits(root: &Path) -> BTreeMap<String, String> {
Default::default() Default::default()
} }
/// The companion bots of this server build play Wildcard and Warcraft Reborn: their bot profiles for the standard
/// classes are in the world server or its bots plugin. Older builds only know Conquest of Azeroth characters.
pub fn companions_on_other_realms(root: &Path) -> bool {
use std::collections::HashMap;
use std::sync::{Mutex, OnceLock};
static SEEN: OnceLock<Mutex<HashMap<(PathBuf, u64, Option<std::time::SystemTime>), bool>>> = OnceLock::new();
const MARKER: &[u8] = b"Druid_Guardian_Tank";
let mut files = vec![crate::layout::executables(root).0];
if let Ok(plugins) = fs::read_dir(root.join("Core/plugins")) {
files.extend(plugins.flatten().map(|e| e.path()).filter(|p| p.extension().is_some_and(|x| x.eq_ignore_ascii_case("dll"))));
}
files.into_iter().any(|file| {
let Ok(meta) = fs::metadata(&file) else { return false };
let key = (file.clone(), meta.len(), meta.modified().ok());
let seen = SEEN.get_or_init(Mutex::default);
if let Some(found) = seen.lock().ok().and_then(|s| s.get(&key).copied()) {
return found;
}
let found = fs::read(&file).is_ok_and(|bytes| bytes.windows(MARKER.len()).any(|w| w == MARKER));
if let Ok(mut s) = seen.lock() {
s.insert(key, found);
}
found
})
}
fn list_in(cat: &[Entry], root: &Path) -> Vec<ModuleView> { fn list_in(cat: &[Entry], root: &Path) -> Vec<ModuleView> {
let installed_commits = installed_module_commits(root); let installed_commits = installed_module_commits(root);
let plugin_reg = crate::plugins::load_registry(root).ok(); let plugin_reg = crate::plugins::load_registry(root).ok();
@@ -405,7 +434,9 @@ fn list_in(cat: &[Entry], root: &Path) -> Vec<ModuleView> {
}; };
let dependency_missing = e.id == "dungeon-clear" && !is_squid_active; let dependency_missing = e.id == "dungeon-clear" && !is_squid_active;
let blocked = dependency_missing let blocked = dependency_missing
|| (wildcard && matches!(e.id.as_str(), "companions" | "playerbots" | "dungeon-clear")); || (wildcard
&& (matches!(e.id.as_str(), "playerbots" | "dungeon-clear")
|| (e.id == "companions" && !companions_on_other_realms(root))));
let version = if let Some(p) = plugin_entry { let version = if let Some(p) = plugin_entry {
Some(p.version.clone()) Some(p.version.clone())
} else if e.id == "playerbots" { } else if e.id == "playerbots" {
@@ -465,6 +496,7 @@ fn list_in(cat: &[Entry], root: &Path) -> Vec<ModuleView> {
component_type, component_type,
can_remove, can_remove,
source_commit, source_commit,
available_commit: None,
part_of: e.part_of, part_of: e.part_of,
} }
}) })
@@ -495,6 +527,10 @@ fn list_in(cat: &[Entry], root: &Path) -> Vec<ModuleView> {
views[idx].version = Some(plugin_entry.version.clone()); views[idx].version = Some(plugin_entry.version.clone());
views[idx].component_type = ComponentType::DynamicDll; views[idx].component_type = ComponentType::DynamicDll;
views[idx].can_remove = true; views[idx].can_remove = true;
if views[idx].source_commit.is_none() {
views[idx].source_commit = crate::build_engine::read_build_recipe(root, plugin_id).and_then(|r| r.source_commit);
}
views[idx].available_commit = crate::rebuild::available_update(root, plugin_id);
continue; continue;
} }
@@ -564,6 +600,7 @@ fn list_in(cat: &[Entry], root: &Path) -> Vec<ModuleView> {
component_type: ComponentType::DynamicDll, component_type: ComponentType::DynamicDll,
can_remove: true, can_remove: true,
source_commit, source_commit,
available_commit: None,
part_of: None, part_of: None,
}); });
} }
@@ -1151,6 +1188,27 @@ mod tests {
assert!(meta.join("backups").exists()); assert!(meta.join("backups").exists());
} }
#[test]
fn companions_open_on_other_realms_only_with_a_build_that_plays_them() {
let temp = tempfile::tempdir().unwrap();
let root = temp.path().join("server");
fs::create_dir_all(dir(&root)).unwrap();
fs::create_dir_all(root.join("Settings")).unwrap();
fs::write(root.join("Settings/realm-profile.json"), r#"{"active":"wildcard","wildcard_created":true}"#).unwrap();
for e in catalog().iter().filter(|e| matches!(e.id.as_str(), "companions" | "playerbots")) {
fs::write(dir(&root).join(format!("{}.dist", e.conf)), format!("{} = 0\n", e.enable_key)).unwrap();
}
let exe = crate::layout::executables(&root).0;
fs::write(&exe, b"an old world server").unwrap();
let view = |id: &str| list(&root).into_iter().find(|m| m.id == id).unwrap();
assert_eq!(view("companions").compatibility, "unsupported");
fs::write(&exe, b"profiles ... Druid_Guardian_Tank ... a new world server").unwrap();
assert!(companions_on_other_realms(&root));
assert_eq!(view("companions").compatibility, "experimental");
assert!(view("companions").switchable);
assert_eq!(view("playerbots").compatibility, "unsupported", "SQUID stays CoA-only");
}
fn test_catalog() -> Vec<Entry> { fn test_catalog() -> Vec<Entry> {
let one = |id: &str, name: &str, conf: &str, key: &str| Entry { let one = |id: &str, name: &str, conf: &str, key: &str| Entry {
id: id.into(), id: id.into(),
+66 -18
View File
@@ -59,7 +59,7 @@ fn hide_window(cmd: &mut Command) {
let _ = cmd; let _ = cmd;
} }
const SCRIPT: &str = r#"param([string]$Dir, [string]$Url, [string]$InstallPath, [string]$Components) const SCRIPT: &str = r#"param([string]$Dir, [string]$Url, [string]$InstallPath, [string]$Components, [switch]$NewInstance)
$ErrorActionPreference = 'Stop' $ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue' $ProgressPreference = 'SilentlyContinue'
New-Item -ItemType Directory -Force -Path $Dir | Out-Null New-Item -ItemType Directory -Force -Path $Dir | Out-Null
@@ -71,35 +71,67 @@ if ($sig.Status -ne 'Valid' -or $sig.SignerCertificate.Subject -notmatch 'O=Micr
"RESULT=bad-signature $($sig.Status)"; exit 0 "RESULT=bad-signature $($sig.Status)"; exit 0
} }
$a = @() $a = @()
if ($InstallPath) { $a += @('modify', '--installPath', ('"' + $InstallPath + '"')) } if ($InstallPath -and $NewInstance) { $a += @('--installPath', ('"' + $InstallPath + '"')) }
elseif ($InstallPath) { $a += @('modify', '--installPath', ('"' + $InstallPath + '"')) }
$a += @('--wait', '--norestart', '--nocache') $a += @('--wait', '--norestart', '--nocache')
foreach ($c in $Components.Split(',')) { $a += @('--add', $c) } foreach ($c in $Components.Split(',')) { $a += @('--add', $c) }
try { $p = Start-Process -FilePath $bt -ArgumentList $a -Wait -PassThru } catch { "RESULT=not-started $($_.Exception.Message)"; exit 0 } try { $p = Start-Process -FilePath $bt -ArgumentList $a -Wait -PassThru } catch { "RESULT=not-started $($_.Exception.Message)"; exit 0 }
"RESULT=exit $($p.ExitCode)" "RESULT=exit $($p.ExitCode)"
"#; "#;
/// Where the second, separate Build Tools instance goes when the existing one cannot supply the compiler.
fn separate_instance_dir() -> PathBuf {
let pf86 = std::env::var("ProgramFiles(x86)").unwrap_or_else(|_| "C:\\Program Files (x86)".into());
Path::new(&pf86).join("Microsoft Visual Studio").join("18").join("BuildTools-CoA")
}
/// Whether the installer finished but the compiler this core's SDK names is still missing. `modify --add` keeps
/// the toolset an existing instance already has, so an older instance stays on an older compiler build.
fn needs_separate_instance(modified_existing: bool, installed: bool, toolchain: &ToolchainStatus) -> bool {
modified_existing && installed && !toolchain.ready && toolchain.required_cl_version.is_some()
}
/// One run of Microsoft's installer: `(result line, stderr)`. With `new_instance` the instance is installed at
/// `install_path` as a separate one next to the existing Build Tools; otherwise `install_path` is modified.
fn run_installer(install_path: &str, new_instance: bool) -> Result<(String, String)> {
let dir = std::env::temp_dir().join("coa-msvc-setup");
std::fs::create_dir_all(&dir)?;
let script = dir.join("install-build-tools.ps1");
std::fs::write(&script, SCRIPT)?;
let mut cmd = Command::new("powershell.exe");
cmd.args(["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File"])
.arg(&script)
.args(["-Dir"]).arg(dir.join("bootstrapper"))
.args(["-Url", BOOTSTRAPPER_URL, "-InstallPath", install_path, "-Components", &COMPONENTS.join(",")]);
if new_instance {
cmd.arg("-NewInstance");
}
hide_window(&mut cmd);
let out = cmd.output()?;
let text = String::from_utf8_lossy(&out.stdout);
let result = text.lines().find_map(|l| l.trim().strip_prefix("RESULT=")).unwrap_or("").to_string();
Ok((result, String::from_utf8_lossy(&out.stderr).into_owned()))
}
/// Runs Microsoft's installer and reports whether plugins can now be built for `realm_root`'s core. /// Runs Microsoft's installer and reports whether plugins can now be built for `realm_root`'s core.
/// Blocks until the installer window is closed. /// Blocks until the installer window is closed.
pub fn install_build_tools(realm_root: Option<&Path>) -> Result<MsvcSetupOutcome> { pub fn install_build_tools(realm_root: Option<&Path>) -> Result<MsvcSetupOutcome> {
if !cfg!(windows) { if !cfg!(windows) {
return Err(Error::Invalid("The C++ Build Tools installer is only available on Windows.".into())); return Err(Error::Invalid("The C++ Build Tools installer is only available on Windows.".into()));
} }
let dir = std::env::temp_dir().join("coa-msvc-setup"); let existing = existing_build_tools().map(|p| p.to_string_lossy().into_owned()).unwrap_or_default();
std::fs::create_dir_all(&dir)?; let (result, stderr) = run_installer(&existing, false)?;
let script = dir.join("install-build-tools.ps1"); let (mut installed, mut restart, mut message) = interpret(&result, &stderr);
std::fs::write(&script, SCRIPT)?; let mut toolchain = detect_toolchain_for(realm_root);
let install_path = existing_build_tools().map(|p| p.to_string_lossy().into_owned()).unwrap_or_default(); if needs_separate_instance(!existing.is_empty(), installed, &toolchain) {
let mut cmd = Command::new("powershell.exe"); let target = separate_instance_dir().to_string_lossy().into_owned();
cmd.args(["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File"]) let (result, stderr) = run_installer(&target, true)?;
.arg(&script) let second = interpret(&result, &stderr);
.args(["-Dir"]).arg(dir.join("bootstrapper")) installed = second.0;
.args(["-Url", BOOTSTRAPPER_URL, "-InstallPath", &install_path, "-Components", &COMPONENTS.join(",")]); restart = restart || second.1;
hide_window(&mut cmd); message = second.2;
let out = cmd.output()?; toolchain = detect_toolchain_for(realm_root);
let text = String::from_utf8_lossy(&out.stdout); }
let result = text.lines().find_map(|l| l.trim().strip_prefix("RESULT=")).unwrap_or("").to_string();
let (installed, restart, message) = interpret(&result, &String::from_utf8_lossy(&out.stderr));
let toolchain = detect_toolchain_for(realm_root);
let ready = installed && toolchain.ready; let ready = installed && toolchain.ready;
let message = if installed && !toolchain.ready { let message = if installed && !toolchain.ready {
format!("The installer finished, but the compiler still does not match this core: {}", toolchain.diagnostic_message) format!("The installer finished, but the compiler still does not match this core: {}", toolchain.diagnostic_message)
@@ -138,6 +170,22 @@ mod tests {
assert!(interpret("", "boom").2.contains("boom")); assert!(interpret("", "boom").2.contains("boom"));
} }
fn status(ready: bool, required: Option<&str>) -> ToolchainStatus {
let mut t = detect_toolchain_for(None);
t.ready = ready;
t.required_cl_version = required.map(String::from);
t
}
#[test]
fn a_separate_instance_is_installed_only_when_the_existing_one_lacks_the_named_compiler() {
assert!(needs_separate_instance(true, true, &status(false, Some("19.44.35230"))));
assert!(!needs_separate_instance(true, true, &status(true, Some("19.44.35230"))));
assert!(!needs_separate_instance(false, true, &status(false, Some("19.44.35230"))));
assert!(!needs_separate_instance(true, false, &status(false, Some("19.44.35230"))));
assert!(!needs_separate_instance(true, true, &status(false, None)));
}
#[test] #[test]
fn the_components_name_the_pinned_toolset() { fn the_components_name_the_pinned_toolset() {
assert!(COMPONENTS.iter().any(|c| c.contains("VC.14.44"))); assert!(COMPONENTS.iter().any(|c| c.contains("VC.14.44")));
+58
View File
@@ -97,6 +97,58 @@ pub fn world_root(main: &Path, mode: Mode) -> PathBuf {
.map_or_else(|| main.to_path_buf(), |t| tree_root(main, t)) .map_or_else(|| main.to_path_buf(), |t| tree_root(main, t))
} }
#[derive(Debug, Clone)]
pub struct BotOperationTarget {
pub world_root: PathBuf,
pub chars_db: &'static str,
pub ra_port: u16,
pub running: bool,
pub realm: Mode,
}
pub fn resolve_bot_operation_target(main: &Path, realm: Mode) -> Result<BotOperationTarget> {
let state = realms::state(main)?;
let chars_db = realm.schema("characters")?;
if realm == state.active {
let ports = crate::layout::read_ports(main);
let ra_port = ports.ra;
let status = process::observe(main, &ports);
let running = status.world.state != ServiceState::Stopped;
return Ok(BotOperationTarget {
world_root: main.to_path_buf(),
chars_db,
ra_port,
running,
realm,
});
}
let tree = Tree::ALL
.into_iter()
.find(|t| t.enabled(&state) && t.mode(state.active) == realm)
.ok_or_else(|| Error::Invalid(format!("Realm {} is not enabled in multiworld configuration.", realm.label())))?;
let root = tree_root(main, tree);
if !root.exists() {
return Err(Error::Invalid(format!("Multiworld directory for {} does not exist: {}", realm.label(), root.display())));
}
let ports = crate::layout::read_ports(&root);
let (_, default_ra) = tree.ports(&state);
let ra_port = if ports.ra != 0 { ports.ra } else { default_ra.unwrap_or(3444) };
let status = process::observe(&root, &ports);
let running = status.world.state != ServiceState::Stopped;
Ok(BotOperationTarget {
world_root: root,
chars_db,
ra_port,
running,
realm,
})
}
/// Any of the extra worlds is running or still stopping. /// Any of the extra worlds is running or still stopping.
pub fn is_running(main: &Path) -> bool { pub fn is_running(main: &Path) -> bool {
Tree::ALL.into_iter().any(|t| tree_running(main, t)) Tree::ALL.into_iter().any(|t| tree_running(main, t))
@@ -261,6 +313,12 @@ fn prepare(main: &Path, tree: Tree) -> Result<PathBuf> {
&fsx::ensure_within(&second, &second.join("Core/reference"))?, &fsx::ensure_within(&second, &second.join("Core/reference"))?,
)?; )?;
} }
if main.join("Core/plugins").is_dir() {
copy_tree(
&main.join("Core/plugins"),
&fsx::ensure_within(&second, &second.join("Core/plugins"))?,
)?;
}
for entry in fs::read_dir(main.join("Core"))? { for entry in fs::read_dir(main.join("Core"))? {
let entry = entry?; let entry = entry?;
if entry.file_type()?.is_file() if entry.file_type()?.is_file()
+27 -10
View File
@@ -49,17 +49,19 @@ fn parse_counts(out: &str) -> Result<Population> {
}) })
} }
/// Read-only query with the game's own database account. Requires the database to be running. /// Read-only query with the game's own database account. Routes automatically to the active realm's characters database.
pub fn query(root: &Path) -> Result<Population> { pub fn query(root: &Path) -> Result<Population> {
let db = Db::from_repack(root, Account::App)?; let mode = crate::realms::state(root)
query_with( .map(|s| s.active)
&db, .unwrap_or(crate::realms::Mode::Coa);
&bot_account_prefix(root), query_for_realm(root, mode)
&crate::accounts::squid_bot_prefix(root),
)
} }
fn counts_sql(prefix: &str, squid_prefix: &str) -> Result<String> { fn counts_sql(prefix: &str, squid_prefix: &str) -> Result<String> {
counts_sql_for_db("acore_characters", prefix, squid_prefix)
}
pub fn counts_sql_for_db(chars_db: &str, prefix: &str, squid_prefix: &str) -> Result<String> {
if [prefix, squid_prefix] if [prefix, squid_prefix]
.iter() .iter()
.any(|prefix| prefix.is_empty() || !prefix.chars().all(|c| c.is_ascii_alphanumeric())) .any(|prefix| prefix.is_empty() || !prefix.chars().all(|c| c.is_ascii_alphanumeric()))
@@ -74,9 +76,9 @@ fn counts_sql(prefix: &str, squid_prefix: &str) -> Result<String> {
let bots = let bots =
format!("(UPPER(a.username) LIKE '{prefix}%' OR UPPER(a.username) LIKE '{squid_prefix}%')"); format!("(UPPER(a.username) LIKE '{prefix}%' OR UPPER(a.username) LIKE '{squid_prefix}%')");
Ok(format!( Ok(format!(
"SELECT (SELECT COUNT(*) FROM acore_characters.characters WHERE online=1), \ "SELECT (SELECT COUNT(*) FROM {chars_db}.characters WHERE online=1), \
(SELECT COUNT(*) FROM acore_characters.characters c JOIN acore_auth.account a ON a.id=c.account WHERE c.online=1 AND {bots}), \ (SELECT COUNT(*) FROM {chars_db}.characters c JOIN acore_auth.account a ON a.id=c.account WHERE c.online=1 AND {bots}), \
(SELECT COUNT(*) FROM acore_characters.characters c JOIN acore_auth.account a ON a.id=c.account WHERE {bots});" (SELECT COUNT(*) FROM {chars_db}.characters c JOIN acore_auth.account a ON a.id=c.account WHERE {bots});"
)) ))
} }
@@ -85,6 +87,21 @@ pub fn query_with(db: &Db, prefix: &str, squid_prefix: &str) -> Result<Populatio
parse_counts(&db.query(&counts_sql(prefix, squid_prefix)?)?) parse_counts(&db.query(&counts_sql(prefix, squid_prefix)?)?)
} }
pub fn query_for_schema(db: &Db, chars_db: &str, prefix: &str, squid_prefix: &str) -> Result<Population> {
parse_counts(&db.query(&counts_sql_for_db(chars_db, prefix, squid_prefix)?)?)
}
pub fn query_for_realm(root: &Path, mode: crate::realms::Mode) -> Result<Population> {
let db = Db::from_repack(root, Account::App)?;
let schema = mode.schema("characters")?;
query_for_schema(
&db,
schema,
&bot_account_prefix(root),
&crate::accounts::squid_bot_prefix(root),
)
}
#[derive(Debug, Clone, Serialize)] #[derive(Debug, Clone, Serialize)]
pub struct Hardware { pub struct Hardware {
pub cores: u32, pub cores: u32,
+101 -2
View File
@@ -58,6 +58,23 @@ impl Ra {
Self::connect_to(read_ports(root).ra, &cfg.ra_username, &cfg.ra_password) Self::connect_to(read_ports(root).ra, &cfg.ra_username, &cfg.ra_password)
} }
/// Connect to the loopback RA port of the target realm world server.
pub fn connect_target(main: &Path, realm: Option<crate::realms::Mode>) -> Result<Ra> {
let mode = realm.unwrap_or_else(|| {
crate::realms::view(main).map(|v| v.active).unwrap_or_default()
});
let target = crate::multiworld::resolve_bot_operation_target(main, mode)?;
if !target.running {
return Err(Error::Invalid(format!(
"Realm {} worldserver is stopped; cannot execute online bot operation.",
target.realm.label()
)));
}
let cfg: RaSettings = fsx::read_json(&main.join("Settings/repack.json"))
.map_err(|_| Error::Invalid("The server console settings could not be read.".into()))?;
Self::connect_to(target.ra_port, &cfg.ra_username, &cfg.ra_password)
}
pub fn connect_to(port: u16, user: &str, password: &str) -> Result<Ra> { pub fn connect_to(port: u16, user: &str, password: &str) -> Result<Ra> {
let addr: SocketAddr = ([127, 0, 0, 1], port).into(); let addr: SocketAddr = ([127, 0, 0, 1], port).into();
let mut stream = let mut stream =
@@ -87,7 +104,6 @@ impl Ra {
let c = crate::console::check_command(cmd)?; let c = crate::console::check_command(cmd)?;
self.command(c) self.command(c)
} }
/// Send a command whose answer does not matter (`server shutdown`). The reply is still read (up to the next /// Send a command whose answer does not matter (`server shutdown`). The reply is still read (up to the next
/// prompt, the end of the connection, or a few seconds): closing a socket that holds unread data resets the /// prompt, the end of the connection, or a few seconds): closing a socket that holds unread data resets the
/// connection, and the server can then drop the command it has not processed yet. /// connection, and the server can then drop the command it has not processed yet.
@@ -110,7 +126,6 @@ impl Ra {
let _ = self.stream.shutdown(std::net::Shutdown::Both); let _ = self.stream.shutdown(std::net::Shutdown::Both);
Ok(()) Ok(())
} }
fn command(&mut self, cmd: &str) -> Result<String> { fn command(&mut self, cmd: &str) -> Result<String> {
debug_assert!(!cmd.contains(['\r', '\n'])); debug_assert!(!cmd.contains(['\r', '\n']));
self.stream.write_all(format!("{cmd}\r\n").as_bytes())?; self.stream.write_all(format!("{cmd}\r\n").as_bytes())?;
@@ -271,9 +286,49 @@ impl Ra {
)); ));
} }
let out = self.command(&format!("botcmd spawnleveled {count}"))?; let out = self.command(&format!("botcmd spawnleveled {count}"))?;
if is_unsupported_command(&out) {
return Err(Error::CompanionCommandUnsupported);
}
if out.to_lowercase().contains("no usable template characters") { if out.to_lowercase().contains("no usable template characters") {
return Err(Error::CompanionTemplatesMissing); return Err(Error::CompanionTemplatesMissing);
} }
refused_spawn(&out)?;
Ok(out.lines().last().unwrap_or("").to_string())
}
/// Ask the bot module to spawn a fleet of bots of specific race and level (.botcmd spawnfleet <race> <level>).
pub fn spawn_fleet(&mut self, race: u8, level: u8) -> Result<String> {
let out = self.bot_command(&format!("botcmd spawnfleet {race} {level}"))?;
Ok(out.lines().last().unwrap_or("").to_string())
}
pub fn spawn_custom(
&mut self,
count: u32,
level: u8,
class_id: Option<u8>,
spec_id: Option<u32>,
archetype: Option<&str>,
) -> Result<String> {
let c = class_id.unwrap_or(0);
let s = spec_id.unwrap_or(0);
let a = archetype.unwrap_or("").trim();
let mut cmd = format!("botcmd spawncustom {count} {level}");
if !a.is_empty() {
cmd.push_str(&format!(" {c} {s} {a}"));
} else if s > 0 {
cmd.push_str(&format!(" {c} {s}"));
} else if c > 0 {
cmd.push_str(&format!(" {c}"));
}
let out = self.bot_command(&cmd)?;
refused_spawn(&out)?;
Ok(out.lines().last().unwrap_or("").to_string())
}
/// Bring all offline bots online gradually (.botcmd loginall).
pub fn login_all(&mut self) -> Result<String> {
let out = self.bot_command("botcmd loginall")?;
Ok(out.lines().last().unwrap_or("").to_string()) Ok(out.lines().last().unwrap_or("").to_string())
} }
@@ -352,6 +407,28 @@ fn is_unsupported_command(out: &str) -> bool {
|| l.contains("unknown command") || l.contains("unknown command")
} }
/// The bot module answers a request it cannot carry out with an ordinary line of text, not with an error, so the
/// caller must read it: otherwise the page shows "creating bots" for ever. Returns the module's own words.
fn refused_spawn(out: &str) -> Result<()> {
let l = out.to_lowercase();
let refused = l.contains("switched off")
|| l.contains("rejected")
|| l.contains("nothing to do")
|| l.contains("aborting")
|| l.contains("created and spawned 0 of")
|| l.contains("giving up");
if refused {
let line = out
.lines()
.rev()
.find(|x| !x.trim().is_empty())
.unwrap_or(out)
.trim();
return Err(Error::Invalid(format!("The bot module did not create the bots: {line}")));
}
Ok(())
}
fn first_number(text: &str) -> u32 { fn first_number(text: &str) -> u32 {
text.split(|c: char| !c.is_ascii_digit()) text.split(|c: char| !c.is_ascii_digit())
.find(|t| !t.is_empty()) .find(|t| !t.is_empty())
@@ -575,6 +652,28 @@ AC>";
assert_eq!(h.join().unwrap()[2], "botcmd spawnleveled 50"); assert_eq!(h.join().unwrap()[2], "botcmd spawnleveled 50");
} }
#[test]
fn a_refusal_of_the_bot_module_is_an_error_not_a_started_job() {
let _lock = serial();
for reply in [
"BotMgr: companions are switched off (CoaBots.Enable = 0).",
"BotMgr: spawncustom rejected: level 60 is above this realm's cap.",
"BotMgr: spawncustom created and spawned 0 of 50 bots (level 60, class 0, spec 0).",
] {
let (port, h) = fake_ra(reply);
let mut ra = Ra::connect_to(port, "u", "p").unwrap();
let err = ra.spawn_custom(50, 60, None, None, None).unwrap_err().to_string();
assert!(err.contains("did not create"), "{reply}: {err}");
drop(ra);
h.join().unwrap();
}
let (port, h) = fake_ra("BotMgr: spawncustom created and spawned 50 of 50 bots (level 60, class 0, spec 0).");
let mut ra = Ra::connect_to(port, "u", "p").unwrap();
assert!(ra.spawn_custom(50, 60, None, None, None).unwrap().contains("50 of 50"));
drop(ra);
h.join().unwrap();
}
#[test] #[test]
fn duplicate_account_and_input_validation() { fn duplicate_account_and_input_validation() {
let _lock = serial(); let _lock = serial();
+40 -53
View File
@@ -185,8 +185,20 @@ pub fn view(root: &Path) -> Result<View> {
} }
pub fn guard_module(root: &Path, id: &str) -> Result<()> { pub fn guard_module(root: &Path, id: &str) -> Result<()> {
if state(root)?.active != Mode::Coa && matches!(id, "companions" | "playerbots") { let s = state(root)?;
return Err(Error::Invalid("Bot class mechanics have not been validated for this realm. This module is unavailable on this realm.".into())); if matches!(id, "companions" | "playerbots") {
if let Ok(v) = view(root) {
if s.active == Mode::Wildcard && !v.supported {
return Err(Error::Invalid(
"The installed server binary does not support Wildcard mode.".into(),
));
}
if s.active == Mode::Reborn && !v.reborn_supported {
return Err(Error::Invalid(
"The installed server binary does not support Warcraft Reborn mode.".into(),
));
}
}
} }
Ok(()) Ok(())
} }
@@ -296,20 +308,14 @@ fn wildcard_configs(mut files: Files) -> Result<Files> {
} }
} }
} }
for (key, value) in [("CoaBots.Enable", "0"), ("CoaBots.AutoLoginOnStartup", "0")] { // Preserve existing CoaBots.Enable if present; do not force enable or alter alternative bot systems
set( if let Some(bytes) = files.get("Core/configs/modules/mod_coa_playerbots.conf") {
&mut files, if let Ok(conf) = ConfFile::parse_bytes(bytes) {
"Core/configs/modules/mod_coa_playerbots.conf", if conf.get("CoaBots.Enable") == Some("1") {
key, set(&mut files, "Core/configs/modules/mod_coa_playerbots.conf", "CoaBots.Enable", "1")?;
value, }
)?; }
} }
set(
&mut files,
"Core/configs/modules/playerbots.conf",
"AiPlayerbot.Enabled",
"0",
)?;
Ok(files) Ok(files)
} }
@@ -337,20 +343,14 @@ fn reborn_configs(mut files: Files) -> Result<Files> {
set(&mut files, path, "RealmID", "3")?; set(&mut files, path, "RealmID", "3")?;
} }
} }
for (key, value) in [("CoaBots.Enable", "0"), ("CoaBots.AutoLoginOnStartup", "0")] { // Preserve existing CoaBots.Enable if present; do not force enable or alter alternative bot systems
set( if let Some(bytes) = files.get("Core/configs/modules/mod_coa_playerbots.conf") {
&mut files, if let Ok(conf) = ConfFile::parse_bytes(bytes) {
"Core/configs/modules/mod_coa_playerbots.conf", if conf.get("CoaBots.Enable") == Some("1") {
key, set(&mut files, "Core/configs/modules/mod_coa_playerbots.conf", "CoaBots.Enable", "1")?;
value, }
)?; }
} }
set(
&mut files,
"Core/configs/modules/playerbots.conf",
"AiPlayerbot.Enabled",
"0",
)?;
Ok(files) Ok(files)
} }
@@ -681,19 +681,7 @@ pub fn before_start(root: &Path) -> Result<()> {
"The installed server build does not support Wildcard.".into(), "The installed server build does not support Wildcard.".into(),
)); ));
} }
let path = root.join("Core/configs/modules/mod_coa_playerbots.conf"); // Multi-realm Playerbots 1.0: bots are supported and enabled on all realms
let mut conf = ConfFile::parse_bytes(&fs::read(&path)?)?;
conf.set("CoaBots.Enable", "0", &[]);
fsx::atomic_write(&path, conf.to_text().as_bytes())?;
let path = root.join("Core/configs/modules/playerbots.conf");
let bytes = if path.exists() {
fs::read(&path)?
} else {
b"[worldserver]\n".to_vec()
};
let mut conf = ConfFile::parse_bytes(&bytes)?;
conf.set("AiPlayerbot.Enabled", "0", &[]);
fsx::atomic_write(&path, conf.to_text().as_bytes())?;
} }
Ok(()) Ok(())
} }
@@ -813,11 +801,12 @@ mod tests {
.get("RealmID"), .get("RealmID"),
Some("3") Some("3")
); );
// Requirement 6: Never alter alternative bot system settings (AiPlayerbot.Enabled) without explicit user choice
assert_eq!( assert_eq!(
ConfFile::parse_bytes(&reborn["Core/configs/modules/playerbots.conf"]) ConfFile::parse_bytes(&reborn["Core/configs/modules/playerbots.conf"])
.unwrap() .unwrap()
.get("AiPlayerbot.Enabled"), .get("AiPlayerbot.Enabled"),
Some("0") Some("1")
); );
write_configs(t.path(), &reborn).unwrap(); write_configs(t.path(), &reborn).unwrap();
write_configs(t.path(), &coa).unwrap(); write_configs(t.path(), &coa).unwrap();
@@ -831,8 +820,8 @@ mod tests {
}, },
) )
.unwrap(); .unwrap();
assert!(guard_module(t.path(), "companions").is_err()); assert!(guard_module(t.path(), "companions").is_ok());
assert!(guard_module(t.path(), "playerbots").is_err()); assert!(guard_module(t.path(), "playerbots").is_ok());
assert!(guard_module(t.path(), "content-scaling").is_ok()); assert!(guard_module(t.path(), "content-scaling").is_ok());
} }
@@ -1020,6 +1009,10 @@ CoA.GameModeMask = 0
"Core/configs/modules/mod-coa-content-scaling.conf".into(), "Core/configs/modules/mod-coa-content-scaling.conf".into(),
b"[worldserver]\nCoAContentScaling.Enable = 1\n".to_vec(), b"[worldserver]\nCoAContentScaling.Enable = 1\n".to_vec(),
); );
f.insert(
"Core/configs/modules/mod_coa_playerbots.conf".into(),
b"[worldserver]\nCoaBots.Enable = 1\n".to_vec(),
);
f.insert( f.insert(
"Settings/worldserver.conf.template".into(), "Settings/worldserver.conf.template".into(),
b"[worldserver]\nRealmID = 1\n".to_vec(), b"[worldserver]\nRealmID = 1\n".to_vec(),
@@ -1030,7 +1023,7 @@ CoA.GameModeMask = 0
f["Core/configs/modules/mod-coa-content-scaling.conf"] f["Core/configs/modules/mod-coa-content-scaling.conf"]
); );
let c = ConfFile::parse_bytes(&w["Core/configs/modules/mod_coa_playerbots.conf"]).unwrap(); let c = ConfFile::parse_bytes(&w["Core/configs/modules/mod_coa_playerbots.conf"]).unwrap();
assert_eq!(c.get("CoaBots.Enable"), Some("0")); assert_eq!(c.get("CoaBots.Enable"), Some("1"));
assert_eq!( assert_eq!(
ConfFile::parse_bytes(&w["Settings/worldserver.conf.template"]) ConfFile::parse_bytes(&w["Settings/worldserver.conf.template"])
.unwrap() .unwrap()
@@ -1102,14 +1095,8 @@ CoA.GameModeMask = 0
}, },
) )
.unwrap(); .unwrap();
assert!(crate::modules::set_enabled(t.path(), t.path(), "companions", true).is_err()); assert!(guard_module(t.path(), "companions").is_ok());
assert!(crate::config::save( assert!(guard_module(t.path(), "playerbots").is_ok());
t.path(),
t.path(),
crate::config::Scope::Bots,
&BTreeMap::new()
)
.is_err());
assert!(guard_module(t.path(), "content-scaling").is_ok()); assert!(guard_module(t.path(), "content-scaling").is_ok());
} }
} }
+65 -1
View File
@@ -311,7 +311,36 @@ fn install_recommended(realm_root: &Path, progress: &dyn Fn(&str, &str)) -> Vec<
out out
} }
/// The commit this core recommends for an installed module when it differs from the one the module was built
/// from. Never acted on by itself: the owner decides when to update (the Modules page asks).
pub fn available_update(realm_root: &Path, id: &str) -> Option<String> {
let rec = recommended(realm_root)?;
let want = &rec.modules.iter().find(|m| m.id == id)?.commit;
let have = build_engine::read_build_recipe(realm_root, id)?.source_commit?;
let same = have.starts_with(want.as_str()) || want.starts_with(have.as_str());
(!same).then(|| want.clone())
}
/// Rebuild one installed module from the commit this core recommends and swap it in (the world must be stopped).
/// The module's settings are merged, not reset, and the previous build stays in the plugin store.
pub fn update_to_recommended(realm_root: &Path, id: &str) -> std::result::Result<String, String> {
let rec = recommended(realm_root).ok_or("this server's core does not list recommended modules")?;
let m = rec.modules.iter().find(|m| m.id == id).ok_or_else(|| format!("'{id}' is not a recommended module of this core"))?;
if !plugins::load_registry(realm_root).map_err(|e| e.to_string())?.plugins.contains_key(id) {
return Err(format!("'{id}' is not installed"));
}
install_module_sources(realm_root, m, true)?;
let mut handled = load_handled(realm_root);
handled.insert(m.id.clone(), m.commit.clone());
save_handled(realm_root, &handled);
Ok(m.commit.clone())
}
fn install_one(realm_root: &Path, m: &RecommendedModule) -> std::result::Result<(), String> { fn install_one(realm_root: &Path, m: &RecommendedModule) -> std::result::Result<(), String> {
install_module_sources(realm_root, m, false)
}
fn install_module_sources(realm_root: &Path, m: &RecommendedModule, update: bool) -> std::result::Result<(), String> {
let cache = source_cache(); let cache = source_cache();
let (owner, name) = split_repo(&m.repo)?; let (owner, name) = split_repo(&m.repo)?;
let primary = crate::module_sources::fetch_pinned(owner, name, &m.commit, &cache).map_err(|e| e.to_string())?; let primary = crate::module_sources::fetch_pinned(owner, name, &m.commit, &cache).map_err(|e| e.to_string())?;
@@ -332,12 +361,20 @@ fn install_one(realm_root: &Path, m: &RecommendedModule) -> std::result::Result<
bundled.push(dir); bundled.push(dir);
} }
let built = build_engine::build_module_with_bundle(&primary, &bundled, realm_root, None, None).map_err(|e| e.to_string())?; let built = build_engine::build_module_with_bundle(&primary, &bundled, realm_root, None, None).map_err(|e| e.to_string())?;
if !built.success {
// Never install a package left by an earlier build: it was made from other sources.
return Err(build_failure_reason(&built.errors));
}
if built.module_id != m.id { if built.module_id != m.id {
return Err(format!("the sources build module '{}', not '{}'", built.module_id, m.id)); return Err(format!("the sources build module '{}', not '{}'", built.module_id, m.id));
} }
let (meta, dll, confs) = crate::preview::built_package(realm_root, &m.id, &built.version).map_err(|e| e.to_string())?; let (meta, dll, confs) = crate::preview::built_package(realm_root, &m.id, &built.version).map_err(|e| e.to_string())?;
let confs: Vec<(String, &[u8])> = confs.iter().map(|(n, b)| (n.clone(), b.as_slice())).collect(); let confs: Vec<(String, &[u8])> = confs.iter().map(|(n, b)| (n.clone(), b.as_slice())).collect();
plugins::install(realm_root, meta, &dll, None, &confs, true).map_err(|e| e.to_string()) if update {
plugins::update(realm_root, meta, &dll, None, &confs).map_err(|e| e.to_string())
} else {
plugins::install(realm_root, meta, &dll, None, &confs, true).map_err(|e| e.to_string())
}
} }
@@ -497,6 +534,33 @@ mod tests {
assert!(rebuild_for_current_core(server, &|_, _| panic!("nothing is built")).unwrap().is_empty()); assert!(rebuild_for_current_core(server, &|_, _| panic!("nothing is built")).unwrap().is_empty());
} }
#[test]
fn a_newer_recommended_build_is_offered_never_applied_by_itself() {
let dir = tempfile::tempdir().unwrap();
let server = dir.path();
fs::create_dir_all(server.join("Core/plugins")).unwrap();
fs::write(server.join("Core/plugins/recommended.json"), r#"{"schema":1,"modules":[
{"id":"companions","repo":"Corfirean/mod-coa-playerbots","commit":"178a7fde6abe1c3c8813d338073b2c83835da497"}]}"#).unwrap();
// no recipe: the manager cannot tell what is installed, so it offers nothing
assert_eq!(available_update(server, "companions"), None);
let recipes = plugins::meta_dir(server).join("build-recipes");
fs::create_dir_all(&recipes).unwrap();
let recipe = |commit: &str| {
format!(r#"{{"schema":1,"source_dir":"x","bundled":[],"source_commit":"{commit}"}}"#)
};
fs::write(recipes.join("companions.json"), recipe("447558bc27d6bb447aaf10eefcb2e85ac2b15c32")).unwrap();
assert_eq!(
available_update(server, "companions").as_deref(),
Some("178a7fde6abe1c3c8813d338073b2c83835da497")
);
// already built from the recommended commit (a short form counts too)
fs::write(recipes.join("companions.json"), recipe("178a7fde")).unwrap();
assert_eq!(available_update(server, "companions"), None);
assert_eq!(available_update(server, "unknown-module"), None);
// a core change rebuilds the old sources and does not move the module to the newer commit
assert!(load_handled(server).is_empty());
}
/// Real run: COA_TEST_RECOMMENDED_REALM is a plugin-host realm with Core/plugins/recommended.json (or /// Real run: COA_TEST_RECOMMENDED_REALM is a plugin-host realm with Core/plugins/recommended.json (or
/// plugins/recommended.json); the modules are downloaded from GitHub, built and switched on. /// plugins/recommended.json); the modules are downloaded from GitHub, built and switched on.
#[test] #[test]
+265 -1
View File
@@ -1,4 +1,9 @@
use std::{fs, path::Path}; use std::{
fs,
path::{Path, PathBuf},
};
use serde::{Deserialize, Serialize};
use crate::{ use crate::{
config::{parser::ConfFile, Scope}, config::{parser::ConfFile, Scope},
@@ -6,6 +11,213 @@ use crate::{
fsx, fsx,
}; };
const SETTINGS_FILE: &str = "Settings/log-settings.json";
const DEFAULT_MAX_SIZE_MB: u64 = 500;
const MIN_MAX_SIZE_MB: u64 = 10;
const MAX_MAX_SIZE_MB: u64 = 100_000;
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase", default)]
pub struct LogSettings {
pub auto_cleanup: bool,
pub max_size_mb: u64,
}
impl Default for LogSettings {
fn default() -> Self {
Self {
auto_cleanup: false,
max_size_mb: DEFAULT_MAX_SIZE_MB,
}
}
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct CleanLogsReport {
pub freed_bytes: u64,
pub remaining_bytes: u64,
pub deleted_files: u64,
pub skipped_files: u64,
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct ServerLoggingView {
pub preset: Option<String>,
pub log_bytes: u64,
pub settings: LogSettings,
}
fn owner(root: &Path) -> PathBuf {
if crate::launcher::settings::is_extra_world(root) {
if let Some(main) = root.parent().and_then(Path::parent) {
return main.to_path_buf();
}
}
root.to_path_buf()
}
pub fn load_settings(root: &Path) -> LogSettings {
let mut settings: LogSettings =
fsx::read_json(&owner(root).join(SETTINGS_FILE)).unwrap_or_default();
if settings.max_size_mb < MIN_MAX_SIZE_MB || settings.max_size_mb > MAX_MAX_SIZE_MB {
settings.max_size_mb = DEFAULT_MAX_SIZE_MB;
}
settings
}
pub fn save_settings(root: &Path, settings: &LogSettings) -> Result<LogSettings> {
let mut settings = settings.clone();
if settings.auto_cleanup {
if !(MIN_MAX_SIZE_MB..=MAX_MAX_SIZE_MB).contains(&settings.max_size_mb) {
return Err(Error::Invalid(format!(
"Log auto-cleanup threshold must be between {MIN_MAX_SIZE_MB} and {MAX_MAX_SIZE_MB} MB."
)));
}
} else if !(MIN_MAX_SIZE_MB..=MAX_MAX_SIZE_MB).contains(&settings.max_size_mb) {
settings.max_size_mb = DEFAULT_MAX_SIZE_MB;
}
fsx::atomic_write_json(&owner(root).join(SETTINGS_FILE), &settings)?;
Ok(settings)
}
pub fn detect_preset(root: &Path) -> Option<String> {
let candidates = [
root.join("Core/configs/worldserver.conf"),
root.join("Settings/worldserver.conf.template"),
];
for path in candidates {
let Ok(bytes) = fs::read(&path) else {
continue;
};
let Ok(conf) = ConfFile::parse_bytes(&bytes) else {
continue;
};
let found = conf
.entries()
.find(|(k, _)| *k == "Logger.root")
.and_then(|(_, value)| {
value
.split(',')
.next()
.map(str::trim)
.and_then(|s| s.parse::<u32>().ok())
});
if let Some(level) = found {
return match level {
0 => Some("off".into()),
2 => Some("errors".into()),
4 => Some("normal".into()),
_ => None,
};
}
}
None
}
fn log_dirs(root: &Path) -> Vec<PathBuf> {
let base = owner(root);
let mut dirs = Vec::new();
for prefix in ["", ".realms/secondary/", ".realms/reborn/"] {
let candidate = base.join(format!("{prefix}Core/Logs"));
if let Ok(checked) = fsx::ensure_within(&base, &candidate) {
if checked.is_dir() {
dirs.push(checked);
}
}
}
dirs
}
fn measure_dir(dir: &Path) -> u64 {
let Ok(entries) = fs::read_dir(dir) else {
return 0;
};
let mut total = 0u64;
for entry in entries.flatten() {
let path = entry.path();
let Ok(meta) = entry.metadata() else {
continue;
};
if meta.is_dir() {
total = total.saturating_add(measure_dir(&path));
} else if meta.is_file() {
total = total.saturating_add(meta.len());
}
}
total
}
pub fn measure_logs(root: &Path) -> u64 {
log_dirs(root)
.into_iter()
.fold(0u64, |acc, dir| acc.saturating_add(measure_dir(&dir)))
}
fn clean_dir(dir: &Path, report: &mut CleanLogsReport, remove_empty_dir: bool) {
let Ok(entries) = fs::read_dir(dir) else {
return;
};
for entry in entries.flatten() {
let path = entry.path();
let Ok(meta) = entry.metadata() else {
continue;
};
if meta.is_dir() {
clean_dir(&path, report, true);
} else if meta.is_file() {
let size = meta.len();
match fs::remove_file(&path) {
Ok(()) => {
report.freed_bytes = report.freed_bytes.saturating_add(size);
report.deleted_files = report.deleted_files.saturating_add(1);
}
Err(_) => {
report.remaining_bytes = report.remaining_bytes.saturating_add(size);
report.skipped_files = report.skipped_files.saturating_add(1);
}
}
}
}
if remove_empty_dir {
let _ = fs::remove_dir(dir);
}
}
pub fn clean_logs(root: &Path) -> Result<CleanLogsReport> {
let mut report = CleanLogsReport {
freed_bytes: 0,
remaining_bytes: 0,
deleted_files: 0,
skipped_files: 0,
};
for dir in log_dirs(root) {
clean_dir(&dir, &mut report, false);
}
Ok(report)
}
pub fn auto_clean_if_needed(root: &Path) -> Option<CleanLogsReport> {
let settings = load_settings(root);
if !settings.auto_cleanup {
return None;
}
let limit = settings.max_size_mb.saturating_mul(1024 * 1024);
if measure_logs(root) <= limit {
return None;
}
clean_logs(root).ok()
}
pub fn state(root: &Path) -> ServerLoggingView {
ServerLoggingView {
preset: detect_preset(root),
log_bytes: measure_logs(root),
settings: load_settings(root),
}
}
fn transform(bytes: &[u8], preset: &str) -> Result<String> { fn transform(bytes: &[u8], preset: &str) -> Result<String> {
let level = match preset { let level = match preset {
"normal" => 4, "normal" => 4,
@@ -162,4 +374,56 @@ mod tests {
assert_eq!(transform(normal.as_bytes(), "normal").unwrap(), normal); assert_eq!(transform(normal.as_bytes(), "normal").unwrap(), normal);
assert!(transform(original, "unsupported").is_err()); assert!(transform(original, "unsupported").is_err());
} }
#[test]
fn detects_preset_measures_and_cleans_logs_across_realms() {
let temp = tempfile::tempdir().unwrap();
let root = temp.path();
fs::create_dir_all(root.join("Core/configs")).unwrap();
fs::write(root.join("Core/configs/worldserver.conf"), "Logger.root=4,Console Server\n").unwrap();
assert_eq!(detect_preset(root).as_deref(), Some("normal"));
fs::write(root.join("Core/configs/worldserver.conf"), "Logger.root=0,Console Server\n").unwrap();
assert_eq!(detect_preset(root).as_deref(), Some("off"));
fs::write(root.join("Core/configs/worldserver.conf"), "Logger.root=2,Console Server\n").unwrap();
assert_eq!(detect_preset(root).as_deref(), Some("errors"));
fs::create_dir_all(root.join("Core/Logs/archive")).unwrap();
fs::create_dir_all(root.join(".realms/secondary/Core/Logs")).unwrap();
fs::write(root.join("Core/Logs/Server.log"), vec![b'a'; 1000]).unwrap();
fs::write(root.join("Core/Logs/archive/old.log"), vec![b'b'; 500]).unwrap();
fs::write(root.join(".realms/secondary/Core/Logs/Server.log"), vec![b'c'; 250]).unwrap();
assert_eq!(measure_logs(root), 1750);
let report = clean_logs(root).unwrap();
assert_eq!(report.freed_bytes, 1750);
assert_eq!(report.remaining_bytes, 0);
assert_eq!(report.deleted_files, 3);
assert_eq!(report.skipped_files, 0);
assert_eq!(measure_logs(root), 0);
assert!(!root.join("Core/Logs/archive").exists());
}
#[test]
fn log_settings_validate_and_auto_clean_only_above_threshold() {
let temp = tempfile::tempdir().unwrap();
let root = temp.path();
assert_eq!(load_settings(root), LogSettings::default());
assert!(save_settings(root, &LogSettings { auto_cleanup: true, max_size_mb: 5 }).is_err());
let saved = save_settings(root, &LogSettings { auto_cleanup: true, max_size_mb: 10 }).unwrap();
assert!(saved.auto_cleanup);
assert_eq!(saved.max_size_mb, 10);
fs::create_dir_all(root.join("Core/Logs")).unwrap();
fs::write(root.join("Core/Logs/Server.log"), vec![b'x'; 1024]).unwrap();
// 1 KB < 10 MB: does not clean.
assert!(auto_clean_if_needed(root).is_none());
assert_eq!(measure_logs(root), 1024);
// Threshold check helper: writing > 10 MB triggers cleanup.
let over = vec![b'y'; 10 * 1024 * 1024 + 1];
fs::write(root.join("Core/Logs/Big.log"), over).unwrap();
let cleaned = auto_clean_if_needed(root).unwrap();
assert!(cleaned.freed_bytes > 10 * 1024 * 1024);
assert_eq!(measure_logs(root), 0);
}
} }
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "coa-server-manager", "name": "coa-server-manager",
"version": "0.9.11", "version": "0.9.17",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "coa-server-manager", "name": "coa-server-manager",
"version": "0.9.11", "version": "0.9.17",
"dependencies": { "dependencies": {
"@tauri-apps/api": "^2.12.0", "@tauri-apps/api": "^2.12.0",
"@tauri-apps/plugin-dialog": "^2.8.0", "@tauri-apps/plugin-dialog": "^2.8.0",
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"name": "coa-server-manager", "name": "coa-server-manager",
"private": true, "private": true,
"version": "0.9.11", "version": "0.9.17",
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"type": "module", "type": "module",
"scripts": { "scripts": {
+1
View File
@@ -25,3 +25,4 @@ coa-core = { path = "../crates/coa-core" }
coa-registry-proto = { path = "../crates/coa-registry-proto" } coa-registry-proto = { path = "../crates/coa-registry-proto" }
coa-control-proto = { path = "../crates/coa-control-proto" } coa-control-proto = { path = "../crates/coa-control-proto" }
tracing = "0.1" tracing = "0.1"
uuid = { version = "1", features = ["v4"] }
+332 -286
View File
@@ -46,7 +46,7 @@ struct AppState {
busy: Mutex<HashSet<String>>, busy: Mutex<HashSet<String>>,
/// Cancel handle of the installation currently running, if any. /// Cancel handle of the installation currently running, if any.
install_cancel: Mutex<Option<Cancel>>, install_cancel: Mutex<Option<Cancel>>,
/// Cancel handle of the game-client check or download currently running, if any. /// Cancel handle of the game-client operation currently running (the custom-race patch), if any.
client_cancel: Mutex<Option<Cancel>>, client_cancel: Mutex<Option<Cancel>>,
/// The portable play runtime (the Host loop): started with the application, stopped with it. /// The portable play runtime (the Host loop): started with the application, stopped with it.
portable: Option<Arc<PortableRuntime>>, portable: Option<Arc<PortableRuntime>>,
@@ -601,6 +601,91 @@ async fn run_verb(
.map_err(Into::into) .map_err(Into::into)
} }
/// Creates the companions a realm's startup fleet is missing (when its auto-login is on and its world runs) and
/// carries out the realm's pending companion job. Returns how many companions were queued to top the fleet up.
fn reconcile_realm_companions(
root: &Path,
meta: &Path,
instance_id: &str,
mode: coa_core::realms::Mode,
top_up: bool,
) -> Result<u32> {
let target = coa_core::multiworld::resolve_bot_operation_target(root, mode)?;
let mut queued = 0;
if top_up && target.running {
match queue_startup_fleet(root, meta, instance_id, mode, &target.world_root) {
Ok(n) => queued = n,
Err(e) => tracing::warn!("startup fleet of realm {} was not topped up: {e}", mode.name()),
}
}
let r_snap = root.to_path_buf();
let chars_db = target.chars_db;
let r_ra = root.to_path_buf();
coa_core::companions::process_pending_job_with(
meta,
mode,
instance_id,
target.running,
|since_guid| {
let admin_db = coa_core::db::Db::from_repack(&r_snap, coa_core::db::Account::Admin)?;
let _ = coa_core::companions::ensure_templates_for_schema(&admin_db, chars_db);
coa_core::companions::query_bot_db_snapshot(&r_snap, &admin_db, chars_db, since_guid)
},
|delta, job| {
let mut ra = Ra::connect_target(&r_ra, Some(mode))?;
if let Some(lvl) = job.level {
ra.spawn_custom(delta, lvl, job.class_id, job.spec_id, job.build_id.as_deref())
} else {
ra.spawn_bots(delta)
}
},
)?;
Ok(queued)
}
/// Queues the job that creates the companions missing from a realm's startup fleet. The realm's auto-login limit is
/// the fleet size: companions that exist already count, so only the difference is created. Nothing is created when
/// the number of existing companions cannot be read.
fn queue_startup_fleet(
root: &Path,
meta: &Path,
instance_id: &str,
mode: coa_core::realms::Mode,
world_root: &Path,
) -> Result<u32> {
let cfg = config::load(world_root, Scope::Bots)?;
let value = |key: &str| cfg.settings.iter().find(|s| s.meta.key == key).map(|s| s.value.clone());
let on = value("CoaBots.AutoLoginOnStartup").and_then(|v| v.as_bool()).unwrap_or(false);
let limit = value("CoaBots.AutoLogin.MaxCount").and_then(|v| v.as_u64()).unwrap_or(0) as u32;
if !on || limit == 0 {
return Ok(0);
}
let existing = coa_core::population::query_for_realm(root, mode)?.bots_total;
let job = coa_core::companions::queue_fleet_top_up(meta, instance_id, mode, limit, existing)?;
Ok(job.map_or(0, |j| j.count))
}
/// After the startup fleet settings are saved: create the companions the fleet is missing right away when the realm's
/// world is running (otherwise it happens at the next start). Returns how many were queued.
#[tauri::command]
async fn top_up_startup_fleet(
state: State<'_, AppState>,
id: String,
realm: Option<coa_core::realms::Mode>,
) -> std::result::Result<u32, UiError> {
let root = path_of(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?;
blocking(move || {
if coa_core::realms::guard_module(&root, "companions").is_err() {
return Ok(0);
}
let meta = meta_dir(&root)?;
let mode = realm.unwrap_or_else(|| coa_core::realms::view(&root).map(|v| v.active).unwrap_or_default());
reconcile_realm_companions(&root, &meta, &id, mode, true)
})
.await
}
#[tauri::command] #[tauri::command]
async fn start_server( async fn start_server(
state: State<'_, AppState>, state: State<'_, AppState>,
@@ -631,25 +716,24 @@ async fn start_server(
let out = blocking(move || driver::run(&root, Verb::StartAll)).await?; let out = blocking(move || driver::run(&root, Verb::StartAll)).await?;
if out.ok { if out.ok {
if let Ok(root) = path_of(&state, &id) { if let Ok(root) = path_of(&state, &id) {
// Companions requested while the server was stopped are created now (once; a failure is only logged). // Companions requested while the server was stopped are reconciled and created now per realm.
let r = root.clone(); let r = root.clone();
let instance_id = id.clone();
let _ = tauri::async_runtime::spawn_blocking(move || -> Result<()> { let _ = tauri::async_runtime::spawn_blocking(move || -> Result<()> {
if coa_core::realms::guard_module(&r, "companions").is_err() { if coa_core::realms::guard_module(&r, "companions").is_err() {
return Ok(()); return Ok(());
} }
let pending = meta_dir(&r)?.join("companions.pending.json"); let meta = meta_dir(&r)?;
if let Ok(v) = coa_core::fsx::read_json::<serde_json::Value>(&pending) { if let Err(e) = coa_core::companions::migrate_legacy_pending_job(&meta, &instance_id) {
let _ = std::fs::remove_file(&pending); tracing::warn!("failed to migrate legacy pending companions job: {e}");
let n = v["count"].as_u64().unwrap_or(0) as u32; }
if n > 0 { for mode in [
let made = coa_core::db::Db::from_repack(&r, coa_core::db::Account::Admin) coa_core::realms::Mode::Coa,
.and_then(|db| coa_core::companions::ensure_templates(&db)); coa_core::realms::Mode::Wildcard,
if let Err(e) = made coa_core::realms::Mode::Reborn,
.and_then(|_| Ra::connect(&r)) ] {
.and_then(|mut ra| ra.spawn_bots(n)) if let Err(e) = reconcile_realm_companions(&r, &meta, &instance_id, mode, true) {
{ tracing::warn!("companions for realm {} failed during start-up: {e}", mode.name());
tracing::warn!("pending companions were not created: {e}");
}
} }
} }
Ok(()) Ok(())
@@ -745,6 +829,15 @@ async fn get_settings(
blocking(move || config::load(&root, scope)).await blocking(move || config::load(&root, scope)).await
} }
#[tauri::command]
async fn server_logging_state(
state: State<'_, AppState>,
id: String,
) -> std::result::Result<coa_core::server_logging::ServerLoggingView, UiError> {
let root = path_of(&state, &id)?;
blocking(move || Ok(coa_core::server_logging::state(&root))).await
}
#[tauri::command] #[tauri::command]
async fn server_logging_preset( async fn server_logging_preset(
state: State<'_, AppState>, state: State<'_, AppState>,
@@ -759,6 +852,30 @@ async fn server_logging_preset(
}).await }).await
} }
#[tauri::command]
async fn server_logging_settings_save(
state: State<'_, AppState>,
id: String,
settings: coa_core::server_logging::LogSettings,
) -> std::result::Result<coa_core::server_logging::ServerLoggingView, UiError> {
let root = path_of(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?;
blocking(move || {
coa_core::server_logging::save_settings(&root, &settings)?;
Ok(coa_core::server_logging::state(&root))
}).await
}
#[tauri::command]
async fn server_logs_clean(
state: State<'_, AppState>,
id: String,
) -> std::result::Result<coa_core::server_logging::CleanLogsReport, UiError> {
let root = path_of(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?;
blocking(move || coa_core::server_logging::clean_logs(&root)).await
}
#[tauri::command] #[tauri::command]
async fn save_settings( async fn save_settings(
state: State<'_, AppState>, state: State<'_, AppState>,
@@ -1537,6 +1654,23 @@ async fn repair_server(
.await .await
} }
/// Rebuild an installed module from the commit this server's core recommends. Only ever called by the owner's
/// click on "Update": nothing updates a module on its own. The world must be stopped; settings are merged.
#[tauri::command]
async fn module_update(
state: State<'_, AppState>,
id: String,
module: String,
) -> std::result::Result<String, UiError> {
let root = path_of(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?;
blocking(move || {
coa_core::plugins::require_server_stopped(&root)?;
coa_core::rebuild::update_to_recommended(&root, &module).map_err(Error::Invalid)
})
.await
}
#[tauri::command] #[tauri::command]
async fn module_set_enabled( async fn module_set_enabled(
state: State<'_, AppState>, state: State<'_, AppState>,
@@ -2040,6 +2174,7 @@ async fn retry_update_validation(
async fn get_population( async fn get_population(
state: State<'_, AppState>, state: State<'_, AppState>,
id: String, id: String,
realm: Option<coa_core::realms::Mode>,
) -> std::result::Result<Option<coa_core::population::Population>, UiError> { ) -> std::result::Result<Option<coa_core::population::Population>, UiError> {
let root = path_of(&state, &id)?; let root = path_of(&state, &id)?;
Ok(tauri::async_runtime::spawn_blocking(move || { Ok(tauri::async_runtime::spawn_blocking(move || {
@@ -2047,12 +2182,48 @@ async fn get_population(
if o.mysql.state != coa_core::process::ServiceState::Running { if o.mysql.state != coa_core::process::ServiceState::Running {
return None; return None;
} }
coa_core::population::query(&root).ok() if let Some(mode) = realm {
coa_core::population::query_for_realm(&root, mode).ok()
} else {
coa_core::population::query(&root).ok()
}
}) })
.await .await
.unwrap_or(None)) .unwrap_or(None))
} }
#[tauri::command]
async fn companions_login_all(
state: State<'_, AppState>,
id: String,
realm: Option<coa_core::realms::Mode>,
) -> std::result::Result<String, UiError> {
let root = path_of(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?;
blocking(move || {
let mut ra = Ra::connect_target(&root, realm)?;
ra.login_all()
})
.await
}
#[tauri::command]
async fn companions_spawn_fleet(
state: State<'_, AppState>,
id: String,
race: u8,
level: u8,
realm: Option<coa_core::realms::Mode>,
) -> std::result::Result<String, UiError> {
let root = path_of(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?;
blocking(move || {
let mut ra = Ra::connect_target(&root, realm)?;
ra.spawn_fleet(race, level)
})
.await
}
#[derive(Serialize)] #[derive(Serialize)]
struct CompanionAction { struct CompanionAction {
/// Bots affected (cancelled from the queue, or logged out). /// Bots affected (cancelled from the queue, or logged out).
@@ -2063,12 +2234,31 @@ struct CompanionAction {
async fn companions_stop_spawning( async fn companions_stop_spawning(
state: State<'_, AppState>, state: State<'_, AppState>,
id: String, id: String,
realm: Option<coa_core::realms::Mode>,
) -> std::result::Result<CompanionAction, UiError> { ) -> std::result::Result<CompanionAction, UiError> {
let root = path_of(&state, &id)?; let root = path_of(&state, &id)?;
blocking(move || { blocking(move || {
Ok(CompanionAction { let mode = realm.unwrap_or_else(|| {
count: Ra::connect(&root)?.cancel_spawning()?, coa_core::realms::view(&root).map(|v| v.active).unwrap_or_default()
}) });
let meta = meta_dir(&root)?;
let cancelled_pending = coa_core::companions::cancel_pending_job(&meta, mode.name())
.ok()
.flatten();
match Ra::connect_target(&root, Some(mode)).and_then(|mut ra| ra.cancel_spawning()) {
Ok(ra_cancelled) => Ok(CompanionAction {
count: ra_cancelled + cancelled_pending.map(|j| j.remaining_count()).unwrap_or(0),
}),
Err(e) => {
if let Some(job) = cancelled_pending {
Ok(CompanionAction {
count: job.remaining_count(),
})
} else {
Err(e)
}
}
}
}) })
.await .await
} }
@@ -2077,12 +2267,12 @@ async fn companions_stop_spawning(
async fn companions_take_offline( async fn companions_take_offline(
state: State<'_, AppState>, state: State<'_, AppState>,
id: String, id: String,
realm: Option<coa_core::realms::Mode>,
) -> std::result::Result<CompanionAction, UiError> { ) -> std::result::Result<CompanionAction, UiError> {
let root = path_of(&state, &id)?; let root = path_of(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?; let _guard = BusyGuard::acquire(&state, &id)?;
blocking(move || { blocking(move || {
let mut ra = Ra::connect(&root)?; let mut ra = Ra::connect_target(&root, realm)?;
// Anything still waiting to be created must not come back right after.
let _ = ra.cancel_spawning(); let _ = ra.cancel_spawning();
Ok(CompanionAction { Ok(CompanionAction {
count: ra.despawn_all()?, count: ra.despawn_all()?,
@@ -2091,13 +2281,12 @@ async fn companions_take_offline(
.await .await
} }
/// Log `count` randomly chosen online companions out to lower the load. Uses the per-bot command that every server
/// build has, so it works on older builds too.
#[tauri::command] #[tauri::command]
async fn companions_despawn_some( async fn companions_despawn_some(
state: State<'_, AppState>, state: State<'_, AppState>,
id: String, id: String,
count: u32, count: u32,
realm: Option<coa_core::realms::Mode>,
) -> std::result::Result<CompanionAction, UiError> { ) -> std::result::Result<CompanionAction, UiError> {
let root = path_of(&state, &id)?; let root = path_of(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?; let _guard = BusyGuard::acquire(&state, &id)?;
@@ -2105,13 +2294,18 @@ async fn companions_despawn_some(
if !(1..=5000).contains(&count) { if !(1..=5000).contains(&count) {
return Err(Error::Invalid("Choose a number between 1 and 5000.".into())); return Err(Error::Invalid("Choose a number between 1 and 5000.".into()));
} }
let mode = realm.unwrap_or_else(|| {
coa_core::realms::view(&root).map(|v| v.active).unwrap_or_default()
});
let target = coa_core::multiworld::resolve_bot_operation_target(&root, mode)?;
let prefix = coa_core::population::bot_account_prefix(&root).to_uppercase(); let prefix = coa_core::population::bot_account_prefix(&root).to_uppercase();
let db = coa_core::db::Db::from_repack(&root, coa_core::db::Account::App)?; let db = coa_core::db::Db::from_repack(&root, coa_core::db::Account::App)?;
let rows = db.query(&format!( let rows = db.query(&format!(
"SELECT c.guid FROM acore_characters.characters c JOIN acore_auth.account a ON a.id=c.account WHERE c.online=1 AND UPPER(a.username) LIKE '{prefix}%' ORDER BY RAND() LIMIT {count};" "SELECT c.guid FROM {}.characters c JOIN acore_auth.account a ON a.id=c.account WHERE c.online=1 AND UPPER(a.username) LIKE '{prefix}%' ORDER BY RAND() LIMIT {count};",
target.chars_db
))?; ))?;
let guids: Vec<u64> = rows.lines().filter_map(|l| l.trim().parse().ok()).collect(); let guids: Vec<u64> = rows.lines().filter_map(|l| l.trim().parse().ok()).collect();
let mut ra = Ra::connect(&root)?; let mut ra = Ra::connect_target(&root, Some(mode))?;
let mut done = 0; let mut done = 0;
for g in guids { for g in guids {
if ra.despawn_bot(g).unwrap_or(false) { if ra.despawn_bot(g).unwrap_or(false) {
@@ -2123,31 +2317,36 @@ async fn companions_despawn_some(
.await .await
} }
/// Delete every companion for good. A recovery point of the characters and accounts is saved first.
#[tauri::command] #[tauri::command]
async fn companions_delete_all( async fn companions_delete_all(
app: AppHandle, app: AppHandle,
state: State<'_, AppState>, state: State<'_, AppState>,
id: String, id: String,
realm: Option<coa_core::realms::Mode>,
) -> std::result::Result<CompanionAction, UiError> { ) -> std::result::Result<CompanionAction, UiError> {
let root = path_of(&state, &id)?; let root = path_of(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?; let _guard = BusyGuard::acquire(&state, &id)?;
blocking(move || { blocking(move || {
let mode = realm.unwrap_or_else(|| {
coa_core::realms::view(&root).map(|v| v.active).unwrap_or_default()
});
let target = coa_core::multiworld::resolve_bot_operation_target(&root, mode)?;
let meta = meta_dir(&root)?; let meta = meta_dir(&root)?;
backup::create( backup::create(
&root, &root,
&meta, &meta,
Kind::Quick, Kind::Quick,
Trigger::BeforeDangerousChange, Trigger::BeforeDangerousChange,
Some("before deleting all companions".into()), Some(format!("before deleting all {} companions", target.realm.label())),
&|step| { &|step| {
let _ = app.emit("backup-progress", step); let _ = app.emit("backup-progress", step);
}, },
)?; )?;
let before = coa_core::population::query(&root) let before = coa_core::population::query_for_realm(&root, mode)
.map(|p| p.bots_total) .map(|p| p.bots_total)
.unwrap_or(0); .unwrap_or(0);
let mut ra = Ra::connect(&root)?; let _ = coa_core::companions::cancel_pending_job(&meta, mode.name());
let mut ra = Ra::connect_target(&root, Some(mode))?;
let _ = ra.cancel_spawning(); let _ = ra.cancel_spawning();
ra.purge_all()?; ra.purge_all()?;
Ok(CompanionAction { count: before }) Ok(CompanionAction { count: before })
@@ -2203,6 +2402,11 @@ async fn add_companions(
state: State<'_, AppState>, state: State<'_, AppState>,
id: String, id: String,
count: u32, count: u32,
realm: Option<coa_core::realms::Mode>,
level: Option<u8>,
class_id: Option<u8>,
spec_id: Option<u32>,
archetype: Option<String>,
) -> std::result::Result<CompanionsResult, UiError> { ) -> std::result::Result<CompanionsResult, UiError> {
let root = path_of(&state, &id)?; let root = path_of(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?; let _guard = BusyGuard::acquire(&state, &id)?;
@@ -2212,81 +2416,84 @@ async fn add_companions(
"Choose between 1 and 2000 companions.".into(), "Choose between 1 and 2000 companions.".into(),
)); ));
} }
let mode = realm.unwrap_or_else(|| {
coa_core::realms::view(&root).map(|v| v.active).unwrap_or_default()
});
coa_core::companions::validate_spawn_request(
mode,
count,
level,
class_id,
spec_id,
archetype.as_deref(),
)?;
let target = coa_core::multiworld::resolve_bot_operation_target(&root, mode)?;
if mode == coa_core::realms::Mode::Wildcard {
if let Some(ref arch_id) = archetype {
if !arch_id.trim().is_empty() {
let db = coa_core::db::Db::from_repack(&root, coa_core::db::Account::Admin)?;
let archetypes = coa_core::companions::list_wildcard_archetypes(&db, target.chars_db)?;
if !archetypes.iter().any(|a| a.id.eq_ignore_ascii_case(arch_id.trim())) {
return Err(Error::Invalid(format!(
"Unknown Wildcard build UUID '{}' in {}.coa_build_creator.",
arch_id.trim(),
target.chars_db
)));
}
}
}
}
let meta = meta_dir(&root)?; let meta = meta_dir(&root)?;
let mut changes = BTreeMap::new(); let mut changes = BTreeMap::new();
changes.insert("CoaBots.AutoLoginOnStartup".to_string(), Value::Bool(true)); changes.insert("CoaBots.AutoLoginOnStartup".to_string(), Value::Bool(true));
// Every companion, old and new, should come back at the next start, so the start-up limit only ever grows here. let existing_cfg = config::load(&target.world_root, Scope::Bots)?;
let existing_max = config::load(&root, Scope::Bots) let existing_max = existing_cfg
.ok() .settings
.and_then(|v| { .iter()
v.settings .find(|s| s.meta.key == "CoaBots.AutoLogin.MaxCount")
.iter() .and_then(|s| s.value.as_u64())
.find(|s| s.meta.key == "CoaBots.AutoLogin.MaxCount")
.and_then(|s| s.value.as_u64())
})
.unwrap_or(0) as u32; .unwrap_or(0) as u32;
let already = coa_core::population::query(&root) let already = coa_core::population::query_for_realm(&root, mode)
.map(|p| p.bots_total) .map(|p| p.bots_total)
.unwrap_or(0); .unwrap_or(0);
changes.insert( changes.insert(
"CoaBots.AutoLogin.MaxCount".to_string(), "CoaBots.AutoLogin.MaxCount".to_string(),
Value::from(existing_max.max(already + count).min(5000)), Value::from(existing_max.max(already + count).min(5000)),
); );
config::save(&root, &meta, Scope::Bots, &changes)?; config::save(&target.world_root, &meta, Scope::Bots, &changes)?;
let o = coa_core::process::observe(&root, &layout::read_ports(&root));
// Large batches while the server is stopped: create them in the database right now, fully equipped.
if o.world.state == coa_core::process::ServiceState::Stopped
&& o.auth.state == coa_core::process::ServiceState::Stopped
&& count >= coa_core::companions::OFFLINE_MIN
&& coa_core::companions::offline_factory(&root).is_some()
{
let started_db = o.mysql.state != coa_core::process::ServiceState::Running;
if started_db {
let out = driver::run(&root, Verb::StartMysql)?;
if !out.ok {
return Err(Error::Invalid("The database could not be started.".into()));
}
}
let made = (|| -> Result<()> {
coa_core::companions::ensure_templates(&coa_core::db::Db::from_repack(
&root,
coa_core::db::Account::Admin,
)?)?;
coa_core::companions::offline_create(
&root,
&meta.join("logs").join("companions-offline.log"),
count,
)?;
Ok(())
})();
if started_db {
let _ = driver::run(&root, Verb::StopAll);
}
made?;
tracing::info!(count, "companions created offline");
return Ok(CompanionsResult {
spawned: None,
created: Some(count),
baseline: None,
});
}
let mut baseline = None; let mut baseline = None;
let spawned = if o.world.state == coa_core::process::ServiceState::Running { let spawned = if target.running {
// Older servers have no template characters to copy bots from: add them first. if let Ok(admin_db) = coa_core::db::Db::from_repack(&root, coa_core::db::Account::Admin) {
coa_core::companions::ensure_templates(&coa_core::db::Db::from_repack( let _ = coa_core::companions::ensure_templates_for_schema(&admin_db, target.chars_db);
&root, }
coa_core::db::Account::Admin, baseline = coa_core::population::query_for_realm(&root, mode)
)?)?;
baseline = coa_core::population::query(&root)
.ok() .ok()
.map(|p| p.bots_total); .map(|p| p.bots_total);
Some(Ra::connect(&root)?.spawn_bots(count)?) let mut ra = Ra::connect_target(&root, Some(mode))?;
if let Some(lvl) = level {
Some(ra.spawn_custom(count, lvl, class_id, spec_id, archetype.as_deref())?)
} else {
Some(ra.spawn_bots(count)?)
}
} else { } else {
// The server is stopped: creating bots needs it running, so remember the request and do it after the next start. let _ = coa_core::companions::migrate_legacy_pending_job(&meta, &id);
coa_core::fsx::atomic_write_json( let mut job = coa_core::companions::CompanionsPendingJob::new(
&meta.join("companions.pending.json"), &id,
&serde_json::json!({ "count": count }), mode.name(),
)?; count,
level,
class_id,
spec_id,
archetype.clone(),
);
if let Ok(admin_db) = coa_core::db::Db::from_repack(&root, coa_core::db::Account::Admin) {
if let Ok(snap) = coa_core::companions::query_bot_db_snapshot(&root, &admin_db, target.chars_db, None) {
job.baseline_bot_count = Some(snap.bot_count);
job.baseline_max_guid = Some(snap.max_guid);
}
}
coa_core::companions::save_pending_job(&meta, mode.name(), &job)?;
None None
}; };
tracing::info!(count, spawned = spawned.is_some(), "companions requested"); tracing::info!(count, spawned = spawned.is_some(), "companions requested");
@@ -2299,6 +2506,27 @@ async fn add_companions(
.await .await
} }
#[tauri::command]
async fn get_wildcard_archetypes(
state: State<'_, AppState>,
id: String,
) -> std::result::Result<Vec<coa_core::companions::WildcardArchetypeDto>, UiError> {
let root = path_of(&state, &id)?;
blocking(move || {
let db = coa_core::db::Db::from_repack(&root, coa_core::db::Account::Admin)?;
let target = coa_core::multiworld::resolve_bot_operation_target(&root, coa_core::realms::Mode::Wildcard)
.unwrap_or_else(|_| coa_core::multiworld::BotOperationTarget {
world_root: root.clone(),
chars_db: "acore_characters_wildcard",
ra_port: 3444,
running: false,
realm: coa_core::realms::Mode::Wildcard,
});
Ok(coa_core::companions::list_wildcard_archetypes(&db, target.chars_db)?)
})
.await
}
const REMOTE_CLIENT_ID: &str = "@remote-client"; const REMOTE_CLIENT_ID: &str = "@remote-client";
fn remote_dir() -> PathBuf { fn remote_dir() -> PathBuf {
@@ -2493,13 +2721,6 @@ fn client_install_addon(
struct ClientStatus { struct ClientStatus {
/// A usable client folder is linked to this server. /// A usable client folder is linked to this server.
linked: bool, linked: bool,
/// The Manager keeps this folder up to date (it downloaded it or was asked to adopt it).
managed: bool,
installed_version: Option<String>,
latest_version: Option<String>,
latest_bytes: Option<u64>,
/// A managed client is older than the published one (or its download never finished).
update_available: bool,
} }
fn linked_client(root: &std::path::Path) -> Result<Option<PathBuf>> { fn linked_client(root: &std::path::Path) -> Result<Option<PathBuf>> {
@@ -2510,192 +2731,16 @@ fn linked_client(root: &std::path::Path) -> Result<Option<PathBuf>> {
.filter(|p| coa_core::client::detect(p, None).is_some())) .filter(|p| coa_core::client::detect(p, None).is_some()))
} }
/// Cheap: one small manifest request and the local state file; no game file is read. /// Whether a usable client folder is linked. Local only; the Manager no longer downloads or updates the client.
#[tauri::command] #[tauri::command]
async fn client_status( fn client_status(
state: State<'_, AppState>, state: State<'_, AppState>,
id: String, id: String,
) -> std::result::Result<ClientStatus, UiError> { ) -> std::result::Result<ClientStatus, UiError> {
let ctx = client_context(&state, &id)?; let ctx = client_context(&state, &id)?;
blocking(move || { Ok(ClientStatus {
let client = ctx.linked(); linked: ctx.linked().is_some(),
let latest = coa_core::clientdl::fetch_latest().ok();
let local = client.as_deref().map(coa_core::clientdl::local);
let managed = local.as_ref().map(|l| l.managed).unwrap_or(false);
let installed = local.and_then(|l| l.version);
let update_available = managed
&& latest
.as_ref()
.map(|l| installed.as_deref() != Some(l.version.as_str()))
.unwrap_or(false);
Ok(ClientStatus {
linked: client.is_some(),
managed,
installed_version: installed,
latest_bytes: latest.as_ref().map(|l| l.total_bytes()),
latest_version: latest.map(|l| l.version),
update_available,
})
}) })
.await
}
#[derive(Serialize)]
struct ClientDownloadCheck {
needed_bytes: u64,
free_bytes: u64,
version: String,
/// Where the client would go.
dest: String,
}
const CLIENT_FOLDER: &str = "CoA Client";
#[tauri::command]
async fn client_download_check(
parent: String,
) -> std::result::Result<ClientDownloadCheck, UiError> {
blocking(move || {
let latest = coa_core::clientdl::fetch_latest()?;
let dest = PathBuf::from(&parent).join(CLIENT_FOLDER);
Ok(ClientDownloadCheck {
needed_bytes: latest.total_bytes(),
free_bytes: coa_core::fsx::free_space(std::path::Path::new(&parent))?,
version: latest.version,
dest: dest.to_string_lossy().into_owned(),
})
})
.await
}
/// Compare the linked client with the published one. Hashes files only where the recorded state cannot vouch for them.
#[tauri::command]
async fn client_plan(
app: AppHandle,
state: State<'_, AppState>,
id: String,
) -> std::result::Result<coa_core::clientdl::Plan, UiError> {
let ctx = client_context(&state, &id)?;
let cancel = begin_client_job(&state)?;
let result = blocking(move || {
let client = ctx.require()?;
let manifest = coa_core::clientdl::fetch_latest()?;
let current = coa_core::clientdl::load_state(&client).unwrap_or_default();
coa_core::clientdl::plan(&client, &manifest, &current, &cancel, &|s| {
let _ = app.emit("client-progress", s);
})
})
.await;
end_client_job(&state);
result
}
/// Bring the linked client to the published version. `keep_modified` leaves files the player changed alone.
#[tauri::command]
async fn client_sync(
app: AppHandle,
state: State<'_, AppState>,
id: String,
keep_modified: bool,
) -> std::result::Result<(), UiError> {
let ctx = client_context(&state, &id)?;
let cancel = begin_client_job(&state)?;
let result = blocking(move || {
let client = ctx.require()?;
run_client_sync(&app, &client, keep_modified, &cancel)?;
if ctx.root.is_none() && !ctx.host.is_empty() {
coa_core::client::set_realmlist(&client, &ctx.dir, &ctx.host)?;
}
Ok(())
})
.await;
end_client_job(&state);
result
}
fn run_client_sync(
app: &AppHandle,
client: &std::path::Path,
keep_modified: bool,
cancel: &Cancel,
) -> Result<()> {
let emit = |s: coa_core::clientdl::Step| {
let _ = app.emit("client-progress", s);
};
let manifest = coa_core::clientdl::fetch_latest()?;
let current = coa_core::clientdl::load_state(client).unwrap_or_default();
let plan = coa_core::clientdl::plan(client, &manifest, &current, cancel, &emit)?;
coa_core::download::check_url(coa_core::clientdl::OBJECTS_URL)?;
let transport = coa_core::download::HttpTransport::new()?;
coa_core::clientdl::apply(
&coa_core::clientdl::Apply {
client,
manifest: &manifest,
plan: &plan,
keep_modified,
transport: &transport,
objects_url: coa_core::clientdl::OBJECTS_URL,
cancel,
},
&emit,
)?;
tracing::info!(version = %manifest.version, downloaded = plan.items.len(), "client brought up to date");
Ok(())
}
/// Download the client into `<parent>/CoA Client`, then link it to a host or player profile.
#[tauri::command]
async fn client_download(
app: AppHandle,
state: State<'_, AppState>,
id: String,
parent: String,
) -> std::result::Result<coa_core::client::ClientInfo, UiError> {
let ctx = client_context(&state, &id)?;
let cancel = begin_client_job(&state)?;
let result = blocking(move || {
let parent = PathBuf::from(&parent);
if !parent.is_dir() {
return Err(Error::Invalid(
"Choose an existing folder to put the game client in.".into(),
));
}
let dest = parent.join(CLIENT_FOLDER);
let resuming = coa_core::clientdl::load_state(&dest).is_some();
let non_empty = std::fs::read_dir(&dest)
.map(|mut r| r.next().is_some())
.unwrap_or(false);
if non_empty && !resuming {
return Err(Error::Invalid(format!(
"{} already exists and is not an unfinished download. Choose another folder.",
dest.display()
)));
}
std::fs::create_dir_all(&dest)?;
run_client_sync(&app, &dest, false, &cancel)?;
let info = coa_core::client::detect(&dest, ctx.source.as_deref())
.ok_or_else(|| Error::Invalid("The downloaded client looks incomplete.".into()))?;
ctx.link(&info.path)?;
if !ctx.host.is_empty() {
coa_core::client::set_realmlist(&dest, &ctx.dir, &ctx.host)?;
}
if let Some(src) = &ctx.source {
coa_core::client::install_addon(&dest, &ctx.dir, src)?;
}
Ok(coa_core::client::detect(&dest, ctx.source.as_deref()).unwrap_or(info))
})
.await;
end_client_job(&state);
result
}
#[tauri::command]
fn client_cancel(state: State<'_, AppState>) {
if let Ok(c) = state.client_cancel.lock() {
if let Some(c) = c.as_ref() {
c.cancel();
}
}
} }
fn begin_client_job(state: &AppState) -> std::result::Result<Cancel, UiError> { fn begin_client_job(state: &AppState) -> std::result::Result<Cancel, UiError> {
@@ -2704,10 +2749,7 @@ fn begin_client_job(state: &AppState) -> std::result::Result<Cancel, UiError> {
.lock() .lock()
.map_err(|_| Error::Invalid("state poisoned".into()))?; .map_err(|_| Error::Invalid("state poisoned".into()))?;
if slot.is_some() { if slot.is_some() {
return Err(Error::Invalid( return Err(Error::Invalid("A game client operation is already running.".into()).into());
"The game client is already being checked or downloaded.".into(),
)
.into());
} }
let cancel = Cancel::default(); let cancel = Cancel::default();
*slot = Some(cancel.clone()); *slot = Some(cancel.clone());
@@ -2841,6 +2883,7 @@ fn open_link(url: String) -> std::result::Result<(), UiError> {
"https://login.tailscale.com/", "https://login.tailscale.com/",
"https://portforward.com/", "https://portforward.com/",
"https://github.com/Corfirean/", "https://github.com/Corfirean/",
"https://conquestofazerothcore.to/",
]; ];
// A prefilled "new issue" page of one of the places a report can go (the Manager, Companions, SQUID Playerbots): the // A prefilled "new issue" page of one of the places a report can go (the Manager, Companions, SQUID Playerbots): the
// address must be exactly that page, and its query may carry `&` between the (percent-encoded) title and text. // address must be exactly that page, and its query may carry `&` between the (percent-encoded) title and text.
@@ -3722,7 +3765,10 @@ pub fn run() {
.build(), .build(),
) )
.invoke_handler(tauri::generate_handler![ .invoke_handler(tauri::generate_handler![
server_logging_state,
server_logging_preset, server_logging_preset,
server_logging_settings_save,
server_logs_clean,
release_history, release_history,
preview_toolchain_status, preview_toolchain_status,
preview_install_msvc, preview_install_msvc,
@@ -3797,6 +3843,7 @@ pub fn run() {
repair_server, repair_server,
plugins_repair, plugins_repair,
module_set_enabled, module_set_enabled,
module_update,
module_settings, module_settings,
module_save_settings, module_save_settings,
all_settings, all_settings,
@@ -3823,10 +3870,14 @@ pub fn run() {
companions_take_offline, companions_take_offline,
companions_delete_all, companions_delete_all,
companions_despawn_some, companions_despawn_some,
companions_login_all,
companions_spawn_fleet,
open_link, open_link,
report_targets, report_targets,
companion_sizes, companion_sizes,
add_companions, add_companions,
top_up_startup_fleet,
get_wildcard_archetypes,
remote_connection, remote_connection,
remote_connect, remote_connect,
client_info, client_info,
@@ -3836,11 +3887,6 @@ pub fn run() {
client_realmlist, client_realmlist,
client_install_addon, client_install_addon,
client_status, client_status,
client_download_check,
client_plan,
client_sync,
client_download,
client_cancel,
play, play,
friends_status, friends_status,
friends_check_internet, friends_check_internet,
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"$schema": "https://schema.tauri.app/config/2", "$schema": "https://schema.tauri.app/config/2",
"productName": "CSM Modules Preview", "productName": "CSM Modules Preview",
"version": "0.9.11", "version": "0.9.15",
"identifier": "com.corfirean.csm-modules-preview", "identifier": "com.corfirean.csm-modules-preview",
"build": { "build": {
"beforeBuildCommand": "npm run build", "beforeBuildCommand": "npm run build",
+5
View File
@@ -49,3 +49,8 @@ Manager 0.9.13 refreshes the bundled server history through 0.261114.106 from
canonical build commit `3308e3a957cd9fd1a2cd145a7f023f2cf521c54c` on 2026-11-15. canonical build commit `3308e3a957cd9fd1a2cd145a7f023f2cf521c54c` on 2026-11-15.
The reviewed upcoming Manager and server records (Custom Races V2, 213 server notes) The reviewed upcoming Manager and server records (Custom Races V2, 213 server notes)
carry translations in all five languages. carry translations in all five languages.
Manager 0.9.14 refreshes the bundled server history through 0.261115.110 from
canonical build commit `45c013be9ade3001581e5201cacda6cd6bb6b01c` on 2026-11-16.
The reviewed upcoming Manager (12 notes) and server (6 notes) records
carry translations in all five languages.
+135 -10
View File
@@ -40,7 +40,26 @@
"Update and recovery checks use the temporary login port even with a Windows override": "Проверка обновления и восстановления использует временный порт входа даже при переопределении в Windows", "Update and recovery checks use the temporary login port even with a Windows override": "Проверка обновления и восстановления использует временный порт входа даже при переопределении в Windows",
"Custom Races patch installation recovers from interrupted downloads": "Установка патчей дополнительных рас восстанавливается после прерывания загрузки", "Custom Races patch installation recovers from interrupted downloads": "Установка патчей дополнительных рас восстанавливается после прерывания загрузки",
"Settings for how much help bots get in dungeons and raids": "Настройки того, насколько ботам помогать в подземельях и рейдах", "Settings for how much help bots get in dungeons and raids": "Настройки того, насколько ботам помогать в подземельях и рейдах",
"The custom races client is updated to Custom Races V2": "Клиент пользовательских рас обновлён до Custom Races V2" "The custom races client is updated to Custom Races V2": "Клиент пользовательских рас обновлён до Custom Races V2",
"Install community addons from the Manager": "Аддоны сообщества устанавливаются прямо из Manager",
"Old item and creature data is cleared before every Play": "Устаревшие данные о предметах и существах очищаются перед каждым запуском",
"Turning the custom races client patch on or off takes seconds again": "Клиентский патч кастомных рас снова включается и выключается за секунды",
"The database moves to a free port when Windows reserves or another program takes 3307": "База данных переходит на свободный порт, если 3307 зарезервирован Windows или занят другой программой",
"Your own MySQL settings survive restarts and updates": "Свои настройки MySQL сохраняются после перезапусков и обновлений",
"Disabled custom races stay disabled after a server update that adds races": "Отключённые кастомные расы остаются отключёнными после обновления сервера, добавляющего расы",
"Rename your realms in the Manager": "Реалмы можно переименовать в Manager",
"The account for a friend's server is in the login box at every Play": "Аккаунт для сервера друга подставляется в окно входа при каждом запуске",
"Restart the world every day at a chosen time": "Ежедневный перезапуск мира в выбранное время",
"Switches for the Custom Races V2 subclasses, Hero Races and the /dev menu": "Переключатели подклассов, героических рас и меню /dev из Custom Races V2",
"Companion bots on Wildcard and Warcraft Reborn": "Боты-компаньоны на Wildcard и Warcraft Reborn",
"The Custom Races card tells which characters stay out while races are off": "Карточка Custom Races показывает, какие персонажи не войдут в мир, пока расы выключены",
"The Custom Races client update brings version 2.0.2": "Обновление клиента Custom Races приносит версию 2.0.2",
"The game client now comes from the community launcher, not from the Manager": "Игровой клиент теперь берётся из лаунчера сообщества, а не из Менеджера",
"Client setup says where to switch HD graphics; Custom Races patch card is translated": "Установка клиента подсказывает, где переключить HD-графику; карточка патча Custom Races переведена",
"Clean server logs by hand or automatically when they grow too big": "Очищайте логи сервера вручную или автоматически, когда они становятся слишком большими",
"The startup limit for companions now creates the ones that are missing": "Лимит запуска компаньонов теперь создаёт недостающих",
"Restart the world every week on a chosen day and time": "Перезапускайте мир каждую неделю в выбранный день и время",
"The game client link points to the new community site, conquestofazerothcore.to": "Ссылка на клиент игры ведёт на новый сайт сообщества conquestofazerothcore.to"
}, },
"de": { "de": {
"Choose Parallel or Global level scaling in module settings": "Parallele oder globale Levelskalierung in den Moduleinstellungen wählen", "Choose Parallel or Global level scaling in module settings": "Parallele oder globale Levelskalierung in den Moduleinstellungen wählen",
@@ -82,7 +101,26 @@
"Update and recovery checks use the temporary login port even with a Windows override": "Update- und Wiederherstellungsprüfungen verwenden den temporären Anmeldeport auch bei einer Windows-Vorgabe", "Update and recovery checks use the temporary login port even with a Windows override": "Update- und Wiederherstellungsprüfungen verwenden den temporären Anmeldeport auch bei einer Windows-Vorgabe",
"Custom Races patch installation recovers from interrupted downloads": "Die Installation zusätzlicher Völker setzt unterbrochene Downloads fort", "Custom Races patch installation recovers from interrupted downloads": "Die Installation zusätzlicher Völker setzt unterbrochene Downloads fort",
"Settings for how much help bots get in dungeons and raids": "Einstellungen, wie viel Hilfe Bots in Dungeons und Schlachtzügen erhalten", "Settings for how much help bots get in dungeons and raids": "Einstellungen, wie viel Hilfe Bots in Dungeons und Schlachtzügen erhalten",
"The custom races client is updated to Custom Races V2": "Der Client für eigene Völker wird auf Custom Races V2 aktualisiert" "The custom races client is updated to Custom Races V2": "Der Client für eigene Völker wird auf Custom Races V2 aktualisiert",
"Install community addons from the Manager": "Community-Addons direkt aus dem Manager installieren",
"Old item and creature data is cleared before every Play": "Veraltete Gegenstands- und Kreaturdaten werden vor jedem Start gelöscht",
"Turning the custom races client patch on or off takes seconds again": "Der Client-Patch für eigene Völker lässt sich wieder in Sekunden ein- und ausschalten",
"The database moves to a free port when Windows reserves or another program takes 3307": "Die Datenbank weicht auf einen freien Port aus, wenn Windows 3307 reserviert oder ein anderes Programm ihn belegt",
"Your own MySQL settings survive restarts and updates": "Eigene MySQL-Einstellungen bleiben nach Neustarts und Updates erhalten",
"Disabled custom races stay disabled after a server update that adds races": "Deaktivierte eigene Völker bleiben nach einem Server-Update mit neuen Völkern deaktiviert",
"Rename your realms in the Manager": "Realms im Manager umbenennen",
"The account for a friend's server is in the login box at every Play": "Das Konto für den Server eines Freundes steht bei jedem Start im Anmeldefeld",
"Restart the world every day at a chosen time": "Die Welt täglich zu einer gewählten Uhrzeit neu starten",
"Switches for the Custom Races V2 subclasses, Hero Races and the /dev menu": "Schalter für die Unterklassen, Heldenvölker und das /dev-Menü von Custom Races V2",
"Companion bots on Wildcard and Warcraft Reborn": "Begleiter-Bots auf Wildcard und Warcraft Reborn",
"The Custom Races card tells which characters stay out while races are off": "Die Custom-Races-Karte zeigt, welche Figuren draußen bleiben, solange die Völker aus sind",
"The Custom Races client update brings version 2.0.2": "Das Update des Custom-Races-Clients bringt Version 2.0.2",
"The game client now comes from the community launcher, not from the Manager": "Der Spielclient kommt jetzt vom Community-Launcher und nicht mehr vom Manager",
"Client setup says where to switch HD graphics; Custom Races patch card is translated": "Die Client-Einrichtung sagt, wo man die HD-Grafik umschaltet; die Karte des Custom-Races-Patches ist übersetzt",
"Clean server logs by hand or automatically when they grow too big": "Serverlogs von Hand oder automatisch bereinigen, wenn sie zu groß werden",
"The startup limit for companions now creates the ones that are missing": "Das Startlimit für Begleiter erstellt jetzt die fehlenden",
"Restart the world every week on a chosen day and time": "Die Welt jede Woche an einem gewählten Tag und zu einer gewählten Zeit neu starten",
"The game client link points to the new community site, conquestofazerothcore.to": "Der Link zum Spielclient führt jetzt zur neuen Community-Website conquestofazerothcore.to"
}, },
"fr": { "fr": {
"Choose Parallel or Global level scaling in module settings": "Choisissez une progression parallèle ou globale des niveaux dans les paramètres du module", "Choose Parallel or Global level scaling in module settings": "Choisissez une progression parallèle ou globale des niveaux dans les paramètres du module",
@@ -124,7 +162,26 @@
"Update and recovery checks use the temporary login port even with a Windows override": "Les contrôles de mise à jour et de restauration utilisent le port de connexion temporaire même si Windows en impose un autre", "Update and recovery checks use the temporary login port even with a Windows override": "Les contrôles de mise à jour et de restauration utilisent le port de connexion temporaire même si Windows en impose un autre",
"Custom Races patch installation recovers from interrupted downloads": "L’installation des races supplémentaires reprend les téléchargements interrompus", "Custom Races patch installation recovers from interrupted downloads": "L’installation des races supplémentaires reprend les téléchargements interrompus",
"Settings for how much help bots get in dungeons and raids": "Réglages de l'aide accordée aux bots en donjon et en raid", "Settings for how much help bots get in dungeons and raids": "Réglages de l'aide accordée aux bots en donjon et en raid",
"The custom races client is updated to Custom Races V2": "Le client des races personnalisées passe à Custom Races V2" "The custom races client is updated to Custom Races V2": "Le client des races personnalisées passe à Custom Races V2",
"Install community addons from the Manager": "Installez des addons de la communauté depuis le Manager",
"Old item and creature data is cleared before every Play": "Les anciennes données d'objets et de créatures sont effacées avant chaque lancement",
"Turning the custom races client patch on or off takes seconds again": "Activer ou désactiver le patch client des races personnalisées reprend quelques secondes",
"The database moves to a free port when Windows reserves or another program takes 3307": "La base de données passe sur un port libre si Windows réserve le 3307 ou si un autre programme l'utilise",
"Your own MySQL settings survive restarts and updates": "Vos réglages MySQL survivent aux redémarrages et aux mises à jour",
"Disabled custom races stay disabled after a server update that adds races": "Les races personnalisées désactivées le restent après une mise à jour du serveur qui ajoute des races",
"Rename your realms in the Manager": "Renommez vos royaumes dans le Manager",
"The account for a friend's server is in the login box at every Play": "Le compte du serveur d'un ami est rempli à chaque lancement",
"Restart the world every day at a chosen time": "Redémarrez le monde chaque jour à l'heure choisie",
"Switches for the Custom Races V2 subclasses, Hero Races and the /dev menu": "Interrupteurs pour les sous-classes, races héroïques et le menu /dev de Custom Races V2",
"Companion bots on Wildcard and Warcraft Reborn": "Bots compagnons sur Wildcard et Warcraft Reborn",
"The Custom Races card tells which characters stay out while races are off": "La carte Custom Races indique quels personnages restent hors du monde quand les races sont désactivées",
"The Custom Races client update brings version 2.0.2": "La mise à jour du client Custom Races apporte la version 2.0.2",
"The game client now comes from the community launcher, not from the Manager": "Le client du jeu vient désormais du lanceur de la communauté, plus du Manager",
"Client setup says where to switch HD graphics; Custom Races patch card is translated": "La configuration du client indique où changer les graphismes HD ; la carte du patch Custom Races est traduite",
"Clean server logs by hand or automatically when they grow too big": "Nettoyez les journaux du serveur à la main ou automatiquement quand ils deviennent trop gros",
"The startup limit for companions now creates the ones that are missing": "La limite de démarrage des compagnons crée maintenant ceux qui manquent",
"Restart the world every week on a chosen day and time": "Redémarrez le monde chaque semaine au jour et à l’heure choisis",
"The game client link points to the new community site, conquestofazerothcore.to": "Le lien vers le client du jeu mène au nouveau site de la communauté, conquestofazerothcore.to"
}, },
"es": { "es": {
"Choose Parallel or Global level scaling in module settings": "Elige escalado de nivel paralelo o global en los ajustes del módulo", "Choose Parallel or Global level scaling in module settings": "Elige escalado de nivel paralelo o global en los ajustes del módulo",
@@ -166,7 +223,26 @@
"Update and recovery checks use the temporary login port even with a Windows override": "Las comprobaciones de actualización y recuperación usan el puerto temporal de acceso aunque Windows indique otro", "Update and recovery checks use the temporary login port even with a Windows override": "Las comprobaciones de actualización y recuperación usan el puerto temporal de acceso aunque Windows indique otro",
"Custom Races patch installation recovers from interrupted downloads": "La instalación de razas adicionales se recupera de descargas interrumpidas", "Custom Races patch installation recovers from interrupted downloads": "La instalación de razas adicionales se recupera de descargas interrumpidas",
"Settings for how much help bots get in dungeons and raids": "Ajustes de cuánta ayuda reciben los bots en mazmorras y bandas", "Settings for how much help bots get in dungeons and raids": "Ajustes de cuánta ayuda reciben los bots en mazmorras y bandas",
"The custom races client is updated to Custom Races V2": "El cliente de razas personalizadas se actualiza a Custom Races V2" "The custom races client is updated to Custom Races V2": "El cliente de razas personalizadas se actualiza a Custom Races V2",
"Install community addons from the Manager": "Instala addons de la comunidad desde el Manager",
"Old item and creature data is cleared before every Play": "Los datos antiguos de objetos y criaturas se borran antes de cada partida",
"Turning the custom races client patch on or off takes seconds again": "Activar o desactivar el parche de cliente de razas personalizadas vuelve a tardar segundos",
"The database moves to a free port when Windows reserves or another program takes 3307": "La base de datos pasa a un puerto libre si Windows reserva el 3307 u otro programa lo ocupa",
"Your own MySQL settings survive restarts and updates": "Tus ajustes de MySQL se mantienen tras reinicios y actualizaciones",
"Disabled custom races stay disabled after a server update that adds races": "Las razas personalizadas desactivadas siguen desactivadas tras una actualización del servidor que añade razas",
"Rename your realms in the Manager": "Cambia el nombre de tus reinos en el Manager",
"The account for a friend's server is in the login box at every Play": "La cuenta del servidor de un amigo aparece en el inicio de sesión en cada partida",
"Restart the world every day at a chosen time": "Reinicia el mundo cada día a la hora elegida",
"Switches for the Custom Races V2 subclasses, Hero Races and the /dev menu": "Interruptores para las subclases, razas heroicas y el menú /dev de Custom Races V2",
"Companion bots on Wildcard and Warcraft Reborn": "Bots acompañantes en Wildcard y Warcraft Reborn",
"The Custom Races card tells which characters stay out while races are off": "La tarjeta Custom Races indica qué personajes quedan fuera mientras las razas están desactivadas",
"The Custom Races client update brings version 2.0.2": "La actualización del cliente de Custom Races trae la versión 2.0.2",
"The game client now comes from the community launcher, not from the Manager": "El cliente del juego ahora viene del launcher de la comunidad, no del Manager",
"Client setup says where to switch HD graphics; Custom Races patch card is translated": "La configuración del cliente indica dónde cambiar los gráficos HD; la tarjeta del parche de Custom Races está traducida",
"Clean server logs by hand or automatically when they grow too big": "Limpia los registros del servidor a mano o automáticamente cuando crecen demasiado",
"The startup limit for companions now creates the ones that are missing": "El límite de inicio de los compañeros ahora crea los que faltan",
"Restart the world every week on a chosen day and time": "Reinicia el mundo cada semana en el día y la hora elegidos",
"The game client link points to the new community site, conquestofazerothcore.to": "El enlace al cliente del juego apunta al nuevo sitio de la comunidad, conquestofazerothcore.to"
}, },
"zh": { "zh": {
"Choose Parallel or Global level scaling in module settings": "在模块设置中选择并行或全局等级缩放", "Choose Parallel or Global level scaling in module settings": "在模块设置中选择并行或全局等级缩放",
@@ -208,7 +284,26 @@
"Update and recovery checks use the temporary login port even with a Windows override": "即使 Windows 指定了其他端口,更新和恢复检查也会使用临时登录端口", "Update and recovery checks use the temporary login port even with a Windows override": "即使 Windows 指定了其他端口,更新和恢复检查也会使用临时登录端口",
"Custom Races patch installation recovers from interrupted downloads": "自定义种族补丁安装可从中断的下载中恢复", "Custom Races patch installation recovers from interrupted downloads": "自定义种族补丁安装可从中断的下载中恢复",
"Settings for how much help bots get in dungeons and raids": "设置机器人在地下城和团队副本中获得多少加成", "Settings for how much help bots get in dungeons and raids": "设置机器人在地下城和团队副本中获得多少加成",
"The custom races client is updated to Custom Races V2": "自定义种族客户端已更新至 Custom Races V2" "The custom races client is updated to Custom Races V2": "自定义种族客户端已更新至 Custom Races V2",
"Install community addons from the Manager": "可在 Manager 中安装社区插件",
"Old item and creature data is cleared before every Play": "每次启动前清除过时的物品和生物数据",
"Turning the custom races client patch on or off takes seconds again": "自定义种族客户端补丁的开关再次只需几秒",
"The database moves to a free port when Windows reserves or another program takes 3307": "当 3307 被 Windows 保留或被其他程序占用时,数据库会改用空闲端口",
"Your own MySQL settings survive restarts and updates": "自定义 MySQL 设置在重启和更新后保留",
"Disabled custom races stay disabled after a server update that adds races": "服务器更新新增种族后,已禁用的自定义种族保持禁用",
"Rename your realms in the Manager": "可在 Manager 中重命名服务器",
"The account for a friend's server is in the login box at every Play": "每次启动时都会自动填入朋友服务器的账号",
"Restart the world every day at a chosen time": "每天在选定时间重启世界",
"Switches for the Custom Races V2 subclasses, Hero Races and the /dev menu": "Custom Races V2 副职业、英雄种族和 /dev 菜单的开关",
"Companion bots on Wildcard and Warcraft Reborn": "Wildcard 和 Warcraft Reborn 上的伙伴机器人",
"The Custom Races card tells which characters stay out while races are off": "Custom Races 卡片会显示种族关闭时哪些角色无法进入世界",
"The Custom Races client update brings version 2.0.2": "Custom Races 客户端更新带来 2.0.2 版本",
"The game client now comes from the community launcher, not from the Manager": "游戏客户端现在来自社区启动器,而不是 Manager",
"Client setup says where to switch HD graphics; Custom Races patch card is translated": "客户端设置会说明在哪里切换 HD 画质;Custom Races 补丁卡片已翻译",
"Clean server logs by hand or automatically when they grow too big": "手动清理服务器日志,或在日志过大时自动清理",
"The startup limit for companions now creates the ones that are missing": "同伴的启动上限现在会创建缺少的同伴",
"Restart the world every week on a chosen day and time": "每周在选定的日期和时间重启世界",
"The game client link points to the new community site, conquestofazerothcore.to": "游戏客户端链接现指向新的社区网站 conquestofazerothcore.to"
} }
}, },
"server": { "server": {
@@ -498,7 +593,13 @@
"The character sheet of a Two-Players head shows the other head's class": "Лист персонажа головы Two-Players показывает класс второй головы", "The character sheet of a Two-Players head shows the other head's class": "Лист персонажа головы Two-Players показывает класс второй головы",
"Two-Players Ogres can fit a carried mount in a window and share the fit": "Огры Two-Players могут подогнать переносимого маунта в окне и поделиться подгонкой", "Two-Players Ogres can fit a carried mount in a window and share the fit": "Огры Two-Players могут подогнать переносимого маунта в окне и поделиться подгонкой",
"Custom Races V2 with 17 new races, subclasses and the Fading Island": "Custom Races V2: 17 новых рас, подклассы и Fading Island", "Custom Races V2 with 17 new races, subclasses and the Fading Island": "Custom Races V2: 17 новых рас, подклассы и Fading Island",
"Updated Custom Races to 2.0": "Custom Races обновлён до 2.0" "Updated Custom Races to 2.0": "Custom Races обновлён до 2.0",
"Custom races stay on when an update changes the race catalog": "Кастомные расы остаются включёнными, когда обновление меняет каталог рас",
"Server support for companion bots on Wildcard and Warcraft Reborn": "Сервер поддерживает ботов-компаньонов на Wildcard и Warcraft Reborn",
"Custom-race characters stay out of the world while custom races are off": "Персонажи кастомных рас не входят в мир, пока кастомные расы выключены",
"Companion bots play Wildcard and Warcraft Reborn": "Боты-компаньоны играют на Wildcard и Warcraft Reborn",
"Stopping the server no longer leaves the world running now and then": "Остановка сервера больше не оставляет мир работающим время от времени",
"The server includes a native launcher for the world supervisor": "В сервер входит нативный лаунчер для супервизора мира"
}, },
"de": { "de": {
"Restrict new characters by custom race without changing existing characters": "Neue Charaktere nach zusätzlichem Volk beschränken, ohne bestehende Charaktere zu ändern", "Restrict new characters by custom race without changing existing characters": "Neue Charaktere nach zusätzlichem Volk beschränken, ohne bestehende Charaktere zu ändern",
@@ -786,7 +887,13 @@
"The character sheet of a Two-Players head shows the other head's class": "Der Charakterbogen eines Two-Players-Kopfes zeigt die Klasse des anderen Kopfes", "The character sheet of a Two-Players head shows the other head's class": "Der Charakterbogen eines Two-Players-Kopfes zeigt die Klasse des anderen Kopfes",
"Two-Players Ogres can fit a carried mount in a window and share the fit": "Two-Players-Oger können ein getragenes Reittier in einem Fenster anpassen und die Anpassung teilen", "Two-Players Ogres can fit a carried mount in a window and share the fit": "Two-Players-Oger können ein getragenes Reittier in einem Fenster anpassen und die Anpassung teilen",
"Custom Races V2 with 17 new races, subclasses and the Fading Island": "Custom Races V2 mit 17 neuen Völkern, Unterklassen und der Fading Island", "Custom Races V2 with 17 new races, subclasses and the Fading Island": "Custom Races V2 mit 17 neuen Völkern, Unterklassen und der Fading Island",
"Updated Custom Races to 2.0": "Custom Races auf 2.0 aktualisiert" "Updated Custom Races to 2.0": "Custom Races auf 2.0 aktualisiert",
"Custom races stay on when an update changes the race catalog": "Eigene Völker bleiben aktiv, wenn ein Update den Völkerkatalog ändert",
"Server support for companion bots on Wildcard and Warcraft Reborn": "Serverunterstützung für Begleiter-Bots auf Wildcard und Warcraft Reborn",
"Custom-race characters stay out of the world while custom races are off": "Figuren eigener Völker bleiben der Welt fern, solange eigene Völker aus sind",
"Companion bots play Wildcard and Warcraft Reborn": "Begleiter-Bots spielen Wildcard und Warcraft Reborn",
"Stopping the server no longer leaves the world running now and then": "Das Stoppen des Servers lässt die Welt nicht mehr gelegentlich weiterlaufen",
"The server includes a native launcher for the world supervisor": "Der Server enthält einen nativen Launcher für die Weltüberwachung"
}, },
"fr": { "fr": {
"Restrict new characters by custom race without changing existing characters": "Restreignez les races supplémentaires des nouveaux personnages sans modifier les personnages existants", "Restrict new characters by custom race without changing existing characters": "Restreignez les races supplémentaires des nouveaux personnages sans modifier les personnages existants",
@@ -1074,7 +1181,13 @@
"The character sheet of a Two-Players head shows the other head's class": "La fiche de personnage d'une tête Two-Players affiche la classe de l'autre tête", "The character sheet of a Two-Players head shows the other head's class": "La fiche de personnage d'une tête Two-Players affiche la classe de l'autre tête",
"Two-Players Ogres can fit a carried mount in a window and share the fit": "Les ogres Two-Players peuvent ajuster une monture portée dans une fenêtre et partager l'ajustement", "Two-Players Ogres can fit a carried mount in a window and share the fit": "Les ogres Two-Players peuvent ajuster une monture portée dans une fenêtre et partager l'ajustement",
"Custom Races V2 with 17 new races, subclasses and the Fading Island": "Custom Races V2 avec 17 nouvelles races, les sous-classes et la Fading Island", "Custom Races V2 with 17 new races, subclasses and the Fading Island": "Custom Races V2 avec 17 nouvelles races, les sous-classes et la Fading Island",
"Updated Custom Races to 2.0": "Custom Races passe en version 2.0" "Updated Custom Races to 2.0": "Custom Races passe en version 2.0",
"Custom races stay on when an update changes the race catalog": "Les races personnalisées restent actives quand une mise à jour change le catalogue des races",
"Server support for companion bots on Wildcard and Warcraft Reborn": "Prise en charge serveur des bots compagnons sur Wildcard et Warcraft Reborn",
"Custom-race characters stay out of the world while custom races are off": "Les personnages de races personnalisées restent hors du monde quand ces races sont désactivées",
"Companion bots play Wildcard and Warcraft Reborn": "Les bots compagnons jouent en Wildcard et Warcraft Reborn",
"Stopping the server no longer leaves the world running now and then": "Arrêter le serveur ne laisse plus parfois le monde tourner",
"The server includes a native launcher for the world supervisor": "Le serveur inclut un lanceur natif pour le superviseur du monde"
}, },
"es": { "es": {
"Restrict new characters by custom race without changing existing characters": "Restringe las razas adicionales de personajes nuevos sin modificar los existentes", "Restrict new characters by custom race without changing existing characters": "Restringe las razas adicionales de personajes nuevos sin modificar los existentes",
@@ -1362,7 +1475,13 @@
"The character sheet of a Two-Players head shows the other head's class": "La hoja de personaje de una cabeza Two-Players muestra la clase de la otra cabeza", "The character sheet of a Two-Players head shows the other head's class": "La hoja de personaje de una cabeza Two-Players muestra la clase de la otra cabeza",
"Two-Players Ogres can fit a carried mount in a window and share the fit": "Los ogros Two-Players pueden ajustar una montura transportada en una ventana y compartir el ajuste", "Two-Players Ogres can fit a carried mount in a window and share the fit": "Los ogros Two-Players pueden ajustar una montura transportada en una ventana y compartir el ajuste",
"Custom Races V2 with 17 new races, subclasses and the Fading Island": "Custom Races V2 con 17 razas nuevas, subclases y la Fading Island", "Custom Races V2 with 17 new races, subclasses and the Fading Island": "Custom Races V2 con 17 razas nuevas, subclases y la Fading Island",
"Updated Custom Races to 2.0": "Custom Races se actualiza a 2.0" "Updated Custom Races to 2.0": "Custom Races se actualiza a 2.0",
"Custom races stay on when an update changes the race catalog": "Las razas personalizadas siguen activas cuando una actualización cambia el catálogo de razas",
"Server support for companion bots on Wildcard and Warcraft Reborn": "Soporte del servidor para bots acompañantes en Wildcard y Warcraft Reborn",
"Custom-race characters stay out of the world while custom races are off": "Los personajes de razas personalizadas quedan fuera del mundo mientras esas razas están desactivadas",
"Companion bots play Wildcard and Warcraft Reborn": "Los bots acompañantes juegan en Wildcard y Warcraft Reborn",
"Stopping the server no longer leaves the world running now and then": "Detener el servidor ya no deja el mundo en marcha de vez en cuando",
"The server includes a native launcher for the world supervisor": "El servidor incluye un lanzador nativo para el supervisor del mundo"
}, },
"zh": { "zh": {
"Restrict new characters by custom race without changing existing characters": "限制新角色可选的自定义种族,不影响现有角色", "Restrict new characters by custom race without changing existing characters": "限制新角色可选的自定义种族,不影响现有角色",
@@ -1650,7 +1769,13 @@
"The character sheet of a Two-Players head shows the other head's class": "Two-Players 头的角色面板会显示另一个头的职业", "The character sheet of a Two-Players head shows the other head's class": "Two-Players 头的角色面板会显示另一个头的职业",
"Two-Players Ogres can fit a carried mount in a window and share the fit": "Two-Players 食人魔可以在窗口中调整携带的坐骑并共享调整结果", "Two-Players Ogres can fit a carried mount in a window and share the fit": "Two-Players 食人魔可以在窗口中调整携带的坐骑并共享调整结果",
"Custom Races V2 with 17 new races, subclasses and the Fading Island": "Custom Races V2:17 个新种族、副职业和 Fading Island", "Custom Races V2 with 17 new races, subclasses and the Fading Island": "Custom Races V2:17 个新种族、副职业和 Fading Island",
"Updated Custom Races to 2.0": "已将 Custom Races 更新至 2.0" "Updated Custom Races to 2.0": "已将 Custom Races 更新至 2.0",
"Custom races stay on when an update changes the race catalog": "更新改变种族目录时,自定义种族保持开启",
"Server support for companion bots on Wildcard and Warcraft Reborn": "服务器支持 Wildcard 和 Warcraft Reborn 上的伙伴机器人",
"Custom-race characters stay out of the world while custom races are off": "自定义种族关闭时,该类角色无法进入世界",
"Companion bots play Wildcard and Warcraft Reborn": "伙伴机器人可在 Wildcard 和 Warcraft Reborn 中游戏",
"Stopping the server no longer leaves the world running now and then": "停止服务器时不再偶尔让世界继续运行",
"The server includes a native launcher for the world supervisor": "服务器附带用于世界监管程序的原生启动器"
} }
} }
} }
+431
View File
@@ -1988,6 +1988,437 @@
}, },
"experimentalFeatures": [], "experimentalFeatures": [],
"compare": "https://github.com/Corfirean/coa-server-build/compare/server-0.261108.95...server-0.261114.106" "compare": "https://github.com/Corfirean/coa-server-build/compare/server-0.261108.95...server-0.261114.106"
},
{
"tag": "server-0.261115.110",
"version": "0.261115.110",
"date": "2026-11-15",
"url": "https://github.com/Corfirean/coa-server-build/releases/tag/server-0.261115.110",
"notes": [
"Test build of the subclass module for two-headed Ogres",
"Thin Twins can earn a subclass through their own quest, the Bravery Badge",
"A two-headed Ogre's ranged subclass can shoot at point-blank range",
"Ogres have a new racial, Tolerance",
"Standard-class Ogres and Thin Humans start with only their own class kit",
"Helmets sit on the Thin Human's head instead of his chest",
"LiveMon shows live damage, healing, crowd control and subclass combo statistics",
"Standard-class Ogres and Thin Twins can take a CoA class as their subclass",
"Thin Human and Two-Headed Ogre are now their own playable races",
"Subclassed relic users can hold a relic beside a ranged weapon",
"Server options to limit subclassing or turn the two subclass races off",
"A standard subclass brings its whole basic kit, skills and weapons",
"Two-Headed Ogres and Thin Humans with a standard class can now pick a subclass",
"Thin Humans find more gold with the Hand-Me-Downs racial",
"Two-Headed Ogres wear helmets on both heads",
"Flying mounts no longer fly in Kalimdor and the Eastern Kingdoms",
"LiveMon's character tab can be closed and goes away for deleted characters",
"Classic classes can be limited to their Wrath of the Lich King abilities",
"Dual Wield shows once in the spellbook",
"Two-Headed Ogres get Subclass Bar 1 for the other head's spells",
"Subclass forms leave Two-Headed Ogres in their own body and turn the twin brother instead",
"CoA subclass trees show their specialization painting in the subclass tab",
"Characters with a subclass no longer get Dual Specialization",
"You can hold only one subclass book and one insight at a time",
"Thin Humans and Two-Headed Ogres get the quests of their starting zone",
"The Bravery Badge and the Book of Origins look and read like a badge and a book",
"Ghost Wolf and Travel Form turn the whole ogre, and the twin brother rides the beast",
"Standard-class mains can spend points in their subclass trees and reset main talents",
"Your subclass's trainer can reset only your subclass talents",
"The Thin Human's cape lies along his back instead of sticking out like a board",
"The twin brother finishes pointing before hopping off and readies his weapon with you",
"The twin brother fights with his melee weapon up close and sits close behind you on mounts",
"The twin brother copies your pose on hover discs, carpets and other unusual mounts",
"Two-Headed Ogres sit in cars and keep their mace drawn after a shot",
"Two-Headed Ogres fight with a weapon in one hand and a gun in the other",
"The Ogre's Agree or Disagree racial now shows what it will do next",
"The Thin Twins' brother turns into a worgen in every subclass Cursed Form",
"Leaps and charges ordered for the Thin Twins' brother move him instead of you",
"CoA classes taken as a subclass get their class mechanics",
"Thin Twins and Two-Headed Ogres keep their weapons in a subclass Cursed Form",
"Hovering a Guardian standard no longer causes a Lua error",
"LiveMon shows specialization names instead of their signature spells",
"Ogre eyes are picked by colour, with a Blind checkbox for each eye",
"Two-headed ogres no longer keep casting after a subclass spell with a cast time",
"Two-headed ogres cast every subclass spell with the left arm",
"The other half only shoots when you attack a target out of melee reach",
"The other head raises her hand while casting and your presses come first",
"Saving talent changes no longer fails for characters with a subclass",
"The second-way quest no longer pops up at level 20",
"Every race can create the standard classes the creation screen offers again",
"Subclass Bar 1 shows cooldowns, charges and casts like a normal action bar",
"Subclass Bar 1 refills itself when you change subclass",
"Subclass Bar 1 appears as soon as you choose a subclass",
"Subclass Bar 1 works like an action bar and can live in Bartender4",
"A subclass can never be the character's own class",
"New characters no longer inherit the subclass of a deleted character",
"Sun Cleric, Barbarian, Bloodmage and Cultist subclass resources use the game's own orbs",
"Shapeshifting no longer takes away the twin brother or the subclass",
"A subclass specialization now teaches the ability its passive promises",
"Subclass stances and forms appear only on the subclass stance bar",
"Subclass vows, auras and formations move to the subclass stance bar",
"The Thin Human's cape rests on his shoulders and moves with them",
"The twin brother gets a real spot in cars and rides along in passenger seats",
"The twin brother puts his weapons away while he wears a subclass shape",
"The Thin Twins' brother now shows the flash and glow of subclass forms",
"The twin brother sneaks along in stealth instead of staying behind",
"The stance button takes a Thin Twin out of a form his brother wears again",
"The Two-Head and Two-Thins tabs show one wide background and the right class icon",
"The Two-Head and Two-Thins trees use the game's own talent nodes",
"Agree or Disagree takes one spellbook slot that changes name and icon",
"Subclass talent trees no longer let you spend more points than you have",
"Your brother stays at your side when you melee with a bow equipped",
"A melee brother stays on your target and keeps fighting",
"The Two-Headed Ogre twists her body less while her other head casts",
"Thin Twins and Two-Headed Ogres are Hero Races that need a level 60 character",
"The Two-Headed Ogre's portrait shows both heads instead of her body",
"Your other half's spells break your stealth, and Running Wild ends when you stealth",
"Spells your other half casts now trigger the class's talents and resources",
"Your other half takes the subclass's Cat, Bear and stance forms on their own",
"Your other head or brother can no longer finish a cast while you run",
"The other head's hand glows while she casts",
"With Play Easy on, your other half uses abilities that cost health",
"New racial passives explain the shared and split resource pools",
"The dressing room works for races without their own background, no extra addon needed",
"Your brother climbs onto your Travel Form or wolf even after a fight",
"When your brother uses Running Wild, you ride on his back",
"In Running Wild you ride on your brother's shoulders",
"Your weapons no longer go missing after a Running Wild ride",
"When both halves use the same resource, their pool is twice as big",
"The subclass window shows every CoA class's own background at full strength",
"You can rearrange Subclass Bar 1 during combat without an error",
"Your other head or brother has a cast bar of their own",
"Choice talents in the subclass window show as one node with two options",
"SpellActivationOverlay can light up Subclass Bar 1",
"Your subclass's resource now shows as an extra bar under your portrait",
"Your other half's resource bar keeps its value when you log out and back in",
"Rage, energy and runic power subclasses now get and use their resource",
"Subclass resource orbs only appear when your subclass specialization can fill them",
"Your subclass specialization comes with its first class talent learned",
"Your main class's key stat now also powers your subclass",
"Subclass talents follow the paths and point requirements of their tree",
"Your summons follow your brother while he walks beside you",
"Your brother rides on the back of your Travel Form cat and moves with it",
"Dressing your twin in the wardrobe no longer causes an addon error",
"Your brother rides on your back in Wargstride",
"A Bloodmage subclass's Cursed Form no longer replaces your own action bar",
"Pressing an active subclass stance or form again turns it off",
"Character select shows your subclass under your class",
"The Two-Headed Ogre's second head no longer pokes through hats",
"Two-Headed Ogres keep aiming between shots instead of idling",
"Two-Headed Ogres who shoot rest their gun on the shoulder when not firing",
"Two-Headed Ogres who shoot themselves aim and fire their gun with the right hand",
"Two-Headed Ogres who shoot fire their bullets from the gun hand",
"The wardrobe shows a Two-Headed Ogre's applied look and her saved outfits apply again",
"The second head's quest mark floats over her head in cities and inns",
"Subclass Bar 1 no longer fills up with Throw, Shoot, Wand and Auto Attack",
"Abilities you learn from your subclass no longer land on your own action bars",
"A caster Two-Headed Ogre keeps her staff in hand while her second head shoots",
"A Two-Headed Ogre's staff keeps its size when she puts it on her back",
"A shooting subclass starts Auto Shot on right-click without logging out first",
"A Hunter subclass keeps Auto Shot going while the main head casts or moves",
"Weapons and armor from a subclass stay usable after logging in again",
"Two-Headed Ogres are Horde again and Thin Twins share Forgotten race rules",
"Thin Humans and Two-Headed Ogres can no longer be created as Hero",
"The Two-Headed Ogre stays in her combat stance between attacks",
"The second-head tab only shows for Two-Headed Ogres and Thin Twins",
"Thin Twins capes no longer show their inside at the shoulders",
"Thin Twins keep short hair under hats",
"Thin Twins keep their face, cape and hat fit with CoA Custom 1.9.2",
"Thin Twins show their class gear in character creation",
"Two-Headed Ogre capes drape over her back",
"CoA Custom 1.9.5 races work on the subclass server",
"With Play easy, cowboy the brother leaves a spent timed form",
"The Two-Headed Ogre casts with a raised fist before her face",
"The second-head client patch is now patch-ZZZZT.MPQ",
"Dual Wield shows once in the spellbook, whichever class teaches it",
"The subclass addon keeps working when the Twins or Ogre are renamed",
"The subclass name shows only on the character tab",
"The Thin Twins' Accursed brother keeps his distance until he takes his cursed form",
"The Thin Twins' brother follows a form's cost, cooldown and duration",
"The Thin Twins' own mana bar no longer flickers",
"Witch Hunter Vault now springs over in a handspring instead of a jump",
"The Twins brother keeps his timed form and no longer takes forms a spell forbids",
"The Twins brother faces his target, leaps in and leaves a form to heal you",
"With Play easy, cowboy, the brother uses his timed forms in a fight",
"Original races no longer look broken in the 64-bit client's character creation",
"Subclasses get their specialization's free passives, like the Pyromancer's draconic form",
"The subclass cast bar no longer gets stuck and can always be Alt-dragged",
"Pick-one talents in the subclass window no longer overlap their neighbours",
"Subclass spells get their rank upgrades, resources and class mechanics",
"Subclass talents that replace a spell now replace it for the subclass too",
"The Thin Twins keep their own hairstyle under hats",
"The Twins brother takes the look of the cursed form he actually uses",
"The Twins brother stands beside you at character select in his own clothes",
"The Twins brother climbs down from your back before taking a form",
"Spells the Twins brother casts no longer play a cast animation on you",
"The Thin Twins brother is now your mirror image",
"The Thin Twins brother can have his own face, hair style and beard",
"A script builds the original races' Vault patches from your own client files",
"The subclass client patch is now built after the release's own patches",
"The mirrored Thin Twins brother is built from the current Thin Twins model",
"Pressing your subclass mount again dismounts you",
"Removing a subclass dismisses the pet it let you summon",
"Removing a Warlock or Paladin subclass no longer unlearns your mounts",
"Removing a subclass no longer leaves its spells in your spellbook",
"A Starcaller subclass shows Lunar Phase as CoA's moon",
"Your twin's or other head's pet gets its own movable pet bar",
"A Ranged Head stands still while the Melee Head is offline",
"A bot plays the missing head of a Two-Players ogre",
"A Ranged Head keeps an echo of its deleted Melee Head's gear",
"Two-Players ogres hold books, pouches and orbs forward in the off hand",
"Two-Players ogres can pair up as Melee Head and Ranged Head",
"Paired Two-Players heads share one body",
"SquidBots Lite no longer prints \"Command 'dc status' does not exist\" at login",
"The subclass action bar no longer causes a blocked-action error in combat",
"Two-Players heads split their abilities into melee for the body and ranged for the rider",
"Two-Players heads gain Agree or Disagree stacks when they fight together",
"Two-Players heads can only be CoA classes",
"The Ranged Head's gear slots are frozen in ice and can no longer be dragged",
"Two-Players heads find the abilities they borrow on their own bar",
"Two-Players ogres can Bonk Heads! together once the heads have agreed long enough",
"Abilities lent between Two-Players heads follow each head's respecs and new spells",
"Two-Players ogres can use Mutate Me! to take the eyes-everywhere look and back",
"A Two-Players ogre fills one party spot and enters dungeons as one player",
"A Two-Players ogre joins a party only when there is room for both heads",
"A Ranged Head's own frame now stands for the shared Two-Players body",
"The Two-Players Ranged Head shares the body's health and both heads get full kill XP",
"The Two-Players Ranged Head shares the body's gear",
"Two-Players heads split quest gold, share one resource pool and keep their head's specs",
"Mobs attacked by the Two-Players Ranged Head now fight the body",
"Two-Players Twins: the second brother rides piggyback on the first, visible as himself",
"Bot plans panel shows what your group's bots are doing and lets you pick their next quest",
"Questing bots do all their quests in one area before moving on",
"The Twins' second brother keeps and wears his own gear on his brother's back",
"A Two-Players twin can call his brother to his side until another player joins him",
"Agree now raises spell and ranged hit too, not only melee hit",
"Two-Players ogres drop their mount when either head attacks",
"The other head's abilities now go on your own action bars",
"A bot body keeps questing, looting and resting after a fight instead of standing still",
"A bot body's SquidBots menu now opens from a button on your own player frame",
"Character select shows a Two-Players head's joined name and its partner's class",
"The Ranged Head now goes into and out of Dungeon Finder dungeons with the body",
"Two-Players can be switched off with Subclass.TwoPlayers.Enable",
"The other head's abilities only cost you resources when they actually go off",
"Character select shows a Two-Players ogre in his Mutate Me look",
"The Ranged Head gets the enchant, gem and suffix stats of the shared gear",
"The Ranged Head of a Two-Headed Ogre no longer pops out of the body at logout",
"A Ranged Head and its bot body are in one party again, so party chat and bot orders work",
"A bot riding as the Ranged Head no longer rests, roams or makes the body sit down",
"The character sheet of a Two-Players head shows the other head's class",
"Two-Players Ogres can fit a carried mount in a window and share the fit",
"Custom Races V2 with 17 new races, subclasses and the Fading Island",
"Updated Custom Races to 2.0"
],
"snapshot": "d3d10476d144d2a701a5a122f1f249ff8219f7a6324e007cb3e153d4628973f7",
"components": {
"upstream": {
"repository": "jealous-sound/azerothcore-wotlk-coa",
"ref": "96afaf0f51cc4b37f1eba282bffb1c5aab353de6",
"sha": "96afaf0f51cc4b37f1eba282bffb1c5aab353de6"
},
"core": {
"repository": "Corfirean/azerothcore-wotlk-coa",
"ref": "9740ced5c41806115d851ab37ab34f28e1e8b712",
"sha": "9740ced5c41806115d851ab37ab34f28e1e8b712"
},
"bots": {
"repository": "Corfirean/mod-coa-playerbots",
"ref": "30a5a555f56fda8f4ccad14be8438bd0532d85b9",
"sha": "30a5a555f56fda8f4ccad14be8438bd0532d85b9"
},
"scaling": {
"repository": "Corfirean/mod-coa-content-scaling",
"ref": "3c2febf636bd09087bb278e381b975271a70fdf6",
"sha": "3c2febf636bd09087bb278e381b975271a70fdf6"
},
"manager": {
"repository": "Corfirean/coa-server-manager",
"ref": "d3527312803fb5a3e1cd48e01496645a8bbc9dcf",
"sha": "d3527312803fb5a3e1cd48e01496645a8bbc9dcf"
},
"races": {
"repository": "ilusixn/CustomRacesCoa",
"ref": "coa-custom-2.0",
"sha": "dae0c661f7197bafd0a42d80866fa8709b3792c9",
"assets": [
{
"name": "CoA-Custom-Races-V2-Credits.csv",
"size": 5487,
"digest": "sha256:9afb0b777498d14601476bed7ce82a449ce2b80af5dae107f7309081c1936882",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-Races-V2-Credits.csv"
},
{
"name": "CoA-Custom-Races-V2-Credits.xlsx",
"size": 10129,
"digest": "sha256:d24b51f42870e9ab370279e37ea1cd894b7a208cb8960548c0f465222d50c850",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-Races-V2-Credits.xlsx"
},
{
"name": "CoA-Custom-V2-Client-1.zip",
"size": 1513021586,
"digest": "sha256:a9dd51ed2d90fb048d549602f40f5429d56e2df0df5606a38781b358fa369568",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-1.zip"
},
{
"name": "CoA-Custom-V2-Client-2.zip",
"size": 1198283005,
"digest": "sha256:ab084a55509ccbcc2977a06dd0c01fa879973a1892baaacaeb3ff52f3dfc750e",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-2.zip"
},
{
"name": "CoA-Custom-V2-Client-3.zip",
"size": 1671130705,
"digest": "sha256:0af34199f0739ce086adb0371d3de7c1a0f5ca9c62ecde6b0efe9286e33874a8",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-3.zip"
},
{
"name": "CoA-Custom-V2-Client-4.zip",
"size": 502385128,
"digest": "sha256:e0bd87172af989fa50a8e2b08ba4321c72b6265047482f051a1db3b80d55bcaa",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-4.zip"
},
{
"name": "CoA-Custom-V2-Client-5.zip",
"size": 168079711,
"digest": "sha256:73364ad1b58c6342641a848a3b20a835472834f600416606be1470386774ca78",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-5.zip"
},
{
"name": "CoA-Custom-V2-Client-6.zip",
"size": 1881526537,
"digest": "sha256:91db79b7b451856fa9e45daea52e0fe1c04676653dd8a88e6627f04ee7b47759",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-6.zip"
},
{
"name": "CoA-Custom-V2-Client-7.zip",
"size": 734725114,
"digest": "sha256:4c5532d775d206a3b913a6111040bb96b95c683b74c08a6131ed9f38db8e2b39",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-7.zip"
},
{
"name": "CoA-Custom-V2-Client-8.zip",
"size": 734216670,
"digest": "sha256:bdaa1d047e8767bd5715f1e8465d116220597d9c135a43e2dda02e12ce2e5526",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-8.zip"
},
{
"name": "CoA-Custom-V2-Client-9.zip",
"size": 195235400,
"digest": "sha256:0764893543084a12d15578fe734f66ba4519740794a6b3b3a38a08594c38c640",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Client-9.zip"
},
{
"name": "CoA-Custom-V2-Server.zip",
"size": 63983587,
"digest": "sha256:8970d61eea40f53cea4c27481edd85d2b2647cd32eb88932e0077da3b4a77d23",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/CoA-Custom-V2-Server.zip"
},
{
"name": "creation-screen.png",
"size": 2139517,
"digest": "sha256:84c3144f34ef8015e8612e412da03383241124d58e36c703eeb2a525096a5795",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/creation-screen.png"
},
{
"name": "INSTALL-GUIDE.txt",
"size": 2504,
"digest": "sha256:da402117a90a60a029fdce9a94125ddd28b386a73f37c180992befca57e9f13a",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/INSTALL-GUIDE.txt"
},
{
"name": "PATCH-NOTES-V2.txt",
"size": 4388,
"digest": "sha256:82901d54b1f13cd8b2e7a73a7c2fdc3e237f8090c332729bc553818834fe27d0",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/PATCH-NOTES-V2.txt"
},
{
"name": "RACES.md",
"size": 8629,
"digest": "sha256:1e7a9aaee354b07924a8cdda5e4dbffe4cad88f215d68efb74d8d0832403422d",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/RACES.md"
},
{
"name": "SHA256SUMS.txt",
"size": 938,
"digest": "sha256:a68591f04d661b558523133f99411fd4a7e32f1b45f79f977bb0989246f11179",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/SHA256SUMS.txt"
},
{
"name": "showcase.mp4",
"size": 81658913,
"digest": "sha256:a3d4b4f561bb12dcc91da562c5ee79157143f4b67997479edb2152b27b925a2a",
"url": "https://github.com/ilusixn/CustomRacesCoa/releases/download/coa-custom-2.0/showcase.mp4"
}
],
"server": [
{
"repository": "stefanw1337/azerothcore-wotlk-coa",
"branch": "stefanw1337-subclassing-test",
"sha": "ccea52d17a27482784e705e9cc913b68dedd9f85"
}
],
"provenance": [
{
"repository": "ilusixn/Fading-Islands-Restore",
"sha": "e150de1cb496314af752e98021e57ca93d5d799d",
"used": "server/core-patches"
},
{
"repository": "ilusixn/Custom-Race-3.3.5a",
"sha": "ac907655bd43dec2eff1b4ff509f7fb574325c58",
"used": "server/core racials"
},
{
"repository": "ilusixn/ilusixn-dev-menu",
"sha": "ea50a8533a3402c69c8773677db1027ec1180d2c",
"used": "modules/mod-ilusixn-devmenu"
}
]
},
"squid": {
"repository": "Zyth45/mod-playerbots",
"ref": "v3.0",
"sha": "4ef5ed9ebe75a330de7df19639a042391e037e15",
"patch": "patches/squid-coa-validation.patch",
"patchSha256": "2cc45bc6555d5bb3e91728840f9de6e73c002c73b270a37732a1499956241c5f"
},
"build": {
"repository": "Corfirean/coa-server-build",
"ref": "9a122d049e8be457444389e9756936bcdb4e7ef5",
"sha": "9a122d049e8be457444389e9756936bcdb4e7ef5"
},
"dungeon-clear": {
"repository": "Zyth45/mod-dungeon-clear",
"sha": "6efb59eae96bcc0730fc083314dd28d55970bbf4",
"patch": "patches/dungeon-clear-coa-validation.patch",
"patchSha256": "2845d389422e3a59e5c186ecf54b03f64f1dcc22cdef15729b60c354ae72cd6f",
"ref": "6efb59eae96bcc0730fc083314dd28d55970bbf4"
},
"navigation": {
"repository": "Corfirean/azerothcore-wotlk-coa",
"ref": "8b44099f480af0b69c6dfc697e4d388e865e9ffc",
"sha": "8b44099f480af0b69c6dfc697e4d388e865e9ffc",
"sourceRelease": "navigation-20261012",
"manifestSha256": "7f28600735f115792e79a5e8d1c8d78a83a8f5ed14a090c6d87268e49c2bb683",
"archiveSha256": "aa1347a095f85af44b4f592270a0e9314954801fda4578f0147f847e32c24a60",
"assets": [
{
"name": "navigation.zip.001",
"size": 1500000000,
"sha256": "e3a93903fc8155ee0d92db399ec426769c360bef87c44c07beb7e21cfd892c18",
"url": "https://github.com/Corfirean/coa-server-build/releases/download/navigation-20261012/navigation.zip.001"
},
{
"name": "navigation.zip.002",
"size": 1377006470,
"sha256": "c1af26ba7f83676278613076c357c4da0a11cfa6ae1ff00003479057c4864471",
"url": "https://github.com/Corfirean/coa-server-build/releases/download/navigation-20261012/navigation.zip.002"
}
]
}
},
"experimentalFeatures": [],
"compare": "https://github.com/Corfirean/coa-server-build/compare/server-0.261114.106...server-0.261115.110"
} }
] ]
} }
+7 -15
View File
@@ -15,6 +15,7 @@ export {};
let withReborn = false; let withReborn = false;
let remoteHost = localStorage.getItem("demo-remote-host") ?? ""; let remoteHost = localStorage.getItem("demo-remote-host") ?? "";
const moduleEdits: Record<string, Record<string, string>> = {}; const moduleEdits: Record<string, Record<string, string>> = {};
let botsUpdated = false;
const modState: Record<string, boolean> = { "companions": true, "content-scaling": true, "client-compat": true, "tbc-content": true, "wotlk-content": true, "npc-enchanter": true }; const modState: Record<string, boolean> = { "companions": true, "content-scaling": true, "client-compat": true, "tbc-content": true, "wotlk-content": true, "npc-enchanter": true };
const report = {path:"C:\\games\\CoA-Repack",classification:"healthy",items:[ const report = {path:"C:\\games\\CoA-Repack",classification:"healthy",items:[
{key:"worldserver",label:"World server",status:"found",detail:null}, {key:"worldserver",label:"World server",status:"found",detail:null},
@@ -45,7 +46,8 @@ export {};
if(cmd==="addons_list"||cmd==="addons_install"||cmd==="addons_remove"){const w=window as any;w.__addons=w.__addons??{dragonui:"old"};if(cmd==="addons_install"){await new Promise(r=>setTimeout(r,700));w.__addons[args.addon]="new";}if(cmd==="addons_remove")delete w.__addons[args.addon];return addonCatalog.addons.map((a:any)=>({id:a.id,name:a.name,description:a.description,author:a.author,license:a.license,needs:a.needs??null,repo:a.repo,size:a.files.reduce((s:number,f:any)=>s+f.size,0),installed:a.id in w.__addons,updateAvailable:w.__addons[a.id]==="old",foreignFolders:a.id==="coacombat"&&!(a.id in w.__addons)?["CoACombat"]:[],bundled:null as string|null})).concat([{id:"coa-dev-menu",name:"CoA Dev Menu",description:{en:"The in-game /dev editor for game masters.",ru:"Внутриигровой редактор /dev для гейм-мастеров. Ставится вместе с клиентским патчем Custom Races V2 и включается вместе с ним."},author:"ilusixn",license:"see repository",needs:null,repo:"https://github.com/ilusixn/ilusixn-dev-menu",size:0,installed:true,updateAvailable:false,foreignFolders:[],bundled:"custom-races"}]);} if(cmd==="addons_list"||cmd==="addons_install"||cmd==="addons_remove"){const w=window as any;w.__addons=w.__addons??{dragonui:"old"};if(cmd==="addons_install"){await new Promise(r=>setTimeout(r,700));w.__addons[args.addon]="new";}if(cmd==="addons_remove")delete w.__addons[args.addon];return addonCatalog.addons.map((a:any)=>({id:a.id,name:a.name,description:a.description,author:a.author,license:a.license,needs:a.needs??null,repo:a.repo,size:a.files.reduce((s:number,f:any)=>s+f.size,0),installed:a.id in w.__addons,updateAvailable:w.__addons[a.id]==="old",foreignFolders:a.id==="coacombat"&&!(a.id in w.__addons)?["CoACombat"]:[],bundled:null as string|null})).concat([{id:"coa-dev-menu",name:"CoA Dev Menu",description:{en:"The in-game /dev editor for game masters.",ru:"Внутриигровой редактор /dev для гейм-мастеров. Ставится вместе с клиентским патчем Custom Races V2 и включается вместе с ним."},author:"ilusixn",license:"see repository",needs:null,repo:"https://github.com/ilusixn/ilusixn-dev-menu",size:0,installed:true,updateAvailable:false,foreignFolders:[],bundled:"custom-races"}]);}
if(cmd==="custom_race_characters") return {players:2,companionBots:14,squidBots:0}; if(cmd==="custom_race_characters") return {players:2,companionBots:14,squidBots:0};
if(cmd==="purge_custom_race_bots"){await new Promise(r=>setTimeout(r,500));return 14;} if(cmd==="purge_custom_race_bots"){await new Promise(r=>setTimeout(r,500));return 14;}
if(cmd==="restart_schedule"||cmd==="restart_schedule_save"){const w=window as any;w.__sched=w.__sched??{enabled:false,time:"05:00",warningMinutes:5};if(cmd==="restart_schedule_save"){const s=args.schedule;if(s.enabled&&!/^([01]\d|2[0-3]):[0-5]\d$/.test(s.time))throw new Error("The restart time must be HH:MM, for example 05:00.");w.__sched={...s};}return {schedule:w.__sched,supported:true};} if(cmd==="restart_schedule"||cmd==="restart_schedule_save"){const w=window as any;w.__sched=w.__sched??{enabled:false,time:"05:00",warningMinutes:5,weeklyEnabled:false,weeklyDay:"sunday",weeklyTime:"05:00",weeklyWarningMinutes:5};if(cmd==="restart_schedule_save"){const s=args.schedule;if(s.enabled&&!/^([01]\d|2[0-3]):[0-5]\d$/.test(s.time))throw new Error("The restart time must be HH:MM, for example 05:00.");if(s.weeklyEnabled&&!/^([01]\d|2[0-3]):[0-5]\d$/.test(s.weeklyTime))throw new Error("The restart time must be HH:MM, for example 05:00.");w.__sched={...s};}return {schedule:w.__sched,supported:true};}
if(cmd==="server_logging_state"||cmd==="server_logging_preset"||cmd==="server_logging_settings_save"||cmd==="server_logs_clean"){const w=window as any;w.__logs=w.__logs??{preset:"normal",logBytes:148*1024*1024,settings:{autoCleanup:false,maxSizeMb:500}};if(cmd==="server_logging_preset"){w.__logs.preset=args.preset;return;}if(cmd==="server_logging_settings_save"){w.__logs.settings={...args.settings};}if(cmd==="server_logs_clean"){const freed=w.__logs.logBytes;w.__logs.logBytes=0;return {freedBytes:freed,remainingBytes:0,deletedFiles:freed>0?3:0,skippedFiles:0};}return w.__logs;}
if(cmd==="mysql_custom"||cmd==="mysql_custom_save"){const w=window as any;if(cmd==="mysql_custom_save")w.__my=args.text;const text:string=w.__my??"";const applied=text.split("\n").map((l:string)=>l.trim()).filter((l:string)=>l&&!l.startsWith("#")&&!/^(port|datadir|basedir|bind[-_]address)\b/i.test(l)).map((l:string)=>l+"\n").join("");return {text,applied};} if(cmd==="mysql_custom"||cmd==="mysql_custom_save"){const w=window as any;if(cmd==="mysql_custom_save")w.__my=args.text;const text:string=w.__my??"";const applied=text.split("\n").map((l:string)=>l.trim()).filter((l:string)=>l&&!l.startsWith("#")&&!/^(port|datadir|basedir|bind[-_]address)\b/i.test(l)).map((l:string)=>l+"\n").join("");return {text,applied};}
if(cmd==="realm_names"||cmd==="realm_rename"){const w=window as any;w.__rn=w.__rn??{};const defs:[number,string][]=[[1,"Conquest of Azeroth"],[2,"Wildcard"]];if(cmd==="realm_rename"){await new Promise(r=>setTimeout(r,300));const n=(args.name??"").trim();if(n.length>32||n.includes('"'))throw new Error("The realm name can have at most 32 characters.");if(n)w.__rn[args.realmId]=n;else delete w.__rn[args.realmId];}return defs.map(([id,d])=>({id,name:w.__rn[id]??d,defaultName:d,custom:id in w.__rn}));} if(cmd==="realm_names"||cmd==="realm_rename"){const w=window as any;w.__rn=w.__rn??{};const defs:[number,string][]=[[1,"Conquest of Azeroth"],[2,"Wildcard"]];if(cmd==="realm_rename"){await new Promise(r=>setTimeout(r,300));const n=(args.name??"").trim();if(n.length>32||n.includes('"'))throw new Error("The realm name can have at most 32 characters.");if(n)w.__rn[args.realmId]=n;else delete w.__rn[args.realmId];}return defs.map(([id,d])=>({id,name:w.__rn[id]??d,defaultName:d,custom:id in w.__rn}));}
if(cmd==="realm_profiles") return {active:realm,wildcard_created:wildcardCreated,reborn_created:rebornCreated,reborn_supported:true,supported:true,recovery_pending:false,simultaneous,secondary_world_port:simultaneous?8086:null,secondary_running:simultaneous&&running,with_reborn:withReborn,reborn_world_port:withReborn?8087:null,reborn_running:withReborn&&running}; if(cmd==="realm_profiles") return {active:realm,wildcard_created:wildcardCreated,reborn_created:rebornCreated,reborn_supported:true,supported:true,recovery_pending:false,simultaneous,secondary_world_port:simultaneous?8086:null,secondary_running:simultaneous&&running,with_reborn:withReborn,reborn_world_port:withReborn?8087:null,reborn_running:withReborn&&running};
@@ -70,31 +72,21 @@ export {};
if(cmd==="list_presets"){const pr=args?.scope==="server"?serverPresets:botsPresets;return (pr.presets as any[]).map(p=>({id:p.id,title:p.title,description:p.description}));} if(cmd==="list_presets"){const pr=args?.scope==="server"?serverPresets:botsPresets;return (pr.presets as any[]).map(p=>({id:p.id,title:p.title,description:p.description}));}
if(cmd==="preview_preset"){const a=args;const sc=a.scope==="server"?serverSchema:botsSchema;const pr=(a.scope==="server"?serverPresets:botsPresets).presets as any[];const p=pr.find(x=>x.id===a.preset)??{id:a.preset??"defaults",title:"Recommended defaults",description:"Every setting returns to its default value."};const st=(sc.settings as any[]).filter(x=>x.type==="int"||x.type==="float"||x.type==="enum").slice(0,3);return {id:p.id,title:p.title,description:p.description,changes:st.map(x=>({key:x.key,title:x.title,from:x.default,to:x.type==="enum"?(x.options?.[1]?.value??x.default):(Number(x.default)||1)*2,dangerous:false}))};} if(cmd==="preview_preset"){const a=args;const sc=a.scope==="server"?serverSchema:botsSchema;const pr=(a.scope==="server"?serverPresets:botsPresets).presets as any[];const p=pr.find(x=>x.id===a.preset)??{id:a.preset??"defaults",title:"Recommended defaults",description:"Every setting returns to its default value."};const st=(sc.settings as any[]).filter(x=>x.type==="int"||x.type==="float"||x.type==="enum").slice(0,3);return {id:p.id,title:p.title,description:p.description,changes:st.map(x=>({key:x.key,title:x.title,from:x.default,to:x.type==="enum"?(x.options?.[1]?.value??x.default):(Number(x.default)||1)*2,dangerous:false}))};}
if(cmd==="companion_sizes") return {hardware:{cores:16,ram_gb:31,free_ram_gb:12},sizes:[{id:"small",title:"Small",bots:50,warning:null},{id:"medium",title:"Medium",bots:250,warning:null},{id:"large",title:"Large",bots:500,warning:"500 companions may need more CPU and memory than this computer has (8 cores, 16 GB)."}]}; if(cmd==="companion_sizes") return {hardware:{cores:16,ram_gb:31,free_ram_gb:12},sizes:[{id:"small",title:"Small",bots:50,warning:null},{id:"medium",title:"Medium",bots:250,warning:null},{id:"large",title:"Large",bots:500,warning:"500 companions may need more CPU and memory than this computer has (8 cores, 16 GB)."}]};
if(cmd==="top_up_startup_fleet") return 0;
if(cmd==="add_companions"){const base=(window as any).__bots??85;(window as any).__target=base+args.count;return {spawned:"queued",created:null,baseline:base};} if(cmd==="add_companions"){const base=(window as any).__bots??85;(window as any).__target=base+args.count;return {spawned:"queued",created:null,baseline:base};}
if(cmd==="check_update") return {from_version:(window as any).__updated?"0.261028.83":"0.261026.81",to_version:"0.261028.83",items:[],conflicts:[],migrations:5,pending_migrations:(window as any).__updated?0:5,download_bytes:6000000}; if(cmd==="check_update") return {from_version:(window as any).__updated?"0.261028.83":"0.261026.81",to_version:"0.261028.83",items:[],conflicts:[],migrations:5,pending_migrations:(window as any).__updated?0:5,download_bytes:6000000};
if(cmd==="apply_update"){const w=window as any;for(let i=1;i<=8;i++){await new Promise((r: any)=>setTimeout(r,700));(w.__handlers?.["update-progress"]??[]).forEach((h: any)=>h({event:"update-progress",id:1,payload:{step:i<4?"Downloading the update":i<7?"Applying the update":"Finishing",percent:i*12}}));}(window as any).__updated=true;return {txn:{state:"committed",to_version:"0.261028.83"},migrations:null};} if(cmd==="apply_update"){const w=window as any;for(let i=1;i<=8;i++){await new Promise((r: any)=>setTimeout(r,700));(w.__handlers?.["update-progress"]??[]).forEach((h: any)=>h({event:"update-progress",id:1,payload:{step:i<4?"Downloading the update":i<7?"Applying the update":"Finishing",percent:i*12}}));}(window as any).__updated=true;return {txn:{state:"committed",to_version:"0.261028.83"},migrations:null};}
if(cmd==="get_population"){if(!running) return null;let b=(window as any).__bots??85;const t=(window as any).__target??0;if(t>b){b=Math.min(t,b+25);(window as any).__bots=b;}return {online_total:b,bots_online:Math.max(0,b-7),players_online:0,bots_total:b};} if(cmd==="get_population"){if(!running) return null;let b=(window as any).__bots??85;const t=(window as any).__target??0;if(t>b){b=Math.min(t,b+25);(window as any).__bots=b;}return {online_total:b,bots_online:Math.max(0,b-7),players_online:0,bots_total:b};}
if(cmd==="get_performance") return running?{mean_ms:14,median_ms:15,p95_ms:24,p99_ms:30,max_ms:61,ticks_per_sec:71.4}:null; if(cmd==="get_performance") return running?{mean_ms:14,median_ms:15,p95_ms:24,p99_ms:30,max_ms:61,ticks_per_sec:71.4}:null;
if(cmd==="run_diagnostics") return {problems:2,checks:[{id:"files",title:"Server files",level:"ok",detail:"All expected server parts were found."},{id:"world",title:"World server",level:"warn",detail:"Not running."},{id:"disk",title:"Free disk space",level:"warn",detail:"Only 3 GB free; backups and updates need room."},{id:"exposure",title:"Private services",level:"ok",detail:"Database and server console are not reachable from the network."}]}; if(cmd==="run_diagnostics") return {problems:2,checks:[{id:"files",title:"Server files",level:"ok",detail:"All expected server parts were found."},{id:"world",title:"World server",level:"warn",detail:"Not running."},{id:"disk",title:"Free disk space",level:"warn",detail:"Only 3 GB free; backups and updates need room."},{id:"exposure",title:"Private services",level:"ok",detail:"Database and server console are not reachable from the network."}]};
if(cmd.startsWith("client_")){ if(cmd==="client_status") return {linked:((window as any).__client??"none")!=="none"};
const w=window as any;
const emit=(payload: any)=>(w.__handlers?.["client-progress"]??[]).forEach((h: any)=>h({event:"client-progress",id:1,payload}));
const sleep=(ms: number)=>new Promise((r: any)=>setTimeout(r,ms));
const total=46404000000;
const run=async(phase: string,n: number,speed: number)=>{for(let i=1;i<=n;i++){if(w.__stop){w.__stop=false;throw {human:{code:"unknown",title:"",message:"",actions:[]},technical:"Download cancelled."};}emit({phase,done:Math.round(total*i/n),total,bytes_per_sec:speed,file:phase==="scan"?"Data/patch-"+i+".MPQ":"Data/patch-O.MPQ"});await sleep(120);}};
if(cmd==="client_status"){const c=w.__client??"none";return {linked:c!=="none",managed:c==="old"||c==="new",installed_version:c==="old"?"2026-09-20-01":c==="new"?"2026-09-29-01":null,latest_version:"2026-09-29-01",latest_bytes:total,update_available:c==="old"};}
if(cmd==="client_download_check") return {needed_bytes:total,free_bytes:args.parent.startsWith("C")?210e9:20e9,version:"2026-09-29-01",dest:args.parent+"\\CoA Client"};
if(cmd==="client_plan"){await run("scan",12,0);return {version:"2026-09-29-01",items:[{path:"Data/patch-O.MPQ",size:2814983707,kind:"changed"},{path:"Data/patch-WB1.MPQ",size:2001890268,kind:"missing"},...(w.__modified?[{path:"d3d9.dll",size:4284430,kind:"modified"},{path:"Ascension.exe",size:7694848,kind:"modified"}]:[])],download_bytes:4829000000,total_files:200,up_to_date_files:196,kept_files:0};}
if(cmd==="client_sync"){await run("download",25,41e6);w.__client="new";return null;}
if(cmd==="client_download"){await run("scan",4,0);await run("download",40,41e6);w.__client="new";return {path:args.parent+"\\CoA Client",executable:"Ascension.exe",realmlists:[{path:"x",host:"127.0.0.1"}],addon:{installed:true,version:"1",up_to_date:true},other_addons:0};}
if(cmd==="client_cancel"){w.__stop=true;return null;}
}
if(cmd==="realmlist_profiles"){const w=window as any;w.__rl=w.__rl??{profiles:[{id:"solo",name:"Solo",data:"set realmlist 127.0.0.1\r\n"},{id:"ptr",name:"PTR",data:"set realmlist ptr.example.org\r\n"}],active:"solo"};return w.__rl;} if(cmd==="realmlist_profiles"){const w=window as any;w.__rl=w.__rl??{profiles:[{id:"solo",name:"Solo",data:"set realmlist 127.0.0.1\r\n"},{id:"ptr",name:"PTR",data:"set realmlist ptr.example.org\r\n"}],active:"solo"};return w.__rl;}
if(cmd==="realmlist_activate"){(window as any).__rl.active=args.profileId;return [];} if(cmd==="realmlist_activate"){(window as any).__rl.active=args.profileId;return [];}
if(cmd==="realmlist_save"){const w=window as any;const rl=w.__rl;if(args.profileId){const p=rl.profiles.find((x: any)=>x.id===args.profileId);p.name=args.name;p.data=args.data;return p;}if(rl.profiles.some((x: any)=>x.name.toLowerCase()===String(args.name).toLowerCase()))throw {human:{code:"unknown",title:"",message:"",actions:[]},technical:"A realmlist with that name already exists."};const p={id:String(args.name).toLowerCase().replace(/[^a-z0-9]+/g,"-"),name:args.name,data:(/\s/.test(args.data.trim())?args.data.trim():"set realmlist "+args.data.trim())+"\r\n"};rl.profiles.push(p);return p;} if(cmd==="realmlist_save"){const w=window as any;const rl=w.__rl;if(args.profileId){const p=rl.profiles.find((x: any)=>x.id===args.profileId);p.name=args.name;p.data=args.data;return p;}if(rl.profiles.some((x: any)=>x.name.toLowerCase()===String(args.name).toLowerCase()))throw {human:{code:"unknown",title:"",message:"",actions:[]},technical:"A realmlist with that name already exists."};const p={id:String(args.name).toLowerCase().replace(/[^a-z0-9]+/g,"-"),name:args.name,data:(/\s/.test(args.data.trim())?args.data.trim():"set realmlist "+args.data.trim())+"\r\n"};rl.profiles.push(p);return p;}
if(cmd==="realmlist_delete"){const rl=(window as any).__rl;rl.profiles=rl.profiles.filter((x: any)=>x.id!==args.profileId);return null;} if(cmd==="realmlist_delete"){const rl=(window as any).__rl;rl.profiles=rl.profiles.filter((x: any)=>x.id!==args.profileId);return null;}
if(cmd==="account_delete") return null; if(cmd==="account_delete") return null;
if(cmd==="modules_list") return [{id:"companions",name:"CoA Companions",description:{en:"Companion bots for groups, dungeons and your guild.",ru:"Боты-компаньоны для групп, подземелий и гильдии."},repo:"https://github.com/Corfirean/mod-coa-playerbots",installed:true,enabled:modState["companions"],switchable:true,status:"beta",icon:"bot",page:"bots"},{id:"content-scaling",name:"Content Scaling",description:{en:"Scales dungeons and raids to your group, with solo modes.",ru:"Подстраивает подземелья и рейды под вашу группу, есть соло-режимы."},repo:"https://github.com/Corfirean/mod-coa-content-scaling",installed:true,enabled:modState["content-scaling"],switchable:true,status:"early",icon:"scaling",page:null},{id:"tbc-content",name:"TBC Content",description:{en:"Outland dungeons and raids, scaled to your level range.",ru:"Подземелья и рейды Запределья, подогнанные под ваши уровни."},repo:"https://github.com/Corfirean/mod-coa-content-scaling/tree/main/content-packs/mod-coa-tbc-content",installed:true,enabled:modState["tbc-content"],switchable:true,status:"early",icon:"tbc",page:null},{id:"wotlk-content",name:"WotLK Content",description:{en:"Northrend dungeons and raids, scaled to your level range.",ru:"Подземелья и рейды Нордскола, подогнанные под ваши уровни."},repo:"https://github.com/Corfirean/mod-coa-content-scaling/tree/main/content-packs/mod-coa-wotlk-content",installed:true,enabled:modState["wotlk-content"],switchable:true,status:"early",icon:"wotlk",page:null},{id:"ah-bot",name:"Auction House Bot",description:{en:"Fills the auction house with realistic, adjustable listings.",ru:"Наполняет аукцион реалистичными настраиваемыми лотами."},repo:"https://github.com/Corfirean/azerothcore-wotlk-coa",installed:true,enabled:modState["ah-bot"] ?? false,switchable:true,status:"early",icon:"gavel",page:null,hidden:false},{id:"npc-enchanter",name:"NPC Enchanter",description:{en:"An NPC that enchants your gear for you.",ru:"НПС, который зачаровывает ваше снаряжение."},repo:"https://github.com/azerothcore/mod-npc-enchanter",installed:true,enabled:modState["npc-enchanter"],switchable:true,status:"early",icon:"sparkles",page:null,hidden:false},{id:"playerbots",name:"SQUID's Playerbots",description:{en:"An alternative bot system with random bots and full AI.",ru:"Альтернативная система ботов со случайными ботами и полным ИИ."},repo:"https://github.com/Zyth45/mod-playerbots",installed:true,enabled:modState["playerbots"] ?? false,switchable:true,status:"early",icon:"swords",page:"bots",hidden:false},{id:"client-compat",name:"Client compatibility",description:{en:"Client-server link and appearance unlocks.",ru:"Связь клиента с сервером и разблокировка внешних видов."},repo:"https://github.com/Corfirean/azerothcore-wotlk-coa",installed:true,enabled:modState["client-compat"],switchable:false,status:"release",icon:"plug",page:null,hidden:true}, ...moduleCatalog.modules.filter(m => ["time-is-time", "custom-races", "subclass", "dev-menu"].includes(m.id)).map(m => ({...m, installed:true, enabled:modState[m.id] ?? true, switchable:true, page:null, hidden:(m as any).hidden ?? false}))].map(m => ({...m, has_settings: !["tbc-content", "wotlk-content"].includes(m.id), compatibility: realm !== "coa" ? (["companions", "playerbots"].includes(m.id) ? "unsupported" : m.id === "client-compat" ? "compatible" : "experimental") : "compatible", switchable: realm !== "coa" && ["companions", "playerbots"].includes(m.id) ? false : m.switchable})); if(cmd==="modules_list") return [{id:"companions",name:"CoA Companions",description:{en:"Companion bots for groups, dungeons and your guild.",ru:"Боты-компаньоны для групп, подземелий и гильдии."},repo:"https://github.com/Corfirean/mod-coa-playerbots",installed:true,enabled:modState["companions"],switchable:true,status:"beta",icon:"bot",page:"bots"},{id:"content-scaling",name:"Content Scaling",description:{en:"Scales dungeons and raids to your group, with solo modes.",ru:"Подстраивает подземелья и рейды под вашу группу, есть соло-режимы."},repo:"https://github.com/Corfirean/mod-coa-content-scaling",installed:true,enabled:modState["content-scaling"],switchable:true,status:"early",icon:"scaling",page:null},{id:"tbc-content",name:"TBC Content",description:{en:"Outland dungeons and raids, scaled to your level range.",ru:"Подземелья и рейды Запределья, подогнанные под ваши уровни."},repo:"https://github.com/Corfirean/mod-coa-content-scaling/tree/main/content-packs/mod-coa-tbc-content",installed:true,enabled:modState["tbc-content"],switchable:true,status:"early",icon:"tbc",page:null},{id:"wotlk-content",name:"WotLK Content",description:{en:"Northrend dungeons and raids, scaled to your level range.",ru:"Подземелья и рейды Нордскола, подогнанные под ваши уровни."},repo:"https://github.com/Corfirean/mod-coa-content-scaling/tree/main/content-packs/mod-coa-wotlk-content",installed:true,enabled:modState["wotlk-content"],switchable:true,status:"early",icon:"wotlk",page:null},{id:"ah-bot",name:"Auction House Bot",description:{en:"Fills the auction house with realistic, adjustable listings.",ru:"Наполняет аукцион реалистичными настраиваемыми лотами."},repo:"https://github.com/Corfirean/azerothcore-wotlk-coa",installed:true,enabled:modState["ah-bot"] ?? false,switchable:true,status:"early",icon:"gavel",page:null,hidden:false},{id:"npc-enchanter",name:"NPC Enchanter",description:{en:"An NPC that enchants your gear for you.",ru:"НПС, который зачаровывает ваше снаряжение."},repo:"https://github.com/azerothcore/mod-npc-enchanter",installed:true,enabled:modState["npc-enchanter"],switchable:true,status:"early",icon:"sparkles",page:null,hidden:false},{id:"playerbots",name:"SQUID's Playerbots",description:{en:"An alternative bot system with random bots and full AI.",ru:"Альтернативная система ботов со случайными ботами и полным ИИ."},repo:"https://github.com/Zyth45/mod-playerbots",installed:true,enabled:modState["playerbots"] ?? false,switchable:true,status:"early",icon:"swords",page:"bots",hidden:false},{id:"client-compat",name:"Client compatibility",description:{en:"Client-server link and appearance unlocks.",ru:"Связь клиента с сервером и разблокировка внешних видов."},repo:"https://github.com/Corfirean/azerothcore-wotlk-coa",installed:true,enabled:modState["client-compat"],switchable:false,status:"release",icon:"plug",page:null,hidden:true}, ...moduleCatalog.modules.filter(m => ["time-is-time", "custom-races", "subclass", "dev-menu"].includes(m.id)).map(m => ({...m, installed:true, enabled:modState[m.id] ?? true, switchable:true, page:null, hidden:(m as any).hidden ?? false}))].map(m => ({...m, source_commit: m.id==="companions" ? (botsUpdated ? "178a7fde6abe1c3c8813d338073b2c83835da497" : "447558bc27d6bb447aaf10eefcb2e85ac2b15c32") : null, available_commit: m.id==="companions" && !botsUpdated ? "178a7fde6abe1c3c8813d338073b2c83835da497" : null, has_settings: !["tbc-content", "wotlk-content"].includes(m.id), compatibility: realm !== "coa" ? (["companions", "playerbots"].includes(m.id) ? "unsupported" : m.id === "client-compat" ? "compatible" : "experimental") : "compatible", switchable: realm !== "coa" && ["companions", "playerbots"].includes(m.id) ? false : m.switchable}));
if(cmd==="module_update"){ await new Promise(r=>setTimeout(r,1500)); botsUpdated=true; return "178a7fde6abe1c3c8813d338073b2c83835da497"; }
if(cmd==="module_set_enabled"){ if(args.enabled && ["companions","playerbots"].includes(args.module) && modState[args.module === "companions" ? "playerbots" : "companions"]) throw {human:{code:"bot_modules_conflict",title:"",message:"",actions:[]},technical:"Only one bot system may be enabled."}; modState[args.module]=args.enabled; return null; } if(cmd==="module_set_enabled"){ if(args.enabled && ["companions","playerbots"].includes(args.module) && modState[args.module === "companions" ? "playerbots" : "companions"]) throw {human:{code:"bot_modules_conflict",title:"",message:"",actions:[]},technical:"Only one bot system may be enabled."}; modState[args.module]=args.enabled; return null; }
if(cmd==="all_settings") return [{key:"Visibility.Distance.Continents",value:"100",default:"90",doc:"Description: Visibility distance on continents. Range: 45-250 Default: 90",changed:true},{key:"Death.SicknessLevel",value:"11",default:"11",doc:"Description: Character level up to which characters get resurrection sickness. Default: 11",changed:false},{key:"Rate.Drop.Item.Epic",value:"3",default:"1",doc:"Description: Drop rates for money and items based on quality. Default: 1",changed:true},{key:"Instance.ResetTimeHour",value:"4",default:"4",doc:"Description: Hour of the day when the global instance reset occurs. Range: 0-23 Default: 4 - (04:00 AM)",changed:false},{key:"PlayerLimit",value:"1000",default:"1000",doc:"Description: Maximum number of players in the world.",changed:false}]; if(cmd==="all_settings") return [{key:"Visibility.Distance.Continents",value:"100",default:"90",doc:"Description: Visibility distance on continents. Range: 45-250 Default: 90",changed:true},{key:"Death.SicknessLevel",value:"11",default:"11",doc:"Description: Character level up to which characters get resurrection sickness. Default: 11",changed:false},{key:"Rate.Drop.Item.Epic",value:"3",default:"1",doc:"Description: Drop rates for money and items based on quality. Default: 1",changed:true},{key:"Instance.ResetTimeHour",value:"4",default:"4",doc:"Description: Hour of the day when the global instance reset occurs. Range: 0-23 Default: 4 - (04:00 AM)",changed:false},{key:"PlayerLimit",value:"1000",default:"1000",doc:"Description: Maximum number of players in the world.",changed:false}];
if(cmd==="all_settings_save") return Object.keys(args&&args.changes||{}); if(cmd==="all_settings_save") return Object.keys(args&&args.changes||{});
+41 -46
View File
@@ -48,7 +48,7 @@ const de: Partial<Record<keyof typeof en, string>> = {
"mod.switching": "Änderungen werden angewendet… Bitte warten.", "mod.switching": "Änderungen werden angewendet… Bitte warten.",
"portable.experimental": "Experimentelle Funktion: Portable Charaktere befinden sich noch in aktiver Entwicklung. Fehler können auftreten.", "portable.experimental": "Experimentelle Funktion: Portable Charaktere befinden sich noch in aktiver Entwicklung. Fehler können auftreten.",
"remote.clientReady": "Dein Client ist bereit. Speichere die Hostadresse und klicke auf Spielen.", "remote.clientReady": "Dein Client ist bereit. Speichere die Hostadresse und klicke auf Spielen.",
"remote.clientIntro": "Wähle einen vorhandenen Spielclient oder lade ihn hier herunter. Ein lokaler Server ist nicht nötig.", "remote.clientIntro": "Wähle einen vorhandenen Spielclient oder hole dir einen über den Launcher der Community. Ein lokaler Server ist nicht nötig.",
"welcome.host.title": "Einen Server hosten", "welcome.host.title": "Einen Server hosten",
"welcome.host.text": "Einen neuen Server installieren oder einen vorhandenen verwalten.", "welcome.host.text": "Einen neuen Server installieren oder einen vorhandenen verwalten.",
"welcome.connect.title": "Mit anderem Server verbinden", "welcome.connect.title": "Mit anderem Server verbinden",
@@ -119,7 +119,6 @@ const de: Partial<Record<keyof typeof en, string>> = {
"btn.stopSmall": "Stoppen", "btn.stopSmall": "Stoppen",
"btn.restart": "Neustart", "btn.restart": "Neustart",
"btn.startWithoutUpdate": "Ohne Update starten", "btn.startWithoutUpdate": "Ohne Update starten",
"btn.playWithoutUpdate": "Ohne Update spielen",
"import.squidRepackWarning": "Dieses SquidBots-Repack prüft den Worldserver-Hash. Ein Austausch kann Start_All_Bots und coa_update deaktivieren. Updates fragen vorher nach.", "import.squidRepackWarning": "Dieses SquidBots-Repack prüft den Worldserver-Hash. Ein Austausch kann Start_All_Bots und coa_update deaktivieren. Updates fragen vorher nach.",
"btn.play": "SPIELEN", "btn.play": "SPIELEN",
"btn.startPlay": "STARTEN & SPIELEN", "btn.startPlay": "STARTEN & SPIELEN",
@@ -262,6 +261,7 @@ const de: Partial<Record<keyof typeof en, string>> = {
"client.updateAddon": "Begleiter-Addon aktualisieren", "client.updateAddon": "Begleiter-Addon aktualisieren",
"client.addonNote": "Begleiter-Addon installiert. Andere Addons wurden nicht angetastet.", "client.addonNote": "Begleiter-Addon installiert. Andere Addons wurden nicht angetastet.",
"client.changeFolder": "Ordner ändern …", "client.changeFolder": "Ordner ändern …",
"client.getFromSite": "Launcher holen…",
// Diagnostics // Diagnostics
"diag.title": "Diagnose", "diag.title": "Diagnose",
@@ -599,6 +599,8 @@ const de: Partial<Record<keyof typeof en, string>> = {
"comp.startCount": "Wie viele sich anmelden", "comp.startCount": "Wie viele sich anmelden",
"comp.startSave": "Speichern", "comp.startSave": "Speichern",
"comp.startSaved": "Gespeichert. Gilt ab dem nächsten Serverstart.", "comp.startSaved": "Gespeichert. Gilt ab dem nächsten Serverstart.",
"comp.startTopUp": "Gespeichert. {n} weitere Begleiter werden erstellt, damit {max} existieren; die übrigen gibt es schon.",
"comp.startTopUpConfirm": "{n} weitere Begleiter erstellen, damit {max} existieren? Vorhandene werden nicht erneut erstellt.",
"comp.startHint": "Bots, die sich nicht anmelden, bleiben gespeichert und können später online gebracht werden.", "comp.startHint": "Bots, die sich nicht anmelden, bleiben gespeichert und können später online gebracht werden.",
"comp.startInvalid": "Gib eine ganze Zahl von 0 bis 5000 ein.", "comp.startInvalid": "Gib eine ganze Zahl von 0 bis 5000 ein.",
@@ -626,7 +628,7 @@ const de: Partial<Record<keyof typeof en, string>> = {
"comp.deleteConfirm": "Alle {n} Begleiter endgültig löschen? Zuvor wird ein Wiederherstellungspunkt gespeichert. Deine eigenen Charaktere bleiben unberührt.", "comp.deleteConfirm": "Alle {n} Begleiter endgültig löschen? Zuvor wird ein Wiederherstellungspunkt gespeichert. Deine eigenen Charaktere bleiben unberührt.",
"comp.deleteDone": "Alle Begleiter wurden gelöscht. Zuvor wurde ein Wiederherstellungspunkt gespeichert.", "comp.deleteDone": "Alle Begleiter wurden gelöscht. Zuvor wurde ein Wiederherstellungspunkt gespeichert.",
"err.companion_command_unsupported.title": "Diese Serverversion kann das noch nicht", "err.companion_command_unsupported.title": "Diese Serverversion kann das noch nicht",
"err.companion_command_unsupported.message": "Das Bot-Modul dieses Server-Builds kennt diesen Befehl nicht. Aktualisiere den Server oder starte ihn neu, um Laufendes zu stoppen.", "err.companion_command_unsupported.message": "Das Bot-Modul dieses Servers ist älter als dieser Manager und kennt diesen Befehl nicht. Aktualisiere das Bot-Modul auf der Seite „Module“ (oder den Server) und starte die Welt neu.",
// Despawn some // Despawn some
"comp.despawnSome": "{n} Bots entfernen", "comp.despawnSome": "{n} Bots entfernen",
@@ -647,51 +649,26 @@ const de: Partial<Record<keyof typeof en, string>> = {
// Game client download and update // Game client download and update
"btn.close": "Schließen", "btn.close": "Schließen",
"btn.setupClient": "Spielclient einrichten", "btn.setupClient": "Spielclient einrichten",
"btn.updateClient": "CLIENT AKTUALISIEREN",
"client.setup.title": "Spielclient einrichten", "client.setup.title": "Spielclient einrichten",
"client.setup.intro": "Zum Spielen brauchst du den Spielclient. Nutze einen vorhandenen oder lass ihn vom Manager herunterladen.", "client.setup.intro": "Zum Spielen brauchst du den Spielclient. Die Community gibt ihn über ihren offiziellen Launcher heraus.",
"client.setup.have": "Ich habe bereits einen Client", "client.setup.have": "Ich habe bereits einen Client",
"client.setup.download": "Client herunterladen", "client.setup.getLauncher": "Launcher holen (conquestofazerothcore.to)",
"client.setup.downloadHint": "Etwa 43 GB", "client.setup.getLauncherHint": "Öffnet die Website der Community im Browser. Lade dort den Launcher herunter, installiere ihn, melde dich mit deinem Konto an und lass ihn das Spiel laden (etwa 43 GB).",
"client.dl.pickParent": "Wähle, wohin der Spielclient soll", "client.setup.haveHint": "Wähle den Ordner, in den der Launcher das Spiel installiert hat, oder eine andere Kopie des Clients.",
"client.dl.confirmText": "Version {v}, {size}. Er wird in diesem Ordner gespeichert:", "client.setup.hdHint": "Standard- oder HD-Grafik wählst du im Launcher: Öffne dort die Einstellungen und schalte „HD graphics“ um. Der Manager kann das nicht ändern.",
"client.dl.free": "Freier Platz auf diesem Laufwerk: {free}.", "races.patch.active": "Client-Patch: Aktiv",
"client.dl.notEnough": "Nicht genug freier Platz: {need} nötig, {free} verfügbar. Wähle ein anderes Laufwerk.", "races.patch.disabled": "Client-Patch: Deaktiviert (.disabled)",
"client.dl.otherFolder": "Anderer Ordner …", "races.patch.notInstalled": "Client-Patch: Nicht installiert",
"client.dl.start": "Herunterladen", "races.patch.partial": "Client-Patch: {a}/{b} MPQ",
"races.patch.partialHint": "Dateien fehlen oder wurden geändert. Repariere den Client-Patch.",
"races.patch.install": "Client-Patch installieren",
"races.patch.repair": "Client-Patch reparieren",
"races.patch.uninstall": "Client-Patch entfernen",
"races.patch.willEnable": "Der Patch ist nach der Installation aktiv.",
"races.patch.willStayOff": "Der Patch bleibt nach der Installation deaktiviert: Das Servermodul ist aus oder fehlt.",
"client.dl.back": "Zurück", "client.dl.back": "Zurück",
"client.dl.retry": "Erneut versuchen",
"client.dl.resume": "Fortsetzen",
"client.dl.cancel": "Anhalten",
"client.dl.cancelled": "Angehalten. Alles bereits Heruntergeladene bleibt erhalten; du kannst jederzeit fortsetzen.",
"client.dl.scanning": "Dateien werden verglichen …",
"client.dl.downloading": "Wird heruntergeladen",
"client.dl.progress": "{done} von {total}",
"client.dl.speed": "{speed}/s",
"client.dl.done": "Der Spielclient ist bereit", "client.dl.done": "Der Spielclient ist bereit",
"client.dl.doneText": "Er ist mit diesem Server verknüpft. Du kannst auf PLAY drücken.", "client.dl.doneText": "Er ist mit diesem Server verknüpft. Du kannst auf PLAY drücken.",
"client.upd.title": "Client-Update",
"client.upd.available": "Ein neuerer Spielclient ist verfügbar: {v}.",
"client.upd.summary": "{n} Datei(en) zum Herunterladen, insgesamt {size}.",
"client.upd.upToDate": "Dein Client entspricht bereits Version {v}.",
"client.upd.modifiedTitle": "{n} Datei(en) hast du geändert",
"client.upd.modifiedText": "Zum Beispiel eine gepatchte Programmdatei. Behalte sie oder ersetze sie durch die offiziellen Versionen; deine werden dann im Ordner .coa-manager des Clients gesichert. Grafik-Wrapper (d3d9.dll und ähnliche) und Konfigurationsdateien bleiben immer unverändert.",
"client.upd.keep": "Von mir geänderte Dateien behalten",
"client.upd.more": "… und {n} weitere",
"client.upd.start": "Client aktualisieren",
"client.upd.later": "Jetzt nicht",
"client.upd.playAnyway": "Ohne Update spielen",
"client.upd.done": "Der Spielclient ist aktuell",
"client.upd.doneText": "Der Manager sagt dir Bescheid, wenn eine neuere Version erscheint.",
"client.track.title": "Client aktuell halten",
"client.track.text": "Der Manager vergleicht deinen Client einmal mit dem offiziellen und prüft danach auf neue Versionen, wie beim Server. Von dir geänderte Dateien werden nur ersetzt, wenn du es willst.",
"client.track.start": "Aktuell halten",
"client.track.startUpdate": "Aktualisieren und aktuell halten",
"client.track.button": "Diesen Client aktuell halten …",
"client.version": "Client-Version",
"client.versionUntracked": "vom Manager nicht verfolgt",
"client.versionUnfinished": "Download nicht abgeschlossen",
"client.downloadInstead": "Client herunterladen …",
// Accounts panel, password toggle, install size, addon explanation // Accounts panel, password toggle, install size, addon explanation
"pw.show": "Passwort anzeigen", "pw.show": "Passwort anzeigen",
@@ -782,6 +759,15 @@ const de: Partial<Record<keyof typeof en, string>> = {
"mysql.applied": "Angewandte Optionen: {count}", "mysql.applied": "Angewandte Optionen: {count}",
"sched.title": "Geplanter Neustart", "sched.title": "Geplanter Neustart",
"sched.enable": "Die Welt jeden Tag neu starten", "sched.enable": "Die Welt jeden Tag neu starten",
"sched.weeklyEnable": "Die Welt jede Woche neu starten",
"sched.day": "Tag",
"sched.days.monday": "Montag",
"sched.days.tuesday": "Dienstag",
"sched.days.wednesday": "Mittwoch",
"sched.days.thursday": "Donnerstag",
"sched.days.friday": "Freitag",
"sched.days.saturday": "Samstag",
"sched.days.sunday": "Sonntag",
"sched.time": "Uhrzeit", "sched.time": "Uhrzeit",
"sched.warning": "Vorwarnung (Minuten)", "sched.warning": "Vorwarnung (Minuten)",
"sched.hint": "Die Welt startet zu dieser Uhrzeit dieses Computers neu, mit einem Countdown im Spielchat; die Datenbank läuft weiter, Spieler melden sich danach wieder an. Ein laufender Server übernimmt die neue Zeit innerhalb einer Minute.", "sched.hint": "Die Welt startet zu dieser Uhrzeit dieses Computers neu, mit einem Countdown im Spielchat; die Datenbank läuft weiter, Spieler melden sich danach wieder an. Ein laufender Server übernimmt die neue Zeit innerhalb einer Minute.",
@@ -860,6 +846,11 @@ const de: Partial<Record<keyof typeof en, string>> = {
"mod.restart": "Änderungen werden nach einem Neustart des Weltservers wirksam.", "mod.restart": "Änderungen werden nach einem Neustart des Weltservers wirksam.",
"mod.switch": "{name} ein- oder ausschalten", "mod.switch": "{name} ein- oder ausschalten",
"mod.notHere": "Nicht Teil dieses Servers", "mod.notHere": "Nicht Teil dieses Servers",
"mod.update.available": "Neuere Version verfügbar: {from} → {to}.",
"mod.update.hint": "Nichts wird von selbst aktualisiert. Der Server muss gestoppt sein; die Einstellungen des Moduls bleiben erhalten.",
"mod.update.do": "Aktualisieren",
"mod.update.working": "Wird aktualisiert…",
"mod.update.done": "Modul {id} auf {commit} aktualisiert. Starte den Server, um es zu nutzen.",
"mod.github": "GitHub", "mod.github": "GitHub",
"mod.settings": "Einstellungen", "mod.settings": "Einstellungen",
"mod.default": "Zurück zum Standard ({v})", "mod.default": "Zurück zum Standard ({v})",
@@ -933,7 +924,6 @@ const de: Partial<Record<keyof typeof en, string>> = {
"dash.openBrowser": "Im Browser öffnen", "dash.openBrowser": "Im Browser öffnen",
"dash.update": "Dashboard aktualisieren", "dash.update": "Dashboard aktualisieren",
"upd.startAfter": "Server nach dem Update starten (sonst bleibt ein angehaltener Server angehalten)", "upd.startAfter": "Server nach dem Update starten (sonst bleibt ein angehaltener Server angehalten)",
"client.startAfter": "Spiel nach dem Client-Update starten",
"bk.folder": "Sicherungsordner", "bk.folder": "Sicherungsordner",
"bk.folderDefault": "Standard", "bk.folderDefault": "Standard",
"bk.folderNote": "Neue Sicherungen werden hier gespeichert, zum Beispiel auf einem anderen Laufwerk. Frühere Sicherungen bleiben, wo sie sind, und werden weiter aufgelistet. Der Ordner muss außerhalb des Serverordners liegen.", "bk.folderNote": "Neue Sicherungen werden hier gespeichert, zum Beispiel auf einem anderen Laufwerk. Frühere Sicherungen bleiben, wo sie sind, und werden weiter aufgelistet. Der Ordner muss außerhalb des Serverordners liegen.",
@@ -946,8 +936,6 @@ const de: Partial<Record<keyof typeof en, string>> = {
"remove.stopFirst": "Halte zuerst den Server an.", "remove.stopFirst": "Halte zuerst den Server an.",
"remove.confirm": "Diesen Server aus dem Manager entfernen?\n\n{path}\n\nEs werden keine Dateien gelöscht.", "remove.confirm": "Diesen Server aus dem Manager entfernen?\n\n{path}\n\nEs werden keine Dateien gelöscht.",
"upd.dbUnchecked": "Die Datenbank konnte nicht geprüft werden, daher sind offene Datenbankänderungen unbekannt: {why}", "upd.dbUnchecked": "Die Datenbank konnte nicht geprüft werden, daher sind offene Datenbankänderungen unbekannt: {why}",
"client.job.checking": "Client wird geprüft…",
"client.job.updating": "Client wird aktualisiert",
"fr.lan.address": "Netzwerkadresse", "fr.lan.address": "Netzwerkadresse",
"fr.lan.automatic": "Automatisch", "fr.lan.automatic": "Automatisch",
"fr.lan.default": "Standard", "fr.lan.default": "Standard",
@@ -1129,6 +1117,13 @@ const de: Partial<Record<keyof typeof en, string>> = {
"serverLogs.errors": "Nur Fehler", "serverLogs.errors": "Nur Fehler",
"serverLogs.off": "Aus", "serverLogs.off": "Aus",
"serverLogs.saved": "Gespeichert. Zum Anwenden den Server neu starten.", "serverLogs.saved": "Gespeichert. Zum Anwenden den Server neu starten.",
"serverLogs.autoClean": "Serverlogs nach Größe automatisch bereinigen",
"serverLogs.maxSize": "Max. Größe",
"serverLogs.autoCleanHint": "Löscht alte Logdateien, wenn Core/Logs diese Größe überschreitet (geprüft beim Start der Welt und regelmäßig während des Betriebs).",
"serverLogs.currentSize": "Aktuelle Loggröße: {size}",
"serverLogs.cleanNow": "Logs bereinigen ({size})",
"serverLogs.cleaned": "{freed} an Logs bereinigt.",
"serverLogs.skippedInUse": "{remaining} werden vom laufenden Server verwendet und konnten nicht entfernt werden.",
"mod.requiresSquid": "Aktivieren Sie SQUID-Bots, um Dungeon Clear zu verwenden.", "mod.requiresSquid": "Aktivieren Sie SQUID-Bots, um Dungeon Clear zu verwenden.",
}; };
+42 -47
View File
@@ -45,7 +45,7 @@ const en = {
"races.existing": "Existing characters keep their race and data.", "races.existing": "Existing characters keep their race and data.",
"mod.switching": "Applying changes… Please wait.", "mod.switching": "Applying changes… Please wait.",
"remote.clientReady": "Your client is ready. Save the host’s address, then press Play.", "remote.clientReady": "Your client is ready. Save the host’s address, then press Play.",
"remote.clientIntro": "Choose an existing game client or download one here. No local server is needed.", "remote.clientIntro": "Choose an existing game client, or get one through the community’s launcher. No local server is needed.",
"welcome.host.title": "Host a server", "welcome.host.title": "Host a server",
"welcome.host.text": "Install a new server or manage one you already have.", "welcome.host.text": "Install a new server or manage one you already have.",
"welcome.connect.title": "Connect to another server", "welcome.connect.title": "Connect to another server",
@@ -66,6 +66,15 @@ const en = {
"mysql.applied": "Options applied: {count}", "mysql.applied": "Options applied: {count}",
"sched.title": "Scheduled restart", "sched.title": "Scheduled restart",
"sched.enable": "Restart the world every day", "sched.enable": "Restart the world every day",
"sched.weeklyEnable": "Restart the world every week",
"sched.day": "Day",
"sched.days.monday": "Monday",
"sched.days.tuesday": "Tuesday",
"sched.days.wednesday": "Wednesday",
"sched.days.thursday": "Thursday",
"sched.days.friday": "Friday",
"sched.days.saturday": "Saturday",
"sched.days.sunday": "Sunday",
"sched.time": "Time", "sched.time": "Time",
"sched.warning": "Warning (minutes)", "sched.warning": "Warning (minutes)",
"sched.hint": "The world restarts at this time of this computer with a countdown in the game chat; the database keeps running and players log in again after it. A minute after saving, the running server follows the new time.", "sched.hint": "The world restarts at this time of this computer with a countdown in the game chat; the database keeps running and players log in again after it. A minute after saving, the running server follows the new time.",
@@ -200,7 +209,6 @@ const en = {
"btn.stopSmall": "Stop", "btn.stopSmall": "Stop",
"btn.restart": "Restart", "btn.restart": "Restart",
"btn.startWithoutUpdate": "Start without updating", "btn.startWithoutUpdate": "Start without updating",
"btn.playWithoutUpdate": "Play without updating",
"import.squidRepackWarning": "This SquidBots repack checks its worldserver hash. Replacing the binary can stop Start_All_Bots and coa_update from working. Updates will ask before replacing it.", "import.squidRepackWarning": "This SquidBots repack checks its worldserver hash. Replacing the binary can stop Start_All_Bots and coa_update from working. Updates will ask before replacing it.",
"btn.play": "PLAY", "btn.play": "PLAY",
"btn.startPlay": "START & PLAY", "btn.startPlay": "START & PLAY",
@@ -374,6 +382,7 @@ const en = {
"client.updateAddon": "Update companion addon", "client.updateAddon": "Update companion addon",
"client.addonNote": "Companion addon installed. Other addons were not touched.", "client.addonNote": "Companion addon installed. Other addons were not touched.",
"client.changeFolder": "Change folder…", "client.changeFolder": "Change folder…",
"client.getFromSite": "Get the launcher…",
// Diagnostics // Diagnostics
"diag.title": "Diagnostics", "diag.title": "Diagnostics",
@@ -712,6 +721,8 @@ const en = {
"comp.startCount": "How many log in", "comp.startCount": "How many log in",
"comp.startSave": "Save", "comp.startSave": "Save",
"comp.startSaved": "Saved. It applies the next time the server starts.", "comp.startSaved": "Saved. It applies the next time the server starts.",
"comp.startTopUp": "Saved. Creating {n} more companions so that {max} exist; the others already exist.",
"comp.startTopUpConfirm": "Create {n} more companions so that {max} exist? Companions that already exist are not created again.",
"comp.startHint": "Bots that do not log in stay saved and can be brought online later.", "comp.startHint": "Bots that do not log in stay saved and can be brought online later.",
"comp.startInvalid": "Enter a whole number from 0 to 5000.", "comp.startInvalid": "Enter a whole number from 0 to 5000.",
@@ -739,7 +750,7 @@ const en = {
"comp.deleteConfirm": "Delete all {n} companions for good? A recovery point is saved first. Your own characters are not touched.", "comp.deleteConfirm": "Delete all {n} companions for good? A recovery point is saved first. Your own characters are not touched.",
"comp.deleteDone": "All companions were deleted. A recovery point was saved first.", "comp.deleteDone": "All companions were deleted. A recovery point was saved first.",
"err.companion_command_unsupported.title": "This server version can not do that yet", "err.companion_command_unsupported.title": "This server version can not do that yet",
"err.companion_command_unsupported.message": "The bot module of this server build has no such command. Update the server, or restart it to stop what is running.", "err.companion_command_unsupported.message": "The bot module on this server is older than this Manager and does not know this command. Update the bot module on the Modules page (or update the server), then restart the world.",
// Despawn some // Despawn some
"comp.despawnSome": "Despawn {n} bots", "comp.despawnSome": "Despawn {n} bots",
@@ -757,54 +768,29 @@ const en = {
"overview.updatingNote": "Updating: the server is stopped, backed up, updated and started again to check that it works.", "overview.updatingNote": "Updating: the server is stopped, backed up, updated and started again to check that it works.",
"nav.updateDot": "Update available", "nav.updateDot": "Update available",
// Game client download and update // Game client: link a folder or get the community launcher
"btn.close": "Close", "btn.close": "Close",
"btn.setupClient": "Set up game client", "btn.setupClient": "Set up game client",
"btn.updateClient": "UPDATE CLIENT",
"client.setup.title": "Set up the game client", "client.setup.title": "Set up the game client",
"client.setup.intro": "To play you need the game client. Use one you already have, or let the Manager download it.", "client.setup.intro": "To play you need the game client. The community hands it out through its official launcher.",
"client.setup.have": "I already have a client", "client.setup.have": "I already have a client",
"client.setup.download": "Download the client", "client.setup.getLauncher": "Get the launcher (conquestofazerothcore.to)",
"client.setup.downloadHint": "About 43 GB", "client.setup.getLauncherHint": "Opens the community website in your browser. Download and install the launcher there, sign in with your account and let it download the game (about 43 GB).",
"client.dl.pickParent": "Choose where to put the game client", "client.setup.haveHint": "Pick the folder the launcher installed the game to, or any other copy of the client.",
"client.dl.confirmText": "Version {v}, {size}. It will be saved in this folder:", "client.setup.hdHint": "Standard or HD graphics is chosen in the launcher: open its Settings and switch \"HD graphics\". The Manager cannot change it.",
"client.dl.free": "Free space on that drive: {free}.", "races.patch.active": "Client Patch: Active",
"client.dl.notEnough": "Not enough free space: {need} needed, {free} available. Choose another drive.", "races.patch.disabled": "Client Patch: Disabled (.disabled)",
"client.dl.otherFolder": "Other folder…", "races.patch.notInstalled": "Client Patch: Not Installed",
"client.dl.start": "Download", "races.patch.partial": "Client Patch: {a}/{b} MPQ",
"races.patch.partialHint": "Files are missing or changed. Repair the client patch.",
"races.patch.install": "Install Client Patch",
"races.patch.repair": "Repair Client Patch",
"races.patch.uninstall": "Uninstall Client Patch",
"races.patch.willEnable": "The patch will be enabled after installation.",
"races.patch.willStayOff": "The patch will stay disabled after installation: the server module is off or missing.",
"client.dl.back": "Back", "client.dl.back": "Back",
"client.dl.retry": "Try again",
"client.dl.resume": "Continue",
"client.dl.cancel": "Stop",
"client.dl.cancelled": "Stopped. Everything already downloaded is kept; continue whenever you like.",
"client.dl.scanning": "Comparing files…",
"client.dl.downloading": "Downloading",
"client.dl.progress": "{done} of {total}",
"client.dl.speed": "{speed}/s",
"client.dl.done": "The game client is ready", "client.dl.done": "The game client is ready",
"client.dl.doneText": "It is linked to this server. You can press PLAY.", "client.dl.doneText": "It is linked to this server. You can press PLAY.",
"client.upd.title": "Client update",
"client.upd.available": "A newer game client is available: {v}.",
"client.upd.summary": "{n} file(s) to download, {size} in total.",
"client.upd.upToDate": "Your client already matches version {v}.",
"client.upd.modifiedTitle": "{n} file(s) were changed by you",
"client.upd.modifiedText": "For example a patched executable. Keep them, or replace them with the official versions; yours are then saved in the client’s .coa-manager folder. Graphics wrappers (d3d9.dll and the like) and config files are always left as they are.",
"client.upd.keep": "Keep the files I changed",
"client.upd.more": "… and {n} more",
"client.upd.start": "Update client",
"client.upd.later": "Not now",
"client.upd.playAnyway": "Play without updating",
"client.upd.done": "The game client is up to date",
"client.upd.doneText": "The Manager will tell you when a newer one is published.",
"client.track.title": "Keep the client up to date",
"client.track.text": "The Manager compares your client with the official one once, then checks for new versions like it does for the server. Files you changed are never replaced unless you say so.",
"client.track.start": "Keep up to date",
"client.track.startUpdate": "Update and keep up to date",
"client.track.button": "Keep this client up to date…",
"client.version": "Client version",
"client.versionUntracked": "not tracked by the Manager",
"client.versionUnfinished": "download not finished",
"client.downloadInstead": "Download a client…",
// Accounts panel, password toggle, install size, addon explanation // Accounts panel, password toggle, install size, addon explanation
"pw.show": "Show password", "pw.show": "Show password",
@@ -965,6 +951,11 @@ const en = {
"mod.restart": "Changes apply after the world server restarts.", "mod.restart": "Changes apply after the world server restarts.",
"mod.switch": "Turn {name} on or off", "mod.switch": "Turn {name} on or off",
"mod.notHere": "Not part of this server", "mod.notHere": "Not part of this server",
"mod.update.available": "Newer build available: {from} → {to}.",
"mod.update.hint": "Nothing updates on its own. The server must be stopped; the module’s settings are kept.",
"mod.update.do": "Update",
"mod.update.working": "Updating…",
"mod.update.done": "Module {id} updated to {commit}. Start the server to use it.",
"mod.github": "GitHub", "mod.github": "GitHub",
"mod.settings": "Settings", "mod.settings": "Settings",
"mod.default": "Back to the default ({v})", "mod.default": "Back to the default ({v})",
@@ -1038,7 +1029,6 @@ const en = {
"dash.openBrowser": "Open in the browser", "dash.openBrowser": "Open in the browser",
"dash.update": "Update the dashboard", "dash.update": "Update the dashboard",
"upd.startAfter": "Start the server after updating it (otherwise a stopped server stays stopped)", "upd.startAfter": "Start the server after updating it (otherwise a stopped server stays stopped)",
"client.startAfter": "Start the game after the client has been updated",
"bk.folder": "Backup folder", "bk.folder": "Backup folder",
"bk.folderDefault": "default", "bk.folderDefault": "default",
"bk.folderNote": "New backups are saved here, for example on another drive. Backups made earlier stay where they are and are still listed. The folder must be outside the server folder.", "bk.folderNote": "New backups are saved here, for example on another drive. Backups made earlier stay where they are and are still listed. The folder must be outside the server folder.",
@@ -1051,8 +1041,6 @@ const en = {
"remove.stopFirst": "Stop the server first.", "remove.stopFirst": "Stop the server first.",
"remove.confirm": "Remove this server from the Manager?\n\n{path}\n\nNo files are deleted.", "remove.confirm": "Remove this server from the Manager?\n\n{path}\n\nNo files are deleted.",
"upd.dbUnchecked": "The database could not be checked, so pending database changes are unknown: {why}", "upd.dbUnchecked": "The database could not be checked, so pending database changes are unknown: {why}",
"client.job.checking": "Checking the client…",
"client.job.updating": "Updating the client",
"nav.characters": "Characters", "nav.characters": "Characters",
"q.characters": "Which of my characters can play where?", "q.characters": "Which of my characters can play where?",
"portable.experimental": "Experimental feature: portable characters are still in active development. Bugs may occur.", "portable.experimental": "Experimental feature: portable characters are still in active development. Bugs may occur.",
@@ -1398,6 +1386,13 @@ const en = {
"serverLogs.errors": "Errors only", "serverLogs.errors": "Errors only",
"serverLogs.off": "Off", "serverLogs.off": "Off",
"serverLogs.saved": "Saved. Restart the server to apply.", "serverLogs.saved": "Saved. Restart the server to apply.",
"serverLogs.autoClean": "Auto-clean server logs by size",
"serverLogs.maxSize": "Max size",
"serverLogs.autoCleanHint": "Clears old log files when Core/Logs exceeds this size (checked on world start and periodically while running).",
"serverLogs.currentSize": "Current log size: {size}",
"serverLogs.cleanNow": "Clean logs ({size})",
"serverLogs.cleaned": "Cleaned {freed} of logs.",
"serverLogs.skippedInUse": "{remaining} in use by the running server could not be removed.",
"mod.requiresSquid": "Enable SQUID bots to use Dungeon Clear.", "mod.requiresSquid": "Enable SQUID bots to use Dungeon Clear.",
} as const; } as const;
+41 -46
View File
@@ -48,7 +48,7 @@ const es: Partial<Record<keyof typeof en, string>> = {
"mod.switching": "Aplicando cambios… Espera un momento.", "mod.switching": "Aplicando cambios… Espera un momento.",
"portable.experimental": "Función experimental: los personajes portátiles siguen en desarrollo activo. Pueden producirse errores.", "portable.experimental": "Función experimental: los personajes portátiles siguen en desarrollo activo. Pueden producirse errores.",
"remote.clientReady": "Tu cliente está listo. Guarda la dirección del anfitrión y pulsa Jugar.", "remote.clientReady": "Tu cliente está listo. Guarda la dirección del anfitrión y pulsa Jugar.",
"remote.clientIntro": "Elige un cliente existente o descárgalo aquí. No necesitas un servidor local.", "remote.clientIntro": "Elige un cliente del juego existente u obtén uno con el launcher de la comunidad. No hace falta un servidor local.",
"welcome.host.title": "Alojar un servidor", "welcome.host.title": "Alojar un servidor",
"welcome.host.text": "Instalar un servidor nuevo o gestionar uno existente.", "welcome.host.text": "Instalar un servidor nuevo o gestionar uno existente.",
"welcome.connect.title": "Conectarse a otro servidor", "welcome.connect.title": "Conectarse a otro servidor",
@@ -119,7 +119,6 @@ const es: Partial<Record<keyof typeof en, string>> = {
"btn.stopSmall": "Detener", "btn.stopSmall": "Detener",
"btn.restart": "Reiniciar", "btn.restart": "Reiniciar",
"btn.startWithoutUpdate": "Iniciar sin actualizar", "btn.startWithoutUpdate": "Iniciar sin actualizar",
"btn.playWithoutUpdate": "Jugar sin actualizar",
"import.squidRepackWarning": "Este repack SquidBots verifica el hash del servidor. Sustituirlo puede impedir el funcionamiento de Start_All_Bots y coa_update. Se solicitará confirmación.", "import.squidRepackWarning": "Este repack SquidBots verifica el hash del servidor. Sustituirlo puede impedir el funcionamiento de Start_All_Bots y coa_update. Se solicitará confirmación.",
"btn.play": "JUGAR", "btn.play": "JUGAR",
"btn.startPlay": "INICIAR Y JUGAR", "btn.startPlay": "INICIAR Y JUGAR",
@@ -262,6 +261,7 @@ const es: Partial<Record<keyof typeof en, string>> = {
"client.updateAddon": "Actualizar addon de compañeros", "client.updateAddon": "Actualizar addon de compañeros",
"client.addonNote": "Addon de compañeros instalado. Los demás addons no se tocaron.", "client.addonNote": "Addon de compañeros instalado. Los demás addons no se tocaron.",
"client.changeFolder": "Cambiar carpeta…", "client.changeFolder": "Cambiar carpeta…",
"client.getFromSite": "Obtener el launcher…",
// Diagnostics // Diagnostics
"diag.title": "Diagnóstico", "diag.title": "Diagnóstico",
@@ -599,6 +599,8 @@ const es: Partial<Record<keyof typeof en, string>> = {
"comp.startCount": "Cuántos inician sesión", "comp.startCount": "Cuántos inician sesión",
"comp.startSave": "Guardar", "comp.startSave": "Guardar",
"comp.startSaved": "Guardado. Se aplica la próxima vez que se inicie el servidor.", "comp.startSaved": "Guardado. Se aplica la próxima vez que se inicie el servidor.",
"comp.startTopUp": "Guardado. Se crean {n} compañeros más para que existan {max}; los demás ya existen.",
"comp.startTopUpConfirm": "¿Crear {n} compañeros más para que existan {max}? Los que ya existen no se crean de nuevo.",
"comp.startHint": "Los bots que no inician sesión quedan guardados y se pueden conectar más tarde.", "comp.startHint": "Los bots que no inician sesión quedan guardados y se pueden conectar más tarde.",
"comp.startInvalid": "Introduce un número entero de 0 a 5000.", "comp.startInvalid": "Introduce un número entero de 0 a 5000.",
@@ -626,7 +628,7 @@ const es: Partial<Record<keyof typeof en, string>> = {
"comp.deleteConfirm": "¿Eliminar definitivamente los {n} compañeros? Antes se guarda un punto de recuperación. Tus propios personajes no se tocan.", "comp.deleteConfirm": "¿Eliminar definitivamente los {n} compañeros? Antes se guarda un punto de recuperación. Tus propios personajes no se tocan.",
"comp.deleteDone": "Se eliminaron todos los compañeros. Antes se guardó un punto de recuperación.", "comp.deleteDone": "Se eliminaron todos los compañeros. Antes se guardó un punto de recuperación.",
"err.companion_command_unsupported.title": "Esta versión del servidor aún no puede hacerlo", "err.companion_command_unsupported.title": "Esta versión del servidor aún no puede hacerlo",
"err.companion_command_unsupported.message": "El módulo de bots de esta versión del servidor no tiene ese comando. Actualiza el servidor o reinícialo para detener lo que esté en marcha.", "err.companion_command_unsupported.message": "El módulo de bots de este servidor es más antiguo que este Manager y no conoce ese comando. Actualiza el módulo de bots en la página «Módulos» (o el servidor) y reinicia el mundo.",
// Despawn some // Despawn some
"comp.despawnSome": "Retirar {n} bots", "comp.despawnSome": "Retirar {n} bots",
@@ -647,51 +649,26 @@ const es: Partial<Record<keyof typeof en, string>> = {
// Game client download and update // Game client download and update
"btn.close": "Cerrar", "btn.close": "Cerrar",
"btn.setupClient": "Configurar el cliente del juego", "btn.setupClient": "Configurar el cliente del juego",
"btn.updateClient": "ACTUALIZAR CLIENTE",
"client.setup.title": "Configurar el cliente del juego", "client.setup.title": "Configurar el cliente del juego",
"client.setup.intro": "Para jugar necesitas el cliente del juego. Usa uno que ya tengas o deja que el Manager lo descargue.", "client.setup.intro": "Para jugar necesitas el cliente del juego. La comunidad lo entrega a través de su launcher oficial.",
"client.setup.have": "Ya tengo un cliente", "client.setup.have": "Ya tengo un cliente",
"client.setup.download": "Descargar el cliente", "client.setup.getLauncher": "Obtener el launcher (conquestofazerothcore.to)",
"client.setup.downloadHint": "Unos 43 GB", "client.setup.getLauncherHint": "Abre la web de la comunidad en tu navegador. Descarga e instala allí el launcher, inicia sesión con tu cuenta y deja que descargue el juego (unos 43 GB).",
"client.dl.pickParent": "Elige dónde guardar el cliente del juego", "client.setup.haveHint": "Elige la carpeta donde el launcher instaló el juego, o cualquier otra copia del cliente.",
"client.dl.confirmText": "Versión {v}, {size}. Se guardará en esta carpeta:", "client.setup.hdHint": "Los gráficos estándar o HD se eligen en el launcher: abre sus Ajustes y cambia «HD graphics». El Manager no puede cambiarlo.",
"client.dl.free": "Espacio libre en esa unidad: {free}.", "races.patch.active": "Parche del cliente: Activo",
"client.dl.notEnough": "No hay espacio suficiente: se necesitan {need} y hay {free}. Elige otra unidad.", "races.patch.disabled": "Parche del cliente: Desactivado (.disabled)",
"client.dl.otherFolder": "Otra carpeta…", "races.patch.notInstalled": "Parche del cliente: No instalado",
"client.dl.start": "Descargar", "races.patch.partial": "Parche del cliente: {a}/{b} MPQ",
"races.patch.partialHint": "Faltan archivos o han cambiado. Repara el parche del cliente.",
"races.patch.install": "Instalar parche del cliente",
"races.patch.repair": "Reparar parche del cliente",
"races.patch.uninstall": "Desinstalar parche del cliente",
"races.patch.willEnable": "El parche estará activo después de la instalación.",
"races.patch.willStayOff": "El parche seguirá desactivado después de la instalación: el módulo del servidor está apagado o falta.",
"client.dl.back": "Atrás", "client.dl.back": "Atrás",
"client.dl.retry": "Reintentar",
"client.dl.resume": "Continuar",
"client.dl.cancel": "Detener",
"client.dl.cancelled": "Detenido. Todo lo ya descargado se conserva; puedes continuar cuando quieras.",
"client.dl.scanning": "Comparando archivos…",
"client.dl.downloading": "Descargando",
"client.dl.progress": "{done} de {total}",
"client.dl.speed": "{speed}/s",
"client.dl.done": "El cliente del juego está listo", "client.dl.done": "El cliente del juego está listo",
"client.dl.doneText": "Está vinculado a este servidor. Puedes pulsar PLAY.", "client.dl.doneText": "Está vinculado a este servidor. Puedes pulsar PLAY.",
"client.upd.title": "Actualización del cliente",
"client.upd.available": "Hay un cliente del juego más reciente: {v}.",
"client.upd.summary": "{n} archivo(s) por descargar, {size} en total.",
"client.upd.upToDate": "Tu cliente ya coincide con la versión {v}.",
"client.upd.modifiedTitle": "{n} archivo(s) cambiado(s) por ti",
"client.upd.modifiedText": "Por ejemplo un ejecutable modificado. Consérvalos o reemplázalos por las versiones oficiales; los tuyos se guardan entonces en la carpeta .coa-manager del cliente. Los wrappers gráficos (d3d9.dll y similares) y los archivos de configuración se dejan siempre como están.",
"client.upd.keep": "Conservar los archivos que cambié",
"client.upd.more": "… y {n} más",
"client.upd.start": "Actualizar cliente",
"client.upd.later": "Ahora no",
"client.upd.playAnyway": "Jugar sin actualizar",
"client.upd.done": "El cliente del juego está actualizado",
"client.upd.doneText": "El Manager te avisará cuando se publique una más reciente.",
"client.track.title": "Mantener el cliente actualizado",
"client.track.text": "El Manager compara una vez tu cliente con el oficial y luego busca versiones nuevas como hace con el servidor. Los archivos que cambiaste solo se reemplazan si tú lo decides.",
"client.track.start": "Mantener actualizado",
"client.track.startUpdate": "Actualizar y mantener actualizado",
"client.track.button": "Mantener este cliente actualizado…",
"client.version": "Versión del cliente",
"client.versionUntracked": "el Manager no la sigue",
"client.versionUnfinished": "descarga sin terminar",
"client.downloadInstead": "Descargar un cliente…",
// Accounts panel, password toggle, install size, addon explanation // Accounts panel, password toggle, install size, addon explanation
"pw.show": "Mostrar contraseña", "pw.show": "Mostrar contraseña",
@@ -782,6 +759,15 @@ const es: Partial<Record<keyof typeof en, string>> = {
"mysql.applied": "Opciones aplicadas: {count}", "mysql.applied": "Opciones aplicadas: {count}",
"sched.title": "Reinicio programado", "sched.title": "Reinicio programado",
"sched.enable": "Reiniciar el mundo cada día", "sched.enable": "Reiniciar el mundo cada día",
"sched.weeklyEnable": "Reiniciar el mundo cada semana",
"sched.day": "Día",
"sched.days.monday": "Lunes",
"sched.days.tuesday": "Martes",
"sched.days.wednesday": "Miércoles",
"sched.days.thursday": "Jueves",
"sched.days.friday": "Viernes",
"sched.days.saturday": "Sábado",
"sched.days.sunday": "Domingo",
"sched.time": "Hora", "sched.time": "Hora",
"sched.warning": "Aviso (minutos)", "sched.warning": "Aviso (minutos)",
"sched.hint": "El mundo se reinicia a esta hora de este ordenador con una cuenta atrás en el chat del juego; la base de datos sigue en marcha y los jugadores vuelven a entrar después. Un servidor en marcha sigue la nueva hora en menos de un minuto.", "sched.hint": "El mundo se reinicia a esta hora de este ordenador con una cuenta atrás en el chat del juego; la base de datos sigue en marcha y los jugadores vuelven a entrar después. Un servidor en marcha sigue la nueva hora en menos de un minuto.",
@@ -860,6 +846,11 @@ const es: Partial<Record<keyof typeof en, string>> = {
"mod.restart": "Los cambios se aplican al reiniciar el servidor del mundo.", "mod.restart": "Los cambios se aplican al reiniciar el servidor del mundo.",
"mod.switch": "Activar o desactivar {name}", "mod.switch": "Activar o desactivar {name}",
"mod.notHere": "No forma parte de este servidor", "mod.notHere": "No forma parte de este servidor",
"mod.update.available": "Hay una versión más reciente: {from} → {to}.",
"mod.update.hint": "Nada se actualiza solo. El servidor debe estar detenido; los ajustes del módulo se conservan.",
"mod.update.do": "Actualizar",
"mod.update.working": "Actualizando…",
"mod.update.done": "Módulo {id} actualizado a {commit}. Inicia el servidor para usarlo.",
"mod.github": "GitHub", "mod.github": "GitHub",
"mod.settings": "Ajustes", "mod.settings": "Ajustes",
"mod.default": "Volver al valor por defecto ({v})", "mod.default": "Volver al valor por defecto ({v})",
@@ -933,7 +924,6 @@ const es: Partial<Record<keyof typeof en, string>> = {
"dash.openBrowser": "Abrir en el navegador", "dash.openBrowser": "Abrir en el navegador",
"dash.update": "Actualizar el panel", "dash.update": "Actualizar el panel",
"upd.startAfter": "Iniciar el servidor tras actualizarlo (si no, un servidor detenido sigue detenido)", "upd.startAfter": "Iniciar el servidor tras actualizarlo (si no, un servidor detenido sigue detenido)",
"client.startAfter": "Iniciar el juego tras actualizar el cliente",
"bk.folder": "Carpeta de copias de seguridad", "bk.folder": "Carpeta de copias de seguridad",
"bk.folderDefault": "predeterminada", "bk.folderDefault": "predeterminada",
"bk.folderNote": "Las copias nuevas se guardan aquí, por ejemplo en otra unidad. Las anteriores se quedan donde están y siguen en la lista. La carpeta debe estar fuera de la carpeta del servidor.", "bk.folderNote": "Las copias nuevas se guardan aquí, por ejemplo en otra unidad. Las anteriores se quedan donde están y siguen en la lista. La carpeta debe estar fuera de la carpeta del servidor.",
@@ -946,8 +936,6 @@ const es: Partial<Record<keyof typeof en, string>> = {
"remove.stopFirst": "Detén primero el servidor.", "remove.stopFirst": "Detén primero el servidor.",
"remove.confirm": "¿Quitar este servidor del Manager?\n\n{path}\n\nNo se borra ningún archivo.", "remove.confirm": "¿Quitar este servidor del Manager?\n\n{path}\n\nNo se borra ningún archivo.",
"upd.dbUnchecked": "No se pudo comprobar la base de datos, así que se desconocen los cambios pendientes: {why}", "upd.dbUnchecked": "No se pudo comprobar la base de datos, así que se desconocen los cambios pendientes: {why}",
"client.job.checking": "Comprobando el cliente…",
"client.job.updating": "Actualizando el cliente",
"fr.lan.address": "Dirección de red", "fr.lan.address": "Dirección de red",
"fr.lan.automatic": "Automática", "fr.lan.automatic": "Automática",
"fr.lan.default": "Predeterminada", "fr.lan.default": "Predeterminada",
@@ -1129,6 +1117,13 @@ const es: Partial<Record<keyof typeof en, string>> = {
"serverLogs.errors": "Solo errores", "serverLogs.errors": "Solo errores",
"serverLogs.off": "Desactivados", "serverLogs.off": "Desactivados",
"serverLogs.saved": "Guardado. Reinicia el servidor para aplicar los cambios.", "serverLogs.saved": "Guardado. Reinicia el servidor para aplicar los cambios.",
"serverLogs.autoClean": "Limpiar automáticamente los registros del servidor por tamaño",
"serverLogs.maxSize": "Tamaño máx.",
"serverLogs.autoCleanHint": "Borra los archivos de registro antiguos cuando Core/Logs supera este tamaño (se comprueba al iniciar el mundo y periódicamente mientras funciona).",
"serverLogs.currentSize": "Tamaño actual de los registros: {size}",
"serverLogs.cleanNow": "Limpiar registros ({size})",
"serverLogs.cleaned": "Se limpiaron {freed} de registros.",
"serverLogs.skippedInUse": "{remaining} están en uso por el servidor en marcha y no se pudieron eliminar.",
"mod.requiresSquid": "Activa los bots SQUID para usar Dungeon Clear.", "mod.requiresSquid": "Activa los bots SQUID para usar Dungeon Clear.",
}; };
+41 -46
View File
@@ -48,7 +48,7 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"mod.switching": "Application des modifications… Veuillez patienter.", "mod.switching": "Application des modifications… Veuillez patienter.",
"portable.experimental": "Fonction expérimentale : les personnages portables sont encore en développement actif. Des bugs peuvent survenir.", "portable.experimental": "Fonction expérimentale : les personnages portables sont encore en développement actif. Des bugs peuvent survenir.",
"remote.clientReady": "Votre client est prêt. Enregistrez l’adresse de l’hôte, puis cliquez sur Jouer.", "remote.clientReady": "Votre client est prêt. Enregistrez l’adresse de l’hôte, puis cliquez sur Jouer.",
"remote.clientIntro": "Choisissez un client existant ou téléchargez-le ici. Aucun serveur local n’est nécessaire.", "remote.clientIntro": "Choisissez un client de jeu existant ou obtenez-en un via le lanceur de la communauté. Aucun serveur local n’est nécessaire.",
"welcome.host.title": "Héberger un serveur", "welcome.host.title": "Héberger un serveur",
"welcome.host.text": "Installer un serveur ou gérer un serveur existant.", "welcome.host.text": "Installer un serveur ou gérer un serveur existant.",
"welcome.connect.title": "Rejoindre un autre serveur", "welcome.connect.title": "Rejoindre un autre serveur",
@@ -119,7 +119,6 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"btn.stopSmall": "Arrêter", "btn.stopSmall": "Arrêter",
"btn.restart": "Redémarrer", "btn.restart": "Redémarrer",
"btn.startWithoutUpdate": "Démarrer sans mise à jour", "btn.startWithoutUpdate": "Démarrer sans mise à jour",
"btn.playWithoutUpdate": "Jouer sans mise à jour",
"import.squidRepackWarning": "Ce repack SquidBots vérifie le hash du serveur. Le remplacer peut empêcher Start_All_Bots et coa_update de fonctionner. Une confirmation sera demandée.", "import.squidRepackWarning": "Ce repack SquidBots vérifie le hash du serveur. Le remplacer peut empêcher Start_All_Bots et coa_update de fonctionner. Une confirmation sera demandée.",
"btn.play": "JOUER", "btn.play": "JOUER",
"btn.startPlay": "DÉMARRER ET JOUER", "btn.startPlay": "DÉMARRER ET JOUER",
@@ -262,6 +261,7 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"client.updateAddon": "Mettre à jour l’addon des compagnons", "client.updateAddon": "Mettre à jour l’addon des compagnons",
"client.addonNote": "Addon des compagnons installé. Les autres addons n’ont pas été touchés.", "client.addonNote": "Addon des compagnons installé. Les autres addons n’ont pas été touchés.",
"client.changeFolder": "Changer de dossier…", "client.changeFolder": "Changer de dossier…",
"client.getFromSite": "Obtenir le lanceur…",
// Diagnostics // Diagnostics
"diag.title": "Diagnostic", "diag.title": "Diagnostic",
@@ -599,6 +599,8 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"comp.startCount": "Combien se connectent", "comp.startCount": "Combien se connectent",
"comp.startSave": "Enregistrer", "comp.startSave": "Enregistrer",
"comp.startSaved": "Enregistré. S’applique au prochain démarrage du serveur.", "comp.startSaved": "Enregistré. S’applique au prochain démarrage du serveur.",
"comp.startTopUp": "Enregistré. {n} compagnons de plus sont créés pour qu’il y en ait {max} ; les autres existent déjà.",
"comp.startTopUpConfirm": "Créer {n} compagnons de plus pour qu’il y en ait {max} ? Ceux qui existent déjà ne sont pas recréés.",
"comp.startHint": "Les bots qui ne se connectent pas restent enregistrés et peuvent être mis en ligne plus tard.", "comp.startHint": "Les bots qui ne se connectent pas restent enregistrés et peuvent être mis en ligne plus tard.",
"comp.startInvalid": "Saisissez un nombre entier de 0 à 5000.", "comp.startInvalid": "Saisissez un nombre entier de 0 à 5000.",
@@ -626,7 +628,7 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"comp.deleteConfirm": "Supprimer définitivement les {n} compagnons ? Un point de restauration est d’abord enregistré. Vos propres personnages ne sont pas touchés.", "comp.deleteConfirm": "Supprimer définitivement les {n} compagnons ? Un point de restauration est d’abord enregistré. Vos propres personnages ne sont pas touchés.",
"comp.deleteDone": "Tous les compagnons ont été supprimés. Un point de restauration a été enregistré d’abord.", "comp.deleteDone": "Tous les compagnons ont été supprimés. Un point de restauration a été enregistré d’abord.",
"err.companion_command_unsupported.title": "Cette version du serveur ne sait pas encore le faire", "err.companion_command_unsupported.title": "Cette version du serveur ne sait pas encore le faire",
"err.companion_command_unsupported.message": "Le module de bots de cette version du serveur n’a pas cette commande. Mettez le serveur à jour ou redémarrez-le pour arrêter ce qui est en cours.", "err.companion_command_unsupported.message": "Le module de bots de ce serveur est plus ancien que ce Manager et ne connaît pas cette commande. Mettez à jour le module de bots dans la page « Modules » (ou le serveur), puis redémarrez le monde.",
// Despawn some // Despawn some
"comp.despawnSome": "Retirer {n} bots", "comp.despawnSome": "Retirer {n} bots",
@@ -647,51 +649,26 @@ const fr: Partial<Record<keyof typeof en, string>> = {
// Game client download and update // Game client download and update
"btn.close": "Fermer", "btn.close": "Fermer",
"btn.setupClient": "Configurer le client du jeu", "btn.setupClient": "Configurer le client du jeu",
"btn.updateClient": "METTRE À JOUR LE CLIENT",
"client.setup.title": "Configurer le client du jeu", "client.setup.title": "Configurer le client du jeu",
"client.setup.intro": "Pour jouer, il faut le client du jeu. Utilisez-en un existant ou laissez le Manager le télécharger.", "client.setup.intro": "Pour jouer, il faut le client du jeu. La communauté le distribue via son lanceur officiel.",
"client.setup.have": "J’ai déjà un client", "client.setup.have": "J’ai déjà un client",
"client.setup.download": "Télécharger le client", "client.setup.getLauncher": "Obtenir le lanceur (conquestofazerothcore.to)",
"client.setup.downloadHint": "Environ 43 Go", "client.setup.getLauncherHint": "Ouvre le site de la communauté dans votre navigateur. Téléchargez et installez-y le lanceur, connectez-vous avec votre compte et laissez-le télécharger le jeu (environ 43 Go).",
"client.dl.pickParent": "Choisissez où placer le client du jeu", "client.setup.haveHint": "Choisissez le dossier où le lanceur a installé le jeu, ou toute autre copie du client.",
"client.dl.confirmText": "Version {v}, {size}. Il sera enregistré dans ce dossier :", "client.setup.hdHint": "Les graphismes standard ou HD se choisissent dans le lanceur : ouvrez ses Paramètres et basculez « HD graphics ». Le Manager ne peut pas le modifier.",
"client.dl.free": "Espace libre sur ce disque : {free}.", "races.patch.active": "Patch client : actif",
"client.dl.notEnough": "Espace libre insuffisant : {need} nécessaires, {free} disponibles. Choisissez un autre disque.", "races.patch.disabled": "Patch client : désactivé (.disabled)",
"client.dl.otherFolder": "Autre dossier…", "races.patch.notInstalled": "Patch client : non installé",
"client.dl.start": "Télécharger", "races.patch.partial": "Patch client : {a}/{b} MPQ",
"races.patch.partialHint": "Des fichiers manquent ou ont changé. Réparez le patch client.",
"races.patch.install": "Installer le patch client",
"races.patch.repair": "Réparer le patch client",
"races.patch.uninstall": "Désinstaller le patch client",
"races.patch.willEnable": "Le patch sera activé après l'installation.",
"races.patch.willStayOff": "Le patch restera désactivé après l'installation : le module du serveur est désactivé ou absent.",
"client.dl.back": "Retour", "client.dl.back": "Retour",
"client.dl.retry": "Réessayer",
"client.dl.resume": "Continuer",
"client.dl.cancel": "Arrêter",
"client.dl.cancelled": "Arrêté. Tout ce qui est déjà téléchargé est conservé ; vous pouvez reprendre à tout moment.",
"client.dl.scanning": "Comparaison des fichiers…",
"client.dl.downloading": "Téléchargement",
"client.dl.progress": "{done} sur {total}",
"client.dl.speed": "{speed}/s",
"client.dl.done": "Le client du jeu est prêt", "client.dl.done": "Le client du jeu est prêt",
"client.dl.doneText": "Il est lié à ce serveur. Vous pouvez appuyer sur PLAY.", "client.dl.doneText": "Il est lié à ce serveur. Vous pouvez appuyer sur PLAY.",
"client.upd.title": "Mise à jour du client",
"client.upd.available": "Un client de jeu plus récent est disponible : {v}.",
"client.upd.summary": "{n} fichier(s) à télécharger, {size} au total.",
"client.upd.upToDate": "Votre client correspond déjà à la version {v}.",
"client.upd.modifiedTitle": "{n} fichier(s) modifié(s) par vous",
"client.upd.modifiedText": "Par exemple un exécutable modifié. Conservez-les ou remplacez-les par les versions officielles ; les vôtres sont alors sauvegardées dans le dossier .coa-manager du client. Les wrappers graphiques (d3d9.dll et similaires) et les fichiers de configuration restent toujours tels quels.",
"client.upd.keep": "Conserver les fichiers que j’ai modifiés",
"client.upd.more": "… et {n} de plus",
"client.upd.start": "Mettre à jour le client",
"client.upd.later": "Pas maintenant",
"client.upd.playAnyway": "Jouer sans mettre à jour",
"client.upd.done": "Le client du jeu est à jour",
"client.upd.doneText": "Le Manager vous préviendra quand une version plus récente sera publiée.",
"client.track.title": "Garder le client à jour",
"client.track.text": "Le Manager compare une fois votre client avec l’officiel, puis cherche les nouvelles versions comme pour le serveur. Les fichiers que vous avez modifiés ne sont remplacés que si vous le décidez.",
"client.track.start": "Garder à jour",
"client.track.startUpdate": "Mettre à jour et garder à jour",
"client.track.button": "Garder ce client à jour…",
"client.version": "Version du client",
"client.versionUntracked": "non suivi par le Manager",
"client.versionUnfinished": "téléchargement inachevé",
"client.downloadInstead": "Télécharger un client…",
// Accounts panel, password toggle, install size, addon explanation // Accounts panel, password toggle, install size, addon explanation
"pw.show": "Afficher le mot de passe", "pw.show": "Afficher le mot de passe",
@@ -782,6 +759,15 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"mysql.applied": "Options appliquées : {count}", "mysql.applied": "Options appliquées : {count}",
"sched.title": "Redémarrage planifié", "sched.title": "Redémarrage planifié",
"sched.enable": "Redémarrer le monde chaque jour", "sched.enable": "Redémarrer le monde chaque jour",
"sched.weeklyEnable": "Redémarrer le monde chaque semaine",
"sched.day": "Jour",
"sched.days.monday": "Lundi",
"sched.days.tuesday": "Mardi",
"sched.days.wednesday": "Mercredi",
"sched.days.thursday": "Jeudi",
"sched.days.friday": "Vendredi",
"sched.days.saturday": "Samedi",
"sched.days.sunday": "Dimanche",
"sched.time": "Heure", "sched.time": "Heure",
"sched.warning": "Avertissement (minutes)", "sched.warning": "Avertissement (minutes)",
"sched.hint": "Le monde redémarre à cette heure de cet ordinateur avec un compte à rebours dans le chat du jeu ; la base de données continue de tourner et les joueurs se reconnectent ensuite. Un serveur en marche suit la nouvelle heure en moins d'une minute.", "sched.hint": "Le monde redémarre à cette heure de cet ordinateur avec un compte à rebours dans le chat du jeu ; la base de données continue de tourner et les joueurs se reconnectent ensuite. Un serveur en marche suit la nouvelle heure en moins d'une minute.",
@@ -860,6 +846,11 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"mod.restart": "Les changements s’appliquent après le redémarrage du serveur de monde.", "mod.restart": "Les changements s’appliquent après le redémarrage du serveur de monde.",
"mod.switch": "Activer ou désactiver {name}", "mod.switch": "Activer ou désactiver {name}",
"mod.notHere": "Ne fait pas partie de ce serveur", "mod.notHere": "Ne fait pas partie de ce serveur",
"mod.update.available": "Une version plus récente est disponible : {from} → {to}.",
"mod.update.hint": "Rien ne se met à jour tout seul. Le serveur doit être arrêté ; les réglages du module sont conservés.",
"mod.update.do": "Mettre à jour",
"mod.update.working": "Mise à jour…",
"mod.update.done": "Module {id} mis à jour vers {commit}. Démarrez le serveur pour l’utiliser.",
"mod.github": "GitHub", "mod.github": "GitHub",
"mod.settings": "Réglages", "mod.settings": "Réglages",
"mod.default": "Revenir à la valeur par défaut ({v})", "mod.default": "Revenir à la valeur par défaut ({v})",
@@ -933,7 +924,6 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"dash.openBrowser": "Ouvrir dans le navigateur", "dash.openBrowser": "Ouvrir dans le navigateur",
"dash.update": "Mettre à jour le tableau de bord", "dash.update": "Mettre à jour le tableau de bord",
"upd.startAfter": "Démarrer le serveur après la mise à jour (sinon un serveur arrêté reste arrêté)", "upd.startAfter": "Démarrer le serveur après la mise à jour (sinon un serveur arrêté reste arrêté)",
"client.startAfter": "Lancer le jeu après la mise à jour du client",
"bk.folder": "Dossier des sauvegardes", "bk.folder": "Dossier des sauvegardes",
"bk.folderDefault": "par défaut", "bk.folderDefault": "par défaut",
"bk.folderNote": "Les nouvelles sauvegardes sont enregistrées ici, par exemple sur un autre disque. Les précédentes restent où elles sont et figurent toujours dans la liste. Le dossier doit se trouver hors du dossier du serveur.", "bk.folderNote": "Les nouvelles sauvegardes sont enregistrées ici, par exemple sur un autre disque. Les précédentes restent où elles sont et figurent toujours dans la liste. Le dossier doit se trouver hors du dossier du serveur.",
@@ -946,8 +936,6 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"remove.stopFirst": "Arrêtez d’abord le serveur.", "remove.stopFirst": "Arrêtez d’abord le serveur.",
"remove.confirm": "Retirer ce serveur du Manager ?\n\n{path}\n\nAucun fichier n’est supprimé.", "remove.confirm": "Retirer ce serveur du Manager ?\n\n{path}\n\nAucun fichier n’est supprimé.",
"upd.dbUnchecked": "La base de données n'a pas pu être vérifiée ; les modifications en attente sont donc inconnues : {why}", "upd.dbUnchecked": "La base de données n'a pas pu être vérifiée ; les modifications en attente sont donc inconnues : {why}",
"client.job.checking": "Vérification du client…",
"client.job.updating": "Mise à jour du client",
"fr.lan.address": "Adresse réseau", "fr.lan.address": "Adresse réseau",
"fr.lan.automatic": "Automatique", "fr.lan.automatic": "Automatique",
"fr.lan.default": "Par défaut", "fr.lan.default": "Par défaut",
@@ -1129,6 +1117,13 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"serverLogs.errors": "Erreurs uniquement", "serverLogs.errors": "Erreurs uniquement",
"serverLogs.off": "Désactivés", "serverLogs.off": "Désactivés",
"serverLogs.saved": "Enregistré. Redémarrez le serveur pour appliquer.", "serverLogs.saved": "Enregistré. Redémarrez le serveur pour appliquer.",
"serverLogs.autoClean": "Nettoyer automatiquement les journaux du serveur selon leur taille",
"serverLogs.maxSize": "Taille max.",
"serverLogs.autoCleanHint": "Supprime les anciens fichiers journaux quand Core/Logs dépasse cette taille (vérifié au démarrage du monde et périodiquement pendant son fonctionnement).",
"serverLogs.currentSize": "Taille actuelle des journaux : {size}",
"serverLogs.cleanNow": "Nettoyer les journaux ({size})",
"serverLogs.cleaned": "{freed} de journaux nettoyés.",
"serverLogs.skippedInUse": "{remaining} sont utilisés par le serveur en cours et n’ont pas pu être supprimés.",
"mod.requiresSquid": "Activez les bots SQUID pour utiliser Dungeon Clear.", "mod.requiresSquid": "Activez les bots SQUID pour utiliser Dungeon Clear.",
}; };
+41 -46
View File
@@ -48,7 +48,7 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"mod.switching": "Применяем изменения… Подождите.", "mod.switching": "Применяем изменения… Подождите.",
"portable.experimental": "Экспериментальная функция: портативные персонажи ещё в активной разработке. Возможны ошибки.", "portable.experimental": "Экспериментальная функция: портативные персонажи ещё в активной разработке. Возможны ошибки.",
"remote.clientReady": "Клиент готов. Сохраните адрес хоста и нажмите «Играть».", "remote.clientReady": "Клиент готов. Сохраните адрес хоста и нажмите «Играть».",
"remote.clientIntro": "Выберите существующий клиент игры или скачайте его здесь. Локальный сервер не требуется.", "remote.clientIntro": "Выберите готовый клиент игры или получите его через лаунчер сообщества. Локальный сервер не нужен.",
"welcome.host.title": "Хочу быть хостом", "welcome.host.title": "Хочу быть хостом",
"welcome.host.text": "Установить новый сервер или управлять существующим.", "welcome.host.text": "Установить новый сервер или управлять существующим.",
"welcome.connect.title": "Подключиться к другому серверу", "welcome.connect.title": "Подключиться к другому серверу",
@@ -69,6 +69,15 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"mysql.applied": "Применяется параметров: {count}", "mysql.applied": "Применяется параметров: {count}",
"sched.title": "Перезапуск по расписанию", "sched.title": "Перезапуск по расписанию",
"sched.enable": "Перезапускать мир каждый день", "sched.enable": "Перезапускать мир каждый день",
"sched.weeklyEnable": "Перезапускать мир каждую неделю",
"sched.day": "День",
"sched.days.monday": "Понедельник",
"sched.days.tuesday": "Вторник",
"sched.days.wednesday": "Среда",
"sched.days.thursday": "Четверг",
"sched.days.friday": "Пятница",
"sched.days.saturday": "Суббота",
"sched.days.sunday": "Воскресенье",
"sched.time": "Время", "sched.time": "Время",
"sched.warning": "Предупреждение (минуты)", "sched.warning": "Предупреждение (минуты)",
"sched.hint": "Мир перезапускается в это время этого компьютера, с обратным отсчётом в игровом чате; база данных продолжает работать, игроки заходят снова после перезапуска. Работающий сервер подхватывает новое время в течение минуты.", "sched.hint": "Мир перезапускается в это время этого компьютера, с обратным отсчётом в игровом чате; база данных продолжает работать, игроки заходят снова после перезапуска. Работающий сервер подхватывает новое время в течение минуты.",
@@ -201,7 +210,6 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"btn.stopSmall": "Остановить", "btn.stopSmall": "Остановить",
"btn.restart": "Перезапустить", "btn.restart": "Перезапустить",
"btn.startWithoutUpdate": "Запустить без обновления", "btn.startWithoutUpdate": "Запустить без обновления",
"btn.playWithoutUpdate": "Играть без обновления",
"import.squidRepackWarning": "Этот репак SquidBots проверяет хеш worldserver. Замена файла может нарушить работу Start_All_Bots и coa_update. Перед заменой менеджер запросит ваше решение.", "import.squidRepackWarning": "Этот репак SquidBots проверяет хеш worldserver. Замена файла может нарушить работу Start_All_Bots и coa_update. Перед заменой менеджер запросит ваше решение.",
"btn.play": "ИГРАТЬ", "btn.play": "ИГРАТЬ",
"btn.startPlay": "ЗАПУСТИТЬ И ИГРАТЬ", "btn.startPlay": "ЗАПУСТИТЬ И ИГРАТЬ",
@@ -358,6 +366,7 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"client.updateAddon": "Обновить аддон компаньонов", "client.updateAddon": "Обновить аддон компаньонов",
"client.addonNote": "Аддон компаньонов установлен. Другие аддоны не затронуты.", "client.addonNote": "Аддон компаньонов установлен. Другие аддоны не затронуты.",
"client.changeFolder": "Сменить папку…", "client.changeFolder": "Сменить папку…",
"client.getFromSite": "Скачать лаунчер…",
// Diagnostics // Diagnostics
"diag.title": "Диагностика", "diag.title": "Диагностика",
@@ -696,6 +705,8 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"comp.startCount": "Сколько входит", "comp.startCount": "Сколько входит",
"comp.startSave": "Сохранить", "comp.startSave": "Сохранить",
"comp.startSaved": "Сохранено. Вступит в силу при следующем запуске сервера.", "comp.startSaved": "Сохранено. Вступит в силу при следующем запуске сервера.",
"comp.startTopUp": "Сохранено. Создаётся ещё {n} компаньонов, чтобы их стало {max}; остальные уже есть.",
"comp.startTopUpConfirm": "Создать ещё {n} компаньонов, чтобы их стало {max}? Уже существующие заново не создаются.",
"comp.startHint": "Боты, которые не входят, остаются сохранёнными, их можно вывести в сеть позже.", "comp.startHint": "Боты, которые не входят, остаются сохранёнными, их можно вывести в сеть позже.",
"comp.startInvalid": "Введите целое число от 0 до 5000.", "comp.startInvalid": "Введите целое число от 0 до 5000.",
@@ -723,7 +734,7 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"comp.deleteConfirm": "Удалить всех компаньонов ({n}) навсегда? Сначала сохраняется точка восстановления. Ваши собственные персонажи не затрагиваются.", "comp.deleteConfirm": "Удалить всех компаньонов ({n}) навсегда? Сначала сохраняется точка восстановления. Ваши собственные персонажи не затрагиваются.",
"comp.deleteDone": "Все компаньоны удалены. Сначала была сохранена точка восстановления.", "comp.deleteDone": "Все компаньоны удалены. Сначала была сохранена точка восстановления.",
"err.companion_command_unsupported.title": "Эта версия сервера пока этого не умеет", "err.companion_command_unsupported.title": "Эта версия сервера пока этого не умеет",
"err.companion_command_unsupported.message": "В модуле ботов этой сборки сервера нет такой команды. Обновите сервер или перезапустите его, чтобы остановить текущую работу.", "err.companion_command_unsupported.message": "Модуль ботов на этом сервере старше Менеджера и не знает эту команду. Обновите модуль ботов на странице «Модули» (или обновите сервер) и перезапустите мир.",
// Despawn some // Despawn some
"comp.despawnSome": "Убрать ботов: {n}", "comp.despawnSome": "Убрать ботов: {n}",
@@ -744,51 +755,26 @@ const ru: Partial<Record<keyof typeof en, string>> = {
// Game client download and update // Game client download and update
"btn.close": "Закрыть", "btn.close": "Закрыть",
"btn.setupClient": "Настроить клиент игры", "btn.setupClient": "Настроить клиент игры",
"btn.updateClient": "ОБНОВИТЬ КЛИЕНТ",
"client.setup.title": "Настройка клиента игры", "client.setup.title": "Настройка клиента игры",
"client.setup.intro": "Чтобы играть, нужен клиент игры. Выберите уже имеющийся или позвольте менеджеру скачать его.", "client.setup.intro": "Чтобы играть, нужен клиент игры. Сообщество выдаёт его через свой официальный лаунчер.",
"client.setup.have": "У меня уже есть клиент", "client.setup.have": "У меня уже есть клиент",
"client.setup.download": "Скачать клиент", "client.setup.getLauncher": "Скачать лаунчер (conquestofazerothcore.to)",
"client.setup.downloadHint": "Примерно 43 ГБ", "client.setup.getLauncherHint": "Откроет сайт сообщества в браузере. Скачайте и установите лаунчер, войдите в свой аккаунт и дайте ему скачать игру (около 43 ГБ).",
"client.dl.pickParent": "Выберите, куда поместить клиент игры", "client.setup.haveHint": "Укажите папку, куда лаунчер установил игру, или любую другую копию клиента.",
"client.dl.confirmText": "Версия {v}, {size}. Клиент будет сохранён в эту папку:", "client.setup.hdHint": "Стандартная или HD-графика выбирается в лаунчере: откройте его «Настройки» и переключите «HD graphics». Менеджер этого изменить не может.",
"client.dl.free": "Свободно на этом диске: {free}.", "races.patch.active": "Патч клиента: Включен",
"client.dl.notEnough": "Недостаточно места: нужно {need}, доступно {free}. Выберите другой диск.", "races.patch.disabled": "Патч клиента: Отключен (.disabled)",
"client.dl.otherFolder": "Другая папка…", "races.patch.notInstalled": "Патч клиента: Не установлен",
"client.dl.start": "Скачать", "races.patch.partial": "Патч клиента: {a}/{b} MPQ",
"races.patch.partialHint": "Файлы отсутствуют или изменены. Восстановите патч клиента.",
"races.patch.install": "Установить патч клиента",
"races.patch.repair": "Восстановить патч клиента",
"races.patch.uninstall": "Удалить патч клиента",
"races.patch.willEnable": "После установки патч будет включён.",
"races.patch.willStayOff": "После установки патч останется отключённым: модуль сервера выключен или отсутствует.",
"client.dl.back": "Назад", "client.dl.back": "Назад",
"client.dl.retry": "Повторить",
"client.dl.resume": "Продолжить",
"client.dl.cancel": "Остановить",
"client.dl.cancelled": "Остановлено. Всё уже скачанное сохранено, можно продолжить в любой момент.",
"client.dl.scanning": "Сравниваю файлы…",
"client.dl.downloading": "Загрузка",
"client.dl.progress": "{done} из {total}",
"client.dl.speed": "{speed}/с",
"client.dl.done": "Клиент игры готов", "client.dl.done": "Клиент игры готов",
"client.dl.doneText": "Он привязан к этому серверу. Можно нажимать PLAY.", "client.dl.doneText": "Он привязан к этому серверу. Можно нажимать PLAY.",
"client.upd.title": "Обновление клиента",
"client.upd.available": "Доступна новая версия клиента игры: {v}.",
"client.upd.summary": "Файлов к загрузке: {n}, всего {size}.",
"client.upd.upToDate": "Ваш клиент уже соответствует версии {v}.",
"client.upd.modifiedTitle": "Файлов, изменённых вами: {n}",
"client.upd.modifiedText": "Например, изменённый exe. Оставьте их или замените официальными версиями; ваши тогда сохранятся в папке .coa-manager внутри клиента. Графические обёртки (d3d9.dll и подобные) и конфиги всегда остаются как есть.",
"client.upd.keep": "Оставить файлы, которые я менял",
"client.upd.more": "… и ещё {n}",
"client.upd.start": "Обновить клиент",
"client.upd.later": "Не сейчас",
"client.upd.playAnyway": "Играть без обновления",
"client.upd.done": "Клиент игры обновлён",
"client.upd.doneText": "Менеджер сообщит, когда выйдет новая версия.",
"client.track.title": "Обновление клиента через менеджер",
"client.track.text": "Менеджер один раз сравнит ваш клиент с официальным, а потом будет проверять новые версии, как для сервера. Файлы, которые вы меняли, не заменяются без вашего согласия.",
"client.track.start": "Следить за обновлениями",
"client.track.startUpdate": "Обновить и следить за обновлениями",
"client.track.button": "Обновлять этот клиент через менеджер…",
"client.version": "Версия клиента",
"client.versionUntracked": "менеджер не отслеживает",
"client.versionUnfinished": "загрузка не завершена",
"client.downloadInstead": "Скачать клиент…",
// Accounts panel, password toggle, install size, addon explanation // Accounts panel, password toggle, install size, addon explanation
"pw.show": "Показать пароль", "pw.show": "Показать пароль",
@@ -949,6 +935,11 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"mod.restart": "Изменения применятся после перезапуска игрового сервера.", "mod.restart": "Изменения применятся после перезапуска игрового сервера.",
"mod.switch": "Включить или выключить {name}", "mod.switch": "Включить или выключить {name}",
"mod.notHere": "Нет в этом сервере", "mod.notHere": "Нет в этом сервере",
"mod.update.available": "Доступна новая сборка: {from} → {to}.",
"mod.update.hint": "Сами модули не обновляются. Сервер должен быть остановлен; настройки модуля сохраняются.",
"mod.update.do": "Обновить",
"mod.update.working": "Обновление…",
"mod.update.done": "Модуль {id} обновлён до {commit}. Запустите сервер, чтобы он заработал.",
"mod.github": "GitHub", "mod.github": "GitHub",
"mod.settings": "Настройки", "mod.settings": "Настройки",
"mod.default": "Вернуть по умолчанию ({v})", "mod.default": "Вернуть по умолчанию ({v})",
@@ -1022,7 +1013,6 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"dash.openBrowser": "Открыть в браузере", "dash.openBrowser": "Открыть в браузере",
"dash.update": "Обновить панель", "dash.update": "Обновить панель",
"upd.startAfter": "Запускать сервер после обновления (иначе выключенный сервер останется выключенным)", "upd.startAfter": "Запускать сервер после обновления (иначе выключенный сервер останется выключенным)",
"client.startAfter": "Запускать игру после обновления клиента",
"bk.folder": "Папка резервных копий", "bk.folder": "Папка резервных копий",
"bk.folderDefault": "по умолчанию", "bk.folderDefault": "по умолчанию",
"bk.folderNote": "Новые копии сохраняются сюда, например на другой диск. Прежние копии остаются на месте и по-прежнему в списке. Папка должна быть вне папки сервера.", "bk.folderNote": "Новые копии сохраняются сюда, например на другой диск. Прежние копии остаются на месте и по-прежнему в списке. Папка должна быть вне папки сервера.",
@@ -1035,8 +1025,6 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"remove.stopFirst": "Сначала остановите сервер.", "remove.stopFirst": "Сначала остановите сервер.",
"remove.confirm": "Убрать этот сервер из Manager?\n\n{path}\n\nФайлы не удаляются.", "remove.confirm": "Убрать этот сервер из Manager?\n\n{path}\n\nФайлы не удаляются.",
"upd.dbUnchecked": "Не удалось проверить базу данных, поэтому неизвестно, нужны ли ей изменения: {why}", "upd.dbUnchecked": "Не удалось проверить базу данных, поэтому неизвестно, нужны ли ей изменения: {why}",
"client.job.checking": "Проверка клиента…",
"client.job.updating": "Обновление клиента",
"nav.characters": "Персонажи", "nav.characters": "Персонажи",
"q.characters": "Какие мои персонажи где могут играть?", "q.characters": "Какие мои персонажи где могут играть?",
"portable.title": "Персонажи", "portable.title": "Персонажи",
@@ -1382,6 +1370,13 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"serverLogs.errors": "Только ошибки", "serverLogs.errors": "Только ошибки",
"serverLogs.off": "Выключены", "serverLogs.off": "Выключены",
"serverLogs.saved": "Сохранено. Перезапустите сервер для применения.", "serverLogs.saved": "Сохранено. Перезапустите сервер для применения.",
"serverLogs.autoClean": "Автоочистка логов сервера по размеру",
"serverLogs.maxSize": "Макс. размер",
"serverLogs.autoCleanHint": "Очищает старые файлы логов при превышении порога в Core/Logs (проверяется при запуске мира и периодически во время работы).",
"serverLogs.currentSize": "Текущий размер логов: {size}",
"serverLogs.cleanNow": "Очистить логи ({size})",
"serverLogs.cleaned": "Очищено логов: {freed}.",
"serverLogs.skippedInUse": "{remaining} заняты работающим сервером и не были удалены.",
"mod.requiresSquid": "Для Dungeon Clear сначала включите SQUID bots.", "mod.requiresSquid": "Для Dungeon Clear сначала включите SQUID bots.",
}; };
+41 -46
View File
@@ -46,7 +46,7 @@ const zh = {
"mod.switching": "正在应用更改…请稍候。", "mod.switching": "正在应用更改…请稍候。",
"portable.experimental": "实验性功能:便携角色仍在积极开发中,可能存在错误。", "portable.experimental": "实验性功能:便携角色仍在积极开发中,可能存在错误。",
"remote.clientReady": "客户端已就绪。保存服主地址,然后点击开始游戏。", "remote.clientReady": "客户端已就绪。保存服主地址,然后点击开始游戏。",
"remote.clientIntro": "选择已有游戏客户端,或在此下载。无需安装本地服务器。", "remote.clientIntro": "选择已有的游戏客户端,或通过社区的启动器获取。无需本地服务器。",
"welcome.host.title": "我要搭建服务器", "welcome.host.title": "我要搭建服务器",
"welcome.host.text": "安装新服务器或管理已有服务器。", "welcome.host.text": "安装新服务器或管理已有服务器。",
"welcome.connect.title": "连接其他服务器", "welcome.connect.title": "连接其他服务器",
@@ -67,6 +67,15 @@ const zh = {
"mysql.applied": "生效的选项:{count}", "mysql.applied": "生效的选项:{count}",
"sched.title": "定时重启", "sched.title": "定时重启",
"sched.enable": "每天重启世界", "sched.enable": "每天重启世界",
"sched.weeklyEnable": "每周重启世界",
"sched.day": "星期",
"sched.days.monday": "星期一",
"sched.days.tuesday": "星期二",
"sched.days.wednesday": "星期三",
"sched.days.thursday": "星期四",
"sched.days.friday": "星期五",
"sched.days.saturday": "星期六",
"sched.days.sunday": "星期日",
"sched.time": "时间", "sched.time": "时间",
"sched.warning": "提前警告(分钟)", "sched.warning": "提前警告(分钟)",
"sched.hint": "世界会在本机的这个时间重启,并在游戏聊天中倒计时;数据库保持运行,玩家在重启后重新登录。正在运行的服务器会在一分钟内采用新时间。", "sched.hint": "世界会在本机的这个时间重启,并在游戏聊天中倒计时;数据库保持运行,玩家在重启后重新登录。正在运行的服务器会在一分钟内采用新时间。",
@@ -172,7 +181,6 @@ const zh = {
"btn.stopSmall": "停止", "btn.stopSmall": "停止",
"btn.restart": "重启", "btn.restart": "重启",
"btn.startWithoutUpdate": "不更新启动服务器", "btn.startWithoutUpdate": "不更新启动服务器",
"btn.playWithoutUpdate": "不更新开始游戏",
"import.squidRepackWarning": "此 SquidBots 整合包会检查 worldserver 哈希。替换程序可能导致 Start_All_Bots 和 coa_update 无法运行。更新前会要求您选择。", "import.squidRepackWarning": "此 SquidBots 整合包会检查 worldserver 哈希。替换程序可能导致 Start_All_Bots 和 coa_update 无法运行。更新前会要求您选择。",
"btn.play": "开始游戏", "btn.play": "开始游戏",
"btn.startPlay": "启动并开始游戏", "btn.startPlay": "启动并开始游戏",
@@ -315,6 +323,7 @@ const zh = {
"client.updateAddon": "更新随从插件", "client.updateAddon": "更新随从插件",
"client.addonNote": "随从插件已安装。其他插件未受任何影响。", "client.addonNote": "随从插件已安装。其他插件未受任何影响。",
"client.changeFolder": "更换文件夹…", "client.changeFolder": "更换文件夹…",
"client.getFromSite": "获取启动器…",
// Diagnostics // Diagnostics
"diag.title": "诊断", "diag.title": "诊断",
@@ -652,6 +661,8 @@ const zh = {
"comp.startCount": "自动登录随从数量", "comp.startCount": "自动登录随从数量",
"comp.startSave": "保存", "comp.startSave": "保存",
"comp.startSaved": "已保存。将在下次服务器启动时生效。", "comp.startSaved": "已保存。将在下次服务器启动时生效。",
"comp.startTopUp": "已保存。正在再创建 {n} 个同伴,使总数达到 {max};其余已存在。",
"comp.startTopUpConfirm": "再创建 {n} 个同伴,使总数达到 {max}?已存在的不会重复创建。",
"comp.startHint": "未登录的随从仍保留在数据库中,随时可在需要时手动调出上线。", "comp.startHint": "未登录的随从仍保留在数据库中,随时可在需要时手动调出上线。",
"comp.startInvalid": "请输入 0 到 5000 之间的整数。", "comp.startInvalid": "请输入 0 到 5000 之间的整数。",
@@ -679,7 +690,7 @@ const zh = {
"comp.deleteConfirm": "是否彻底删除所有 {n} 名随从?系统会先自动保存恢复点。你自己的玩家角色绝不会受影响。", "comp.deleteConfirm": "是否彻底删除所有 {n} 名随从?系统会先自动保存恢复点。你自己的玩家角色绝不会受影响。",
"comp.deleteDone": "所有随从已成功删除。操作前已保存安全恢复点。", "comp.deleteDone": "所有随从已成功删除。操作前已保存安全恢复点。",
"err.companion_command_unsupported.title": "当前服务器核心版本不支持该命令", "err.companion_command_unsupported.title": "当前服务器核心版本不支持该命令",
"err.companion_command_unsupported.message": "当前构建版本的随从模块缺少该指令。请更新服务器,或通过重启服务器来中止当前任务。", "err.companion_command_unsupported.message": "此服务器上的随从模块比当前管理器版本旧,不认识该指令。请在“模块”页面更新随从模块(或更新服务器),然后重启世界服务器。",
// Despawn some // Despawn some
"comp.despawnSome": "减少 {n} 名随从", "comp.despawnSome": "减少 {n} 名随从",
@@ -700,51 +711,26 @@ const zh = {
// Game client download and update // Game client download and update
"btn.close": "关闭", "btn.close": "关闭",
"btn.setupClient": "配置游戏客户端", "btn.setupClient": "配置游戏客户端",
"btn.updateClient": "更新客户端",
"client.setup.title": "配置游戏客户端", "client.setup.title": "配置游戏客户端",
"client.setup.intro": "进行游戏需要安装匹配的客户端。你可以关联已有的游戏客户端,也可以让管理器为你自动下载。", "client.setup.intro": "进行游戏需要安装客户端。社区通过其官方启动器提供客户端。",
"client.setup.have": "已有游戏客户端", "client.setup.have": "已有游戏客户端",
"client.setup.download": "下载全新客户端", "client.setup.getLauncher": "获取启动器(conquestofazerothcore.to)",
"client.setup.downloadHint": "约 43 GB", "client.setup.getLauncherHint": "在浏览器中打开社区网站。在那里下载并安装启动器,用你的账号登录,让它下载游戏(约 43 GB)。",
"client.dl.pickParent": "选择游戏客户端存放位置", "client.setup.haveHint": "选择启动器安装游戏的文件夹,或任何其他客户端副本。",
"client.dl.confirmText": "版本 {v},体积 {size}。将被保存在以下文件夹中:", "client.setup.hdHint": "标准或高清画质在启动器中选择:打开启动器的“设置”,切换“HD graphics”。Manager 无法更改。",
"client.dl.free": "该驱动器剩余空间:{free}。", "races.patch.active": "客户端补丁:已启用",
"client.dl.notEnough": "磁盘剩余空间不足:需要 {need},可用 {free}。请选择其他驱动器。", "races.patch.disabled": "客户端补丁:已停用 (.disabled)",
"client.dl.otherFolder": "选择其他文件夹…", "races.patch.notInstalled": "客户端补丁:未安装",
"client.dl.start": "开始下载", "races.patch.partial": "客户端补丁:{a}/{b} MPQ",
"races.patch.partialHint": "文件缺失或已被修改。请修复客户端补丁。",
"races.patch.install": "安装客户端补丁",
"races.patch.repair": "修复客户端补丁",
"races.patch.uninstall": "卸载客户端补丁",
"races.patch.willEnable": "安装后补丁将被启用。",
"races.patch.willStayOff": "安装后补丁仍将保持停用:服务器模块已关闭或不存在。",
"client.dl.back": "返回", "client.dl.back": "返回",
"client.dl.retry": "重试",
"client.dl.resume": "继续下载",
"client.dl.cancel": "停止",
"client.dl.cancelled": "下载已暂停。已下载的文件将被保留;随时可继续断点续传。",
"client.dl.scanning": "正在比对文件…",
"client.dl.downloading": "正在下载",
"client.dl.progress": "{done} / {total}",
"client.dl.speed": "{speed}/秒",
"client.dl.done": "游戏客户端已就绪", "client.dl.done": "游戏客户端已就绪",
"client.dl.doneText": "已成功关联至此服务器。你可以点击“开始游戏”了。", "client.dl.doneText": "已成功关联至此服务器。你可以点击“开始游戏”了。",
"client.upd.title": "客户端更新",
"client.upd.available": "检测到更新的游戏客户端版本:{v}。",
"client.upd.summary": "需下载 {n} 个文件,共计 {size}。",
"client.upd.upToDate": "你的客户端已与版本 {v} 完全一致。",
"client.upd.modifiedTitle": "检测到 {n} 个文件曾被你修改",
"client.upd.modifiedText": "例如打过补丁的可执行程序。你可以选择保留它们,或替换为官方版本;被替换的文件将保存在客户端的 .coa-manager 文件夹中以作备份。图形渲染增强补丁(如 d3d9.dll 等)及配置文件始终会保留原样。",
"client.upd.keep": "保留我修改过的文件",
"client.upd.more": "… 以及另外 {n} 个",
"client.upd.start": "更新客户端",
"client.upd.later": "暂不更新",
"client.upd.playAnyway": "跳过更新直接进入游戏",
"client.upd.done": "游戏客户端已是最新版本",
"client.upd.doneText": "当发布更高版本时,管理器会及时提醒你。",
"client.track.title": "保持客户端为最新版本",
"client.track.text": "管理器会先比对你的客户端与官方版本,并在后续像检查服务器更新一样检测新版本。除非你明确选择,否则你修改过的文件绝不会被自动替换。",
"client.track.start": "保持更新",
"client.track.startUpdate": "更新并保持同步",
"client.track.button": "为该客户端开启自动检查更新…",
"client.version": "客户端版本",
"client.versionUntracked": "未由管理器追踪",
"client.versionUnfinished": "下载尚未完成",
"client.downloadInstead": "下载全新客户端…",
// Accounts panel, password toggle, install size, addon explanation // Accounts panel, password toggle, install size, addon explanation
"pw.show": "显示密码", "pw.show": "显示密码",
@@ -860,6 +846,11 @@ const zh = {
"mod.restart": "更改将在世界服务器重启后生效。", "mod.restart": "更改将在世界服务器重启后生效。",
"mod.switch": "开启或关闭 {name}", "mod.switch": "开启或关闭 {name}",
"mod.notHere": "未包含在当前服务器中", "mod.notHere": "未包含在当前服务器中",
"mod.update.available": "有更新的版本:{from} → {to}。",
"mod.update.hint": "模块不会自动更新。需先停止服务器;模块设置会保留。",
"mod.update.do": "更新",
"mod.update.working": "正在更新…",
"mod.update.done": "模块 {id} 已更新到 {commit}。启动服务器后生效。",
"mod.github": "GitHub 页面", "mod.github": "GitHub 页面",
"mod.settings": "模块设置", "mod.settings": "模块设置",
"mod.default": "恢复为默认值 ({v})", "mod.default": "恢复为默认值 ({v})",
@@ -933,7 +924,6 @@ const zh = {
"dash.openBrowser": "在浏览器中打开", "dash.openBrowser": "在浏览器中打开",
"dash.update": "更新仪表盘", "dash.update": "更新仪表盘",
"upd.startAfter": "更新后启动服务器(否则已停止的服务器保持停止)", "upd.startAfter": "更新后启动服务器(否则已停止的服务器保持停止)",
"client.startAfter": "更新客户端后启动游戏",
"bk.folder": "备份文件夹", "bk.folder": "备份文件夹",
"bk.folderDefault": "默认", "bk.folderDefault": "默认",
"bk.folderNote": "新备份将保存在这里,例如另一个驱动器上。之前的备份保留在原处,仍会列出。该文件夹必须位于服务器文件夹之外。", "bk.folderNote": "新备份将保存在这里,例如另一个驱动器上。之前的备份保留在原处,仍会列出。该文件夹必须位于服务器文件夹之外。",
@@ -946,8 +936,6 @@ const zh = {
"remove.stopFirst": "请先停止服务器。", "remove.stopFirst": "请先停止服务器。",
"remove.confirm": "要从 Manager 中移除此服务器吗?\n\n{path}\n\n不会删除任何文件。", "remove.confirm": "要从 Manager 中移除此服务器吗?\n\n{path}\n\n不会删除任何文件。",
"upd.dbUnchecked": "无法检查数据库,因此不清楚是否有待应用的数据库更改:{why}", "upd.dbUnchecked": "无法检查数据库,因此不清楚是否有待应用的数据库更改:{why}",
"client.job.checking": "正在检查游戏客户端…",
"client.job.updating": "正在更新游戏客户端",
"err.docker_unavailable.title": "Docker 不可用", "err.docker_unavailable.title": "Docker 不可用",
"err.docker_unavailable.message": "此服务器通过 Docker 运行。请安装并启动 Docker,确保当前用户有权使用它,然后重试。", "err.docker_unavailable.message": "此服务器通过 Docker 运行。请安装并启动 Docker,确保当前用户有权使用它,然后重试。",
"fr.lan.address": "网络地址", "fr.lan.address": "网络地址",
@@ -1131,6 +1119,13 @@ const zh = {
"serverLogs.errors": "仅错误", "serverLogs.errors": "仅错误",
"serverLogs.off": "关闭", "serverLogs.off": "关闭",
"serverLogs.saved": "已保存。重启服务器后生效。", "serverLogs.saved": "已保存。重启服务器后生效。",
"serverLogs.autoClean": "按大小自动清理服务器日志",
"serverLogs.maxSize": "最大大小",
"serverLogs.autoCleanHint": "当 Core/Logs 超过此大小时清理旧日志文件(在世界启动时和运行期间定期检查)。",
"serverLogs.currentSize": "当前日志大小:{size}",
"serverLogs.cleanNow": "清理日志({size})",
"serverLogs.cleaned": "已清理 {freed} 日志。",
"serverLogs.skippedInUse": "{remaining} 正被运行中的服务器占用,无法删除。",
"mod.requiresSquid": "请先启用 SQUID 机器人,再使用 Dungeon Clear。", "mod.requiresSquid": "请先启用 SQUID 机器人,再使用 Dungeon Clear。",
} as const; } as const;
-10
View File
@@ -149,16 +149,6 @@
"t": "Suchradius für Ziele", "t": "Suchradius für Ziele",
"d": "Wie weit ein Bot innerhalb eines Zielgebiets nach Questzielen sucht." "d": "Wie weit ein Bot innerhalb eines Zielgebiets nach Questzielen sucht."
}, },
"CoaBots.Scaling.Enable": {"t": "Stärkehilfe für Bots in Dungeons und Schlachtzügen", "d": "Hauptschalter für die Multiplikatoren unten. Bis du sie erhöhst, sind alle 1 (keine Änderung)."},
"CoaBots.Scaling.Dungeons": {"t": "Hilfe in 5-Spieler-Dungeons", "d": "Multiplikatoren anwenden, solange ein Bot in einem 5-Spieler-Dungeon ist."},
"CoaBots.Scaling.Raids": {"t": "Hilfe in Schlachtzügen", "d": "Multiplikatoren anwenden, solange ein Bot in einem Schlachtzug ist."},
"CoaBots.Scaling.Battlegrounds": {"t": "Hilfe in Schlachtfeldern und Arenen", "d": "Multiplikatoren in Schlachtfeldern und Arenen anwenden."},
"CoaBots.Scaling.World": {"t": "Hilfe in der offenen Welt", "d": "Multiplikatoren außerhalb von Dungeons und Schlachtzügen anwenden. Meist nicht gewünscht."},
"CoaBots.Scaling.DamageDone": {"t": "Schaden der Bots", "d": "Multipliziert den Schaden, den Bots und ihre Begleiter Kreaturen zufügen. 1 heißt keine Änderung; höher macht Inhalte leichter."},
"CoaBots.Scaling.HealingDone": {"t": "Heilung der Bots", "d": "Multipliziert die Heilung, die Bots wirken. 1 heißt keine Änderung."},
"CoaBots.Scaling.DamageTaken": {"t": "Schaden an Bots", "d": "Multipliziert den Schaden, den Kreaturen Bots zufügen. Unter 1 erleiden Bots weniger; 1 heißt keine Änderung."},
"CoaBots.Scaling.TankThreat": {"t": "Bedrohung der Tanks", "d": "Zusätzliche Bedrohung durch Bot-Tanks, damit sie die Aufmerksamkeit der Gegner halten. 1 heißt keine Änderung."},
"CoaBots.Scaling.BossTuning": {"t": "Zusatzhilfe gegen vier Bosse", "d": "Fügt stärkere Multiplikatoren für Loken, den Drakkari-Elementar, den Drakkari-Koloss und Gal'darah hinzu, die Bots der Stufe 60 sonst nicht besiegten. Zum Testen; standardmäßig aus."},
"CoaBots.WorldBrain.EngageRange": { "CoaBots.WorldBrain.EngageRange": {
"t": "Angriffsentfernung", "t": "Angriffsentfernung",
"d": "Entfernung, ab der ein Bot einen Quest-Gegner bekämpft." "d": "Entfernung, ab der ein Bot einen Quest-Gegner bekämpft."
-10
View File
@@ -149,16 +149,6 @@
"t": "Radio de búsqueda de objetivos", "t": "Radio de búsqueda de objetivos",
"d": "Hasta dónde examina un bot en busca de objetivos de misión dentro de una zona de objetivo." "d": "Hasta dónde examina un bot en busca de objetivos de misión dentro de una zona de objetivo."
}, },
"CoaBots.Scaling.Enable": {"t": "Ayuda de fuerza para bots en mazmorras y bandas", "d": "Interruptor general de los multiplicadores de abajo. Hasta que los subas, todos valen 1 (sin cambios)."},
"CoaBots.Scaling.Dungeons": {"t": "Ayuda en mazmorras de 5 jugadores", "d": "Aplica los multiplicadores mientras un bot está en una mazmorra de 5 jugadores."},
"CoaBots.Scaling.Raids": {"t": "Ayuda en bandas", "d": "Aplica los multiplicadores mientras un bot está en una banda."},
"CoaBots.Scaling.Battlegrounds": {"t": "Ayuda en campos de batalla y arenas", "d": "Aplica los multiplicadores en campos de batalla y arenas."},
"CoaBots.Scaling.World": {"t": "Ayuda en el mundo abierto", "d": "Aplica los multiplicadores fuera de mazmorras y bandas. Normalmente no se desea."},
"CoaBots.Scaling.DamageDone": {"t": "Daño de los bots", "d": "Multiplica el daño que los bots y sus mascotas infligen a las criaturas. 1 no cambia nada; más alto facilita el contenido."},
"CoaBots.Scaling.HealingDone": {"t": "Curación de los bots", "d": "Multiplica la curación que lanzan los bots. 1 no cambia nada."},
"CoaBots.Scaling.DamageTaken": {"t": "Daño recibido por los bots", "d": "Multiplica el daño que las criaturas infligen a los bots. Por debajo de 1 los bots reciben menos; 1 no cambia nada."},
"CoaBots.Scaling.TankThreat": {"t": "Amenaza de los tanques", "d": "Amenaza extra que generan los tanques bot para mantener la atención de los enemigos. 1 no cambia nada."},
"CoaBots.Scaling.BossTuning": {"t": "Ayuda extra contra cuatro jefes", "d": "Añade multiplicadores más fuertes para Loken, el elemental drakkari, el coloso drakkari y Gal'darah, a quienes los bots de nivel 60 no vencían de otro modo. Para pruebas; desactivado por defecto."},
"CoaBots.WorldBrain.EngageRange": { "CoaBots.WorldBrain.EngageRange": {
"t": "Distancia de enfrentamiento", "t": "Distancia de enfrentamiento",
"d": "Distancia a la que un bot empieza a combatir a un monstruo de misión." "d": "Distancia a la que un bot empieza a combatir a un monstruo de misión."
-10
View File
@@ -149,16 +149,6 @@
"t": "Rayon de recherche des cibles", "t": "Rayon de recherche des cibles",
"d": "Jusqu’où un bot cherche des cibles de quête dans une zone d’objectif." "d": "Jusqu’où un bot cherche des cibles de quête dans une zone d’objectif."
}, },
"CoaBots.Scaling.Enable": {"t": "Aide de puissance pour les bots en donjon et en raid", "d": "Interrupteur général des multiplicateurs ci-dessous. Tant que vous ne les augmentez pas, ils valent tous 1 (aucun changement)."},
"CoaBots.Scaling.Dungeons": {"t": "Aide en donjon à 5 joueurs", "d": "Applique les multiplicateurs tant qu'un bot est dans un donjon à 5 joueurs."},
"CoaBots.Scaling.Raids": {"t": "Aide en raid", "d": "Applique les multiplicateurs tant qu'un bot est dans un raid."},
"CoaBots.Scaling.Battlegrounds": {"t": "Aide en champ de bataille et en arène", "d": "Applique les multiplicateurs en champ de bataille et en arène."},
"CoaBots.Scaling.World": {"t": "Aide en monde ouvert", "d": "Applique les multiplicateurs hors des donjons et des raids. Rarement souhaité."},
"CoaBots.Scaling.DamageDone": {"t": "Dégâts des bots", "d": "Multiplie les dégâts que les bots et leurs familiers infligent aux créatures. 1 : aucun changement ; plus élevé = contenu plus facile."},
"CoaBots.Scaling.HealingDone": {"t": "Soins des bots", "d": "Multiplie les soins lancés par les bots. 1 : aucun changement."},
"CoaBots.Scaling.DamageTaken": {"t": "Dégâts subis par les bots", "d": "Multiplie les dégâts que les créatures infligent aux bots. Sous 1, les bots en subissent moins ; 1 : aucun changement."},
"CoaBots.Scaling.TankThreat": {"t": "Menace des tanks", "d": "Menace supplémentaire générée par les tanks bots, pour qu'ils gardent l'attention des ennemis. 1 : aucun changement."},
"CoaBots.Scaling.BossTuning": {"t": "Aide supplémentaire contre quatre boss", "d": "Ajoute des multiplicateurs plus forts pour Loken, l'élémentaire drakkari, le colosse drakkari et Gal'darah, que les bots de niveau 60 ne battaient pas autrement. Pour les tests ; désactivé par défaut."},
"CoaBots.WorldBrain.EngageRange": { "CoaBots.WorldBrain.EngageRange": {
"t": "Distance d’engagement", "t": "Distance d’engagement",
"d": "Distance à laquelle un bot commence à combattre un monstre de quête." "d": "Distance à laquelle un bot commence à combattre un monstre de quête."
-10
View File
@@ -149,16 +149,6 @@
"t": "Радиус поиска целей", "t": "Радиус поиска целей",
"d": "Как далеко бот высматривает цели заданий внутри области задачи." "d": "Как далеко бот высматривает цели заданий внутри области задачи."
}, },
"CoaBots.Scaling.Enable": {"t": "Помощь ботам в подземельях и рейдах", "d": "Главный выключатель множителей ниже. Пока вы их не повысите, все равны 1 (без изменений)."},
"CoaBots.Scaling.Dungeons": {"t": "Помощь в подземельях на 5 человек", "d": "Применять множители, пока бот находится в подземелье на 5 человек."},
"CoaBots.Scaling.Raids": {"t": "Помощь в рейдах", "d": "Применять множители, пока бот находится в рейде."},
"CoaBots.Scaling.Battlegrounds": {"t": "Помощь на полях боя и аренах", "d": "Применять множители на полях боя и аренах."},
"CoaBots.Scaling.World": {"t": "Помощь в открытом мире", "d": "Применять множители вне подземелий и рейдов. Обычно не нужно."},
"CoaBots.Scaling.DamageDone": {"t": "Урон ботов", "d": "Умножает урон, который наносят существам боты и их питомцы. 1 — без изменений, больше — проще."},
"CoaBots.Scaling.HealingDone": {"t": "Лечение ботов", "d": "Умножает лечение, которое накладывают боты. 1 — без изменений."},
"CoaBots.Scaling.DamageTaken": {"t": "Урон по ботам", "d": "Умножает урон, который существа наносят ботам. Меньше 1 — боты получают меньше урона, 1 — без изменений."},
"CoaBots.Scaling.TankThreat": {"t": "Угроза танков", "d": "Дополнительная угроза от ботов-танков, чтобы они удерживали внимание врагов. 1 — без изменений."},
"CoaBots.Scaling.BossTuning": {"t": "Дополнительная помощь против четырёх боссов", "d": "Добавляет усиленные множители для Локена, элементаля Драккари, колосса Драккари и Гал'дараха, которых боты 60 уровня иначе не побеждали. Для тестов; по умолчанию выключено."},
"CoaBots.WorldBrain.EngageRange": { "CoaBots.WorldBrain.EngageRange": {
"t": "Дистанция начала боя", "t": "Дистанция начала боя",
"d": "Расстояние, на котором бот начинает бой с монстром из задания." "d": "Расстояние, на котором бот начинает бой с монстром из задания."
-10
View File
@@ -169,16 +169,6 @@
"t": "任务目标搜索半径", "t": "任务目标搜索半径",
"d": "机器人在目标区域内寻找任务怪或任务道具的扫描范围。" "d": "机器人在目标区域内寻找任务怪或任务道具的扫描范围。"
}, },
"CoaBots.Scaling.Enable": {"t": "机器人在地下城和团队副本中的强度辅助", "d": "下方倍率的总开关。在你调高之前,所有倍率均为1(无变化)。"},
"CoaBots.Scaling.Dungeons": {"t": "5人地下城辅助", "d": "机器人处于5人地下城时应用倍率。"},
"CoaBots.Scaling.Raids": {"t": "团队副本辅助", "d": "机器人处于团队副本时应用倍率。"},
"CoaBots.Scaling.Battlegrounds": {"t": "战场与竞技场辅助", "d": "在战场和竞技场中应用倍率。"},
"CoaBots.Scaling.World": {"t": "野外辅助", "d": "在地下城和团队副本之外应用倍率。通常不需要。"},
"CoaBots.Scaling.DamageDone": {"t": "机器人伤害", "d": "倍乘机器人及其宠物对生物造成的伤害。1表示无变化;越高内容越容易。"},
"CoaBots.Scaling.HealingDone": {"t": "机器人治疗", "d": "倍乘机器人施放的治疗量。1表示无变化。"},
"CoaBots.Scaling.DamageTaken": {"t": "机器人受到的伤害", "d": "倍乘生物对机器人造成的伤害。低于1时机器人受到的伤害更少;1表示无变化。"},
"CoaBots.Scaling.TankThreat": {"t": "坦克仇恨", "d": "机器人坦克额外产生的仇恨,使其更容易吸引敌人注意。1表示无变化。"},
"CoaBots.Scaling.BossTuning": {"t": "针对四个首领的额外辅助", "d": "为洛肯、达卡莱元素、达卡莱巨像和加尔达拉添加更强的倍率,60级机器人否则无法击败他们。用于测试;默认关闭。"},
"CoaBots.WorldBrain.EngageRange": { "CoaBots.WorldBrain.EngageRange": {
"t": "开战交战距离", "t": "开战交战距离",
"d": "机器人发现任务目标怪并开始主动进入战斗的距离。" "d": "机器人发现任务目标怪并开始主动进入战斗的距离。"
+58 -41
View File
@@ -66,8 +66,20 @@ export interface StatusView {
export type RealmMode = "coa" | "wildcard" | "reborn"; export type RealmMode = "coa" | "wildcard" | "reborn";
export interface CustomRaceCharacters { players: number; companionBots: number; squidBots: number } export interface CustomRaceCharacters { players: number; companionBots: number; squidBots: number }
export interface AddonView { id: string; name: string; description: Record<string, string>; author: string; license: string; needs: string | null; repo: string; size: number; installed: boolean; updateAvailable: boolean; foreignFolders: string[]; bundled?: string | null } export interface AddonView { id: string; name: string; description: Record<string, string>; author: string; license: string; needs: string | null; repo: string; size: number; installed: boolean; updateAvailable: boolean; foreignFolders: string[]; bundled?: string | null }
export interface RestartSchedule { enabled: boolean; time: string; warningMinutes: number } export type Weekday = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
export interface RestartSchedule {
enabled: boolean;
time: string;
warningMinutes: number;
weeklyEnabled: boolean;
weeklyDay: Weekday;
weeklyTime: string;
weeklyWarningMinutes: number;
}
export interface RestartScheduleView { schedule: RestartSchedule; supported: boolean } export interface RestartScheduleView { schedule: RestartSchedule; supported: boolean }
export interface LogSettings { autoCleanup: boolean; maxSizeMb: number }
export interface CleanLogsReport { freedBytes: number; remainingBytes: number; deletedFiles: number; skippedFiles: number }
export interface ServerLoggingView { preset: "normal" | "errors" | "off" | null; logBytes: number; settings: LogSettings }
export interface CustomMysql { text: string; applied: string } export interface CustomMysql { text: string; applied: string }
export interface RealmName { id: number; name: string; defaultName: string; custom: boolean } export interface RealmName { id: number; name: string; defaultName: string; custom: boolean }
export interface RealmProfiles { active: RealmMode; wildcard_created: boolean; reborn_created: boolean; reborn_supported: boolean; supported: boolean; recovery_pending: boolean; simultaneous: boolean; secondary_world_port: number | null; secondary_running: boolean; with_reborn: boolean; reborn_world_port: number | null; reborn_running: boolean } export interface RealmProfiles { active: RealmMode; wildcard_created: boolean; reborn_created: boolean; reborn_supported: boolean; supported: boolean; recovery_pending: boolean; simultaneous: boolean; secondary_world_port: number | null; secondary_running: boolean; with_reborn: boolean; reborn_world_port: number | null; reborn_running: boolean }
@@ -248,6 +260,8 @@ export interface ModuleView {
component_type?: ComponentType; component_type?: ComponentType;
can_remove?: boolean; can_remove?: boolean;
source_commit?: string | null; source_commit?: string | null;
/** a newer build of the module is recommended by the server's core; the owner chooses when to update */
available_commit?: string | null;
part_of?: string | null; part_of?: string | null;
} }
@@ -580,6 +594,16 @@ export interface CompanionSizes {
sizes: { id: string; title: string; bots: number; warning: string | null }[]; sizes: { id: string; title: string; bots: number; warning: string | null }[];
} }
export interface WildcardArchetypeDto {
id: string;
name: string;
roles: number;
primary_stat: number;
author: string;
difficulty: number;
category: number;
}
export interface ClientInfo { export interface ClientInfo {
path: string; path: string;
executable: string; executable: string;
@@ -589,36 +613,8 @@ export interface ClientInfo {
} }
export interface ClientStatus { export interface ClientStatus {
/** A usable client folder is linked. */
linked: boolean; linked: boolean;
managed: boolean;
installed_version: string | null;
latest_version: string | null;
latest_bytes: number | null;
update_available: boolean;
}
export interface ClientPlan {
version: string;
items: { path: string; size: number; kind: "missing" | "changed" | "modified" }[];
download_bytes: number;
total_files: number;
up_to_date_files: number;
kept_files: number;
}
export interface ClientStep {
phase: "scan" | "download" | "finish";
done: number;
total: number;
bytes_per_sec: number;
file: string | null;
}
export interface ClientDownloadCheck {
needed_bytes: number;
free_bytes: number;
version: string;
dest: string;
} }
export type ClientPatchState = "not-installed" | "enabled" | "disabled" | "partially-installed"; export type ClientPatchState = "not-installed" | "enabled" | "disabled" | "partially-installed";
@@ -764,7 +760,10 @@ export const api = {
forceStop: (id: string) => invoke<DriverOutcome>("force_stop_server", { id }), forceStop: (id: string) => invoke<DriverOutcome>("force_stop_server", { id }),
stop: (id: string) => invoke<DriverOutcome>("stop_server", { id }), stop: (id: string) => invoke<DriverOutcome>("stop_server", { id }),
settings: (id: string, scope: Scope) => invoke<SettingsView>("get_settings", { id, scope }), settings: (id: string, scope: Scope) => invoke<SettingsView>("get_settings", { id, scope }),
serverLoggingState: (id: string) => invoke<ServerLoggingView>("server_logging_state", { id }),
serverLoggingPreset: (id: string, preset: "normal" | "errors" | "off") => invoke<void>("server_logging_preset", { id, preset }), serverLoggingPreset: (id: string, preset: "normal" | "errors" | "off") => invoke<void>("server_logging_preset", { id, preset }),
serverLoggingSettingsSave: (id: string, settings: LogSettings) => invoke<ServerLoggingView>("server_logging_settings_save", { id, settings }),
serverLogsClean: (id: string) => invoke<CleanLogsReport>("server_logs_clean", { id }),
save: (id: string, scope: Scope, changes: Record<string, JsonValue>) => invoke<SaveReport>("save_settings", { id, scope, changes }), save: (id: string, scope: Scope, changes: Record<string, JsonValue>) => invoke<SaveReport>("save_settings", { id, scope, changes }),
presets: (scope: Scope) => invoke<PresetInfo[]>("list_presets", { scope }), presets: (scope: Scope) => invoke<PresetInfo[]>("list_presets", { scope }),
backups: (id: string) => invoke<RecoveryPoint[]>("list_backups", { id }), backups: (id: string) => invoke<RecoveryPoint[]>("list_backups", { id }),
@@ -797,6 +796,7 @@ export const api = {
analyzeGithubModule: (url: string, realmId: string) => analyzeGithubModule: (url: string, realmId: string) =>
invoke<CompatibilityReport>("analyze_github_module", { url, realmId }), invoke<CompatibilityReport>("analyze_github_module", { url, realmId }),
moduleSetEnabled: (id: string, module: string, enabled: boolean) => invoke<void>("module_set_enabled", { id, module, enabled }), moduleSetEnabled: (id: string, module: string, enabled: boolean) => invoke<void>("module_set_enabled", { id, module, enabled }),
moduleUpdate: (id: string, module: string) => invoke<string>("module_update", { id, module }),
pluginsRepair: (id: string) => invoke<string[]>("plugins_repair", { id }), pluginsRepair: (id: string) => invoke<string[]>("plugins_repair", { id }),
moduleSettings: (id: string, module: string) => invoke<ModuleSetting[]>("module_settings", { id, module }), moduleSettings: (id: string, module: string) => invoke<ModuleSetting[]>("module_settings", { id, module }),
moduleSaveSettings: (id: string, module: string, changes: Record<string, string>) => invoke<string[]>("module_save_settings", { id, module, changes }), moduleSaveSettings: (id: string, module: string, changes: Record<string, string>) => invoke<string[]>("module_save_settings", { id, module, changes }),
@@ -829,15 +829,37 @@ export const api = {
invoke<{ txn: UpdateTxn; preexisting_character_count?: number; modules?: ModuleRebuild[] }>("apply_update", { id, source: source ?? null, resolutions }), invoke<{ txn: UpdateTxn; preexisting_character_count?: number; modules?: ModuleRebuild[] }>("apply_update", { id, source: source ?? null, resolutions }),
rollbackUpdate: (id: string, txn: string) => invoke<UpdateTxn>("rollback_update", { id, txn }), rollbackUpdate: (id: string, txn: string) => invoke<UpdateTxn>("rollback_update", { id, txn }),
retryUpdateValidation: (id: string, txn: string) => invoke<UpdateTxn>("retry_update_validation", { id, txn }), retryUpdateValidation: (id: string, txn: string) => invoke<UpdateTxn>("retry_update_validation", { id, txn }),
population: (id: string) => invoke<Population | null>("get_population", { id }), /** Creates the companions the startup fleet is missing (the limit is a fleet size). Returns how many were queued. */
stopSpawning: (id: string) => invoke<{ count: number }>("companions_stop_spawning", { id }), topUpStartupFleet: (id: string, realm?: RealmMode) => invoke<number>("top_up_startup_fleet", { id, realm: realm ?? null }),
takeOffline: (id: string) => invoke<{ count: number }>("companions_take_offline", { id }), population: (id: string, realm?: RealmMode) => invoke<Population | null>("get_population", { id, realm: realm ?? null }),
despawnSome: (id: string, count: number) => invoke<{ count: number }>("companions_despawn_some", { id, count }), stopSpawning: (id: string, realm?: RealmMode) => invoke<{ count: number }>("companions_stop_spawning", { id, realm: realm ?? null }),
deleteAllCompanions: (id: string) => invoke<{ count: number }>("companions_delete_all", { id }), takeOffline: (id: string, realm?: RealmMode) => invoke<{ count: number }>("companions_take_offline", { id, realm: realm ?? null }),
despawnSome: (id: string, count: number, realm?: RealmMode) => invoke<{ count: number }>("companions_despawn_some", { id, count, realm: realm ?? null }),
deleteAllCompanions: (id: string, realm?: RealmMode) => invoke<{ count: number }>("companions_delete_all", { id, realm: realm ?? null }),
loginAllCompanions: (id: string, realm?: RealmMode) => invoke<string>("companions_login_all", { id, realm: realm ?? null }),
spawnBotFleet: (id: string, race: number, level: number, realm?: RealmMode) => invoke<string>("companions_spawn_fleet", { id, race, level, realm: realm ?? null }),
openLink: (url: string) => invoke<void>("open_link", { url }), openLink: (url: string) => invoke<void>("open_link", { url }),
performance: (id: string) => invoke<Performance | null>("get_performance", { id }), performance: (id: string) => invoke<Performance | null>("get_performance", { id }),
companionSizes: () => invoke<CompanionSizes>("companion_sizes"), companionSizes: () => invoke<CompanionSizes>("companion_sizes"),
addCompanions: (id: string, count: number) => invoke<{ spawned: string | null; created: number | null; baseline: number | null }>("add_companions", { id, count }), addCompanions: (
id: string,
count: number,
realm?: RealmMode,
level?: number,
classId?: number,
specId?: number,
archetype?: string
) =>
invoke<{ spawned: string | null; created: number | null; baseline: number | null }>("add_companions", {
id,
count,
realm: realm ?? null,
level: level ?? null,
class_id: classId ?? null,
spec_id: specId ?? null,
archetype: archetype ?? null,
}),
getWildcardArchetypes: (id: string) => invoke<WildcardArchetypeDto[]>("get_wildcard_archetypes", { id }),
clientGraphics: (id: string) => invoke<{ dxvk_disabled: boolean; enhancements_disabled: boolean }>("client_graphics", { id }), clientGraphics: (id: string) => invoke<{ dxvk_disabled: boolean; enhancements_disabled: boolean }>("client_graphics", { id }),
clientSetGraphics: (id: string, name: string, disabled: boolean) => invoke<{ dxvk_disabled: boolean; enhancements_disabled: boolean }>("client_set_graphics", { id, name, disabled }), clientSetGraphics: (id: string, name: string, disabled: boolean) => invoke<{ dxvk_disabled: boolean; enhancements_disabled: boolean }>("client_set_graphics", { id, name, disabled }),
clientInfo: (id: string) => invoke<ClientInfo | null>("client_info", { id }), clientInfo: (id: string) => invoke<ClientInfo | null>("client_info", { id }),
@@ -845,11 +867,6 @@ export const api = {
setRealmlist: (id: string, host: string) => invoke<string[]>("client_realmlist", { id, host }), setRealmlist: (id: string, host: string) => invoke<string[]>("client_realmlist", { id, host }),
installAddon: (id: string) => invoke<void>("client_install_addon", { id }), installAddon: (id: string) => invoke<void>("client_install_addon", { id }),
clientStatus: (id: string) => invoke<ClientStatus>("client_status", { id }), clientStatus: (id: string) => invoke<ClientStatus>("client_status", { id }),
clientDownloadCheck: (parent: string) => invoke<ClientDownloadCheck>("client_download_check", { parent }),
clientPlan: (id: string) => invoke<ClientPlan>("client_plan", { id }),
clientSync: (id: string, keepModified: boolean) => invoke<void>("client_sync", { id, keepModified }),
clientDownload: (id: string, parent: string) => invoke<ClientInfo>("client_download", { id, parent }),
clientCancel: () => invoke<void>("client_cancel"),
customRacesStatus: (id: string) => invoke<CustomRacesClientStatus | null>("custom_races_status", { id }), customRacesStatus: (id: string) => invoke<CustomRacesClientStatus | null>("custom_races_status", { id }),
raceAvailability: (id: string) => invoke<RaceAvailability>("race_availability", { id }), raceAvailability: (id: string) => invoke<RaceAvailability>("race_availability", { id }),
raceAvailabilitySave: (id: string, catalogSha256: string, realm: RealmMode, disabledRaceIds: number[]) => raceAvailabilitySave: (id: string, catalogSha256: string, realm: RealmMode, disabledRaceIds: number[]) =>
-116
View File
@@ -1,116 +0,0 @@
import { startAfterUpdate } from "./updatePrefs";
import { useSyncExternalStore } from "react";
import { listen } from "@tauri-apps/api/event";
import { api, asUiError, type ClientPlan, type ClientStep, type UiError } from "@/lib/api";
import { checkClient } from "@/lib/clientUpdate";
/**
* Updating the game client from the main screen, without a window over everything: the "Update client" button turns into
* a progress bar (as in a game launcher). Only a choice that needs the owner's word (files they changed) is shown, in
* place, below the buttons. The first-time linking of a client keeps its dialog (ClientDialog).
*/
export type ClientJobPhase = "idle" | "scanning" | "choose" | "working" | "done" | "current" | "stopped" | "failed";
export interface ClientJob {
phase: ClientJobPhase;
step: ClientStep | null;
plan: ClientPlan | null;
error: UiError | null;
}
const IDLE: ClientJob = { phase: "idle", step: null, plan: null, error: null };
const jobs = new Map<string, ClientJob>();
const listeners = new Set<() => void>();
const cancelled = new Set<string>();
const get = (id: string) => jobs.get(id) ?? IDLE;
function set(id: string, next: Partial<ClientJob>) {
jobs.set(id, { ...get(id), ...next });
listeners.forEach((l) => l());
}
let unlisten: (() => void) | null = null;
async function followProgress(id: string) {
if (unlisten) return;
try {
unlisten = await listen<ClientStep>("client-progress", (e) => {
const phase = get(id).phase;
if (phase === "scanning" || phase === "working") set(id, { step: e.payload });
});
} catch {
/* no event bridge (a plain browser): the bar just stays at zero */
}
}
function fail(id: string, e: unknown) {
if (cancelled.has(id)) set(id, { phase: "stopped", step: null });
else set(id, { phase: "failed", step: null, error: asUiError(e) });
}
async function refresh(id: string) {
await checkClient(id);
}
/** Look at what differs from the published client; update at once when nothing needs a decision. */
export async function startClientUpdate(id: string): Promise<void> {
const now = get(id).phase;
if (now === "scanning" || now === "working") return;
cancelled.delete(id);
set(id, { phase: "scanning", step: null, plan: null, error: null });
void followProgress(id);
try {
const plan = await api.clientPlan(id);
if (plan.items.length === 0) {
set(id, { phase: "current", plan, step: null });
void refresh(id);
setTimeout(() => {
if (get(id).phase === "current") set(id, { phase: "idle" });
}, 5000);
return;
}
if (plan.items.some((i) => i.kind === "modified")) {
set(id, { phase: "choose", plan, step: null });
return;
}
await syncClient(id, true);
} catch (e) {
fail(id, e);
}
}
/** Download what is missing or changed; `keepModified` keeps the files the owner changed. */
export async function syncClient(id: string, keepModified: boolean): Promise<void> {
cancelled.delete(id);
set(id, { phase: "working", step: null, error: null });
void followProgress(id);
try {
await api.clientSync(id, keepModified);
set(id, { phase: "done", step: null });
if (startAfterUpdate("client", id)) void api.play(id).catch(() => undefined);
void refresh(id);
setTimeout(() => {
if (get(id).phase === "done") set(id, { phase: "idle" });
}, 6000);
} catch (e) {
fail(id, e);
}
}
export function stopClientJob(id: string) {
cancelled.add(id);
void api.clientCancel().catch(() => undefined);
}
export function dismissClientJob(id: string) {
set(id, { phase: "idle", error: null, plan: null, step: null });
}
export function useClientJob(id: string): ClientJob {
return useSyncExternalStore(
(l) => {
listeners.add(l);
return () => listeners.delete(l);
},
() => get(id),
);
}
+3 -11
View File
@@ -2,8 +2,8 @@ import { useSyncExternalStore } from "react";
import { api, type ClientStatus } from "@/lib/api"; import { api, type ClientStatus } from "@/lib/api";
/** /**
* Game client status for the main screen: which client is linked and, for a client the Manager keeps up to date, * Whether a game client is linked, for the main screen. The Manager does not download or update the client (the
* whether a newer one has been published. Checked at start and every five minutes (one small request; no game file is read). * community's official launcher does), so this is a local check only.
*/ */
interface State { interface State {
status: ClientStatus | null; status: ClientStatus | null;
@@ -13,7 +13,6 @@ interface State {
const EMPTY: State = { status: null, checking: false }; const EMPTY: State = { status: null, checking: false };
const states = new Map<string, State>(); const states = new Map<string, State>();
const listeners = new Set<() => void>(); const listeners = new Set<() => void>();
const CHECK_EVERY_MS = 5 * 60 * 1000;
const get = (id: string) => states.get(id) ?? EMPTY; const get = (id: string) => states.get(id) ?? EMPTY;
function set(id: string, next: Partial<State>) { function set(id: string, next: Partial<State>) {
@@ -27,19 +26,12 @@ export async function checkClient(id: string): Promise<void> {
try { try {
set(id, { status: await api.clientStatus(id) }); set(id, { status: await api.clientStatus(id) });
} catch { } catch {
// offline: keep what we knew // keep what we knew
} finally { } finally {
set(id, { checking: false }); set(id, { checking: false });
} }
} }
/** Check now and then every five minutes. Returns the function that stops it. */
export function startClientPolling(id: string): () => void {
void checkClient(id);
const t = setInterval(() => void checkClient(id), CHECK_EVERY_MS);
return () => clearInterval(t);
}
export function useClientStatus(id: string): State { export function useClientStatus(id: string): State {
return useSyncExternalStore( return useSyncExternalStore(
(l) => { (l) => {
+3 -3
View File
@@ -1,10 +1,10 @@
import { useState } from "react"; import { useState } from "react";
/** /**
* Whether a finished update starts things. Off by default for both: updating a stopped server leaves it stopped (a * Whether a finished server update starts the server. Off by default: updating a stopped server leaves it stopped (a
* server that was running is started again, as the update had to stop it) and a client update does not open the game. * server that was running is started again, as the update had to stop it).
*/ */
export type AfterUpdate = "server" | "client"; export type AfterUpdate = "server";
const key = (kind: AfterUpdate, id: string) => `coa-start-after-${kind}-update:${id}`; const key = (kind: AfterUpdate, id: string) => `coa-start-after-${kind}-update:${id}`;
const fallback = (_kind: AfterUpdate) => false; const fallback = (_kind: AfterUpdate) => false;
+6 -30
View File
@@ -1,15 +1,14 @@
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { listen } from "@tauri-apps/api/event"; import { listen } from "@tauri-apps/api/event";
import { open } from "@tauri-apps/plugin-dialog"; import { open } from "@tauri-apps/plugin-dialog";
import { api, asUiError, type ClientInfo, type ClientStatus, type UiError } from "@/lib/api"; import { api, asUiError, type ClientInfo, type UiError } from "@/lib/api";
import { checkClient } from "@/lib/clientUpdate"; import { checkClient } from "@/lib/clientUpdate";
import { ClientGraphics } from "./ClientGraphics"; import { ClientGraphics } from "./ClientGraphics";
import { AddonCatalog } from "./AddonCatalog"; import { AddonCatalog } from "./AddonCatalog";
import { ClientDialog, type ClientDialogMode } from "@/screens/ClientDialog"; import { CLIENT_SITE, ClientDialog } from "@/screens/ClientDialog";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card"; import { Card } from "@/components/ui/card";
import { useHuman, useT } from "@/i18n"; import { useHuman, useT } from "@/i18n";
import { useStartAfterUpdate } from "@/lib/updatePrefs";
export function ClientCard({ serverId, remote = false }: { serverId: string; remote?: boolean }) { export function ClientCard({ serverId, remote = false }: { serverId: string; remote?: boolean }) {
const t = useT(); const t = useT();
@@ -18,13 +17,10 @@ export function ClientCard({ serverId, remote = false }: { serverId: string; rem
const [error, setError] = useState<UiError | null>(null); const [error, setError] = useState<UiError | null>(null);
const [note, setNote] = useState<string | null>(null); const [note, setNote] = useState<string | null>(null);
const [busy, setBusy] = useState(false); const [busy, setBusy] = useState(false);
const [status, setStatus] = useState<ClientStatus | null>(null);
const [patchProgress, setPatchProgress] = useState<string | null>(null); const [patchProgress, setPatchProgress] = useState<string | null>(null);
const [dialog, setDialog] = useState<ClientDialogMode | null>(null); const [dialog, setDialog] = useState(false);
const [playAfter, setPlayAfter] = useStartAfterUpdate("client", serverId);
const refresh = () => { const refresh = () => {
void api.clientStatus(serverId).then(setStatus).catch(() => setStatus(null));
return api.clientInfo(serverId).then(setInfo).catch((e) => setError(asUiError(e))); return api.clientInfo(serverId).then(setInfo).catch((e) => setError(asUiError(e)));
}; };
useEffect(() => { useEffect(() => {
@@ -67,7 +63,7 @@ export function ClientCard({ serverId, remote = false }: { serverId: string; rem
{info === null && ( {info === null && (
<> <>
<p className="mt-1 text-sm text-muted">{t(remote ? "remote.clientIntro" : "client.intro")}</p> <p className="mt-1 text-sm text-muted">{t(remote ? "remote.clientIntro" : "client.intro")}</p>
<Button className="mt-4" onClick={() => setDialog("setup")} disabled={busy}>{t("btn.setupClient")}</Button> <Button className="mt-4" onClick={() => setDialog(true)} disabled={busy}>{t("btn.setupClient")}</Button>
</> </>
)} )}
{info && ( {info && (
@@ -79,24 +75,11 @@ export function ClientCard({ serverId, remote = false }: { serverId: string; rem
{hosts.length ? hosts.filter(Boolean).join(", ") : "—"} {hosts.length ? hosts.filter(Boolean).join(", ") : "—"}
{!remote && (pointsLocal ? <span className="ml-2 text-ok">{t("client.thisComputer")}</span> : <span className="ml-2 text-warn">{t("client.notThisServer")}</span>)} {!remote && (pointsLocal ? <span className="ml-2 text-ok">{t("client.thisComputer")}</span> : <span className="ml-2 text-warn">{t("client.notThisServer")}</span>)}
</dd> </dd>
<dt className="text-muted">{t("client.version")}</dt>
<dd>
{status?.managed
? status.installed_version ?? t("client.versionUnfinished")
: t("client.versionUntracked")}
{status?.update_available && <span className="ml-2 text-warn">{t("client.updateAvailable")}</span>}
</dd>
<dt className="text-muted">{t("client.otherAddons")}</dt> <dt className="text-muted">{t("client.otherAddons")}</dt>
<dd>{t("client.leftAsIs", { n: info.other_addons })}</dd> <dd>{t("client.leftAsIs", { n: info.other_addons })}</dd>
</dl> </dl>
<ClientGraphics key={info.path} serverId={serverId} /> <ClientGraphics key={info.path} serverId={serverId} />
<AddonCatalog key={"addons-" + info.path} serverId={serverId} companions={remote ? null : info.addon} onCompanionsInstalled={() => void refresh()} /> <AddonCatalog key={"addons-" + info.path} serverId={serverId} companions={remote ? null : info.addon} onCompanionsInstalled={() => void refresh()} />
{!remote && (
<label className="mt-4 flex cursor-pointer items-center gap-2 text-sm">
<input type="checkbox" checked={playAfter} onChange={(e) => setPlayAfter(e.target.checked)} className="h-4 w-4 accent-[#c9a24a]" />
<span>{t("client.startAfter")}</span>
</label>
)}
<div className="mt-4 flex flex-wrap gap-2"> <div className="mt-4 flex flex-wrap gap-2">
{!remote && !pointsLocal && ( {!remote && !pointsLocal && (
<Button size="sm" disabled={busy} onClick={() => void run(async () => { await api.setRealmlist(serverId, "127.0.0.1"); return t("client.pointedNote"); })}> <Button size="sm" disabled={busy} onClick={() => void run(async () => { await api.setRealmlist(serverId, "127.0.0.1"); return t("client.pointedNote"); })}>
@@ -108,15 +91,9 @@ export function ClientCard({ serverId, remote = false }: { serverId: string; rem
{info.addon.installed ? t("client.updateAddon") : t("client.installAddon")} {info.addon.installed ? t("client.updateAddon") : t("client.installAddon")}
</Button> </Button>
)} )}
{(status?.update_available || (remote && status?.managed)) && (
<Button size="sm" variant="primary" disabled={busy} onClick={() => setDialog("update")}>{t("client.upd.start")}</Button>
)}
{status && !status.managed && (
<Button size="sm" disabled={busy} onClick={() => setDialog("track")}>{t("client.track.button")}</Button>
)}
{remote && <Button size="sm" disabled={busy} onClick={() => void run(() => api.customRacesInstall(serverId))}>{t("client.races.install")}</Button>} {remote && <Button size="sm" disabled={busy} onClick={() => void run(() => api.customRacesInstall(serverId))}>{t("client.races.install")}</Button>}
<Button size="sm" variant="ghost" disabled={busy} onClick={() => void choose()}>{t("client.changeFolder")}</Button> <Button size="sm" variant="ghost" disabled={busy} onClick={() => void choose()}>{t("client.changeFolder")}</Button>
<Button size="sm" variant="ghost" disabled={busy} onClick={() => setDialog("setup")}>{t("client.downloadInstead")}</Button> <Button size="sm" variant="ghost" disabled={busy} onClick={() => void api.openLink(CLIENT_SITE).catch((e) => setError(asUiError(e)))}>{t("client.getFromSite")}</Button>
</div> </div>
</> </>
)} )}
@@ -126,8 +103,7 @@ export function ClientCard({ serverId, remote = false }: { serverId: string; rem
{dialog && ( {dialog && (
<ClientDialog <ClientDialog
serverId={serverId} serverId={serverId}
mode={dialog} onClose={() => setDialog(false)}
onClose={() => setDialog(null)}
onChanged={() => { onChanged={() => {
void refresh(); void refresh();
void checkClient(serverId); void checkClient(serverId);
+30 -207
View File
@@ -1,62 +1,35 @@
import { useEffect, useRef, useState } from "react"; import { useEffect, useState } from "react";
import { open } from "@tauri-apps/plugin-dialog"; import { open } from "@tauri-apps/plugin-dialog";
import { listen } from "@tauri-apps/api/event"; import { Check, ExternalLink } from "lucide-react";
import { Check, Loader2 } from "lucide-react"; import { api, asUiError, REMOTE_CLIENT_ID, type UiError } from "@/lib/api";
import { api, asUiError, REMOTE_CLIENT_ID, type ClientDownloadCheck, type ClientPlan, type ClientStep, type UiError } from "@/lib/api";
import { formatBytes } from "@/lib/utils";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card"; import { Card } from "@/components/ui/card";
import { useHuman, useT } from "@/i18n"; import { useHuman, useT } from "@/i18n";
/** /** Where the community hands out its launcher, which downloads the game client. The Manager does not download it. */
* - setup: no client linked yet: pick an existing folder or download the client. export const CLIENT_SITE = "https://conquestofazerothcore.to/";
* - update: a client the Manager keeps up to date has a newer version.
* - track: an existing client the Manager has not looked at yet: compare it once, then keep it up to date.
*/
export type ClientDialogMode = "setup" | "update" | "track";
type Phase = "choose" | "confirm" | "scanning" | "preview" | "working" | "done" | "stopped" | "failed";
type Phase = "choose" | "done" | "failed";
/**
* Linking the game client: pick a folder that already has the game, or go to the community site for the official
* launcher (it downloads the client after signing in) and come back to pick the folder it installed to.
*/
export function ClientDialog(props: { export function ClientDialog(props: {
serverId: string; serverId: string;
mode: ClientDialogMode;
onClose: () => void; onClose: () => void;
/** The linked client or its version changed; the caller refreshes what it shows. */ /** The linked client changed; the caller refreshes what it shows. */
onChanged: () => void; onChanged: () => void;
/** Update mode only: start the game without updating. */
onPlayAnyway?: () => void;
}) { }) {
const t = useT(); const t = useT();
const human = useHuman(); const human = useHuman();
const { serverId, mode } = props; const { serverId } = props;
const [phase, setPhase] = useState<Phase>(mode === "setup" ? "choose" : "scanning"); const [phase, setPhase] = useState<Phase>("choose");
const [step, setStep] = useState<ClientStep | null>(null);
const [parent, setParent] = useState<string | null>(null);
const [check, setCheck] = useState<ClientDownloadCheck | null>(null);
const [plan, setPlan] = useState<ClientPlan | null>(null);
const [keep, setKeep] = useState(true);
const [error, setError] = useState<UiError | null>(null); const [error, setError] = useState<UiError | null>(null);
const cancelled = useRef(false);
const working = phase === "scanning" || phase === "working";
useEffect(() => {
let un: (() => void) | undefined;
let gone = false;
listen<ClientStep>("client-progress", (e) => setStep(e.payload))
.then((u) => (gone ? u() : (un = u)))
.catch(() => undefined);
return () => {
gone = true;
un?.();
};
}, []);
useEffect(() => {
if (mode !== "setup") void startPlan();
}, []); // eslint-disable-line react-hooks/exhaustive-deps
useEffect(() => { useEffect(() => {
const onKey = (e: KeyboardEvent) => { const onKey = (e: KeyboardEvent) => {
if (e.key === "Escape" && !working) close(); if (e.key === "Escape") close();
}; };
window.addEventListener("keydown", onKey); window.addEventListener("keydown", onKey);
return () => window.removeEventListener("keydown", onKey); return () => window.removeEventListener("keydown", onKey);
@@ -67,15 +40,6 @@ export function ClientDialog(props: {
props.onClose(); props.onClose();
} }
function fail(e: unknown) {
if (cancelled.current) {
setPhase("stopped");
} else {
setError(asUiError(e));
setPhase("failed");
}
}
async function useExisting() { async function useExisting() {
const picked = await open({ directory: true, multiple: false, title: t("client.dialogTitle") }); const picked = await open({ directory: true, multiple: false, title: t("client.dialogTitle") });
if (typeof picked !== "string") return; if (typeof picked !== "string") return;
@@ -89,68 +53,16 @@ export function ClientDialog(props: {
} }
} }
async function pickParent() { async function openSite() {
const picked = await open({ directory: true, multiple: false, title: t("client.dl.pickParent") });
if (typeof picked !== "string") return;
setError(null);
try { try {
setCheck(await api.clientDownloadCheck(picked)); await api.openLink(CLIENT_SITE);
setParent(picked);
setPhase("confirm");
} catch (e) { } catch (e) {
setError(asUiError(e)); setError(asUiError(e));
setPhase("failed"); setPhase("failed");
} }
} }
async function startDownload() { const title = t("client.setup.title");
if (!parent) return;
cancelled.current = false;
setStep(null);
setPhase("working");
try {
await api.clientDownload(serverId, parent);
setPhase("done");
} catch (e) {
fail(e);
}
}
async function startPlan() {
cancelled.current = false;
setStep(null);
setError(null);
setPhase("scanning");
try {
const p = await api.clientPlan(serverId);
setPlan(p);
setKeep(p.items.some((i) => i.kind === "modified"));
setPhase("preview");
} catch (e) {
fail(e);
}
}
async function startSync() {
cancelled.current = false;
setStep(null);
setPhase("working");
try {
await api.clientSync(serverId, keep);
setPhase("done");
} catch (e) {
fail(e);
}
}
function stop() {
cancelled.current = true;
void api.clientCancel();
}
const modified = plan?.items.filter((i) => i.kind === "modified") ?? [];
const pct = step && step.total > 0 ? Math.min(100, Math.floor((step.done / step.total) * 100)) : 0;
const title = mode === "setup" ? t("client.setup.title") : mode === "update" ? t("client.upd.title") : t("client.track.title");
return ( return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-6" role="presentation"> <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-6" role="presentation">
@@ -161,107 +73,32 @@ export function ClientDialog(props: {
<> <>
<p className="mt-1 text-sm text-muted">{t("client.setup.intro")}</p> <p className="mt-1 text-sm text-muted">{t("client.setup.intro")}</p>
<div className="mt-4 grid gap-3"> <div className="mt-4 grid gap-3">
<button type="button" onClick={() => void openSite()} className="cursor-pointer rounded-md border border-line bg-card-2 p-4 text-left transition-colors hover:border-gold/50">
<span className="flex items-center gap-2 font-medium">
{t("client.setup.getLauncher")}
<ExternalLink className="h-4 w-4 text-muted" aria-hidden />
</span>
<span className="mt-1 block text-sm text-muted">{t("client.setup.getLauncherHint")}</span>
</button>
<button type="button" onClick={() => void useExisting()} className="cursor-pointer rounded-md border border-line bg-card-2 p-4 text-left transition-colors hover:border-gold/50"> <button type="button" onClick={() => void useExisting()} className="cursor-pointer rounded-md border border-line bg-card-2 p-4 text-left transition-colors hover:border-gold/50">
<span className="block font-medium">{t("client.setup.have")}</span> <span className="block font-medium">{t("client.setup.have")}</span>
</button> <span className="mt-1 block text-sm text-muted">{t("client.setup.haveHint")}</span>
<button type="button" onClick={() => void pickParent()} className="cursor-pointer rounded-md border border-line bg-card-2 p-4 text-left transition-colors hover:border-gold/50">
<span className="block font-medium">{t("client.setup.download")}</span>
<span className="mt-1 block text-sm text-muted">{t("client.setup.downloadHint")}</span>
</button> </button>
</div> </div>
<p className="mt-3 text-xs text-muted">{t("client.setup.hdHint")}</p>
<div className="mt-5 flex justify-end"> <div className="mt-5 flex justify-end">
<Button variant="ghost" onClick={close}>{t("btn.close")}</Button> <Button variant="ghost" onClick={close}>{t("btn.close")}</Button>
</div> </div>
</> </>
)} )}
{phase === "confirm" && check && (
<>
<p className="mt-1 text-sm text-muted">{t("client.dl.confirmText", { v: check.version, size: formatBytes(check.needed_bytes) })}</p>
<p className="selectable mt-3 break-all rounded-md bg-black/30 px-3 py-2 text-sm">{check.dest}</p>
<p className={check.free_bytes < check.needed_bytes + 512 * 1024 * 1024 ? "mt-3 text-sm text-bad" : "mt-3 text-sm text-muted"}>
{check.free_bytes < check.needed_bytes + 512 * 1024 * 1024
? t("client.dl.notEnough", { need: formatBytes(check.needed_bytes), free: formatBytes(check.free_bytes) })
: t("client.dl.free", { free: formatBytes(check.free_bytes) })}
</p>
<div className="mt-5 flex justify-end gap-2">
<Button variant="ghost" onClick={() => void pickParent()}>{t("client.dl.otherFolder")}</Button>
<Button variant="primary" disabled={check.free_bytes < check.needed_bytes + 512 * 1024 * 1024} onClick={() => void startDownload()}>
{t("client.dl.start")}
</Button>
</div>
</>
)}
{(phase === "scanning" || phase === "working") && (
<div className="mt-4" role="status">
<div className="flex items-center gap-2 text-sm">
<Loader2 className="h-4 w-4 animate-spin text-gold" aria-hidden />
<span>{phase === "scanning" || step?.phase === "scan" ? t("client.dl.scanning") : t("client.dl.downloading")}</span>
<span className="ml-auto text-muted">{pct}%</span>
</div>
<div className="mt-2 h-2 overflow-hidden rounded-full bg-white/10" role="progressbar" aria-valuenow={pct} aria-valuemin={0} aria-valuemax={100}>
<div className="h-full rounded-full bg-gold transition-[width] duration-300" style={{ width: `${pct}%` }} />
</div>
<div className="mt-2 flex justify-between gap-4 text-xs text-muted">
<span className="min-w-0 truncate">{step?.file ?? ""}</span>
<span className="shrink-0">
{step ? t("client.dl.progress", { done: formatBytes(step.done), total: formatBytes(step.total) }) : ""}
{step && step.phase === "download" && step.bytes_per_sec > 0 ? ` · ${t("client.dl.speed", { speed: formatBytes(step.bytes_per_sec) })}` : ""}
</span>
</div>
<div className="mt-5 flex justify-end">
<Button variant="ghost" onClick={stop}>{t("client.dl.cancel")}</Button>
</div>
</div>
)}
{phase === "preview" && plan && (
<>
{plan.items.length === 0 ? (
<p className="mt-2 text-sm">{t("client.upd.upToDate", { v: plan.version })}</p>
) : (
<>
{mode === "update" && <p className="mt-2 text-sm">{t("client.upd.available", { v: plan.version })}</p>}
<p className="mt-1 text-sm text-muted">{t("client.upd.summary", { n: plan.items.length, size: formatBytes(plan.download_bytes) })}</p>
</>
)}
{mode === "track" && <p className="mt-3 text-sm text-muted">{t("client.track.text")}</p>}
{modified.length > 0 && (
<div className="mt-4 rounded-md border border-warn/40 bg-warn/5 p-3 text-sm">
<p className="font-medium">{t("client.upd.modifiedTitle", { n: modified.length })}</p>
<p className="mt-1 text-muted">{t("client.upd.modifiedText")}</p>
<ul className="selectable mt-2 space-y-0.5 text-xs text-muted">
{modified.slice(0, 8).map((i) => (
<li key={i.path} className="truncate">{i.path}</li>
))}
{modified.length > 8 && <li>{t("client.upd.more", { n: modified.length - 8 })}</li>}
</ul>
<label className="mt-3 flex cursor-pointer items-center gap-2">
<input type="checkbox" checked={keep} onChange={(e) => setKeep(e.target.checked)} className="h-4 w-4 accent-[#c9a24a]" />
<span>{t("client.upd.keep")}</span>
</label>
</div>
)}
<div className="mt-5 flex flex-wrap justify-end gap-2">
{mode === "update" && props.onPlayAnyway && (
<Button variant="ghost" onClick={() => { close(); props.onPlayAnyway?.(); }}>{t("client.upd.playAnyway")}</Button>
)}
<Button variant="ghost" onClick={close}>{t("client.upd.later")}</Button>
<Button variant="primary" onClick={() => void startSync()}>
{mode === "track" ? (plan.items.length === 0 ? t("client.track.start") : t("client.track.startUpdate")) : t("client.upd.start")}
</Button>
</div>
</>
)}
{phase === "done" && ( {phase === "done" && (
<> <>
<div className="mt-4 flex items-center gap-3"> <div className="mt-4 flex items-center gap-3">
<span className="flex h-9 w-9 items-center justify-center rounded-full bg-ok/15 text-ok"><Check className="h-5 w-5" aria-hidden /></span> <span className="flex h-9 w-9 items-center justify-center rounded-full bg-ok/15 text-ok"><Check className="h-5 w-5" aria-hidden /></span>
<div> <div>
<p className="font-medium">{mode === "setup" ? t("client.dl.done") : t("client.upd.done")}</p> <p className="font-medium">{t("client.dl.done")}</p>
<p className="text-sm text-muted">{mode === "setup" ? t(serverId === REMOTE_CLIENT_ID ? "remote.clientReady" : "client.dl.doneText") : t("client.upd.doneText")}</p> <p className="text-sm text-muted">{t(serverId === REMOTE_CLIENT_ID ? "remote.clientReady" : "client.dl.doneText")}</p>
</div> </div>
</div> </div>
<div className="mt-5 flex justify-end"> <div className="mt-5 flex justify-end">
@@ -270,26 +107,12 @@ export function ClientDialog(props: {
</> </>
)} )}
{phase === "stopped" && (
<>
<p className="mt-3 text-sm text-muted">{t("client.dl.cancelled")}</p>
<div className="mt-5 flex justify-end gap-2">
<Button variant="ghost" onClick={close}>{t("btn.close")}</Button>
{mode === "setup" ? (
parent && <Button variant="primary" onClick={() => void startDownload()}>{t("client.dl.resume")}</Button>
) : (
<Button variant="primary" onClick={() => void startPlan()}>{t("client.dl.resume")}</Button>
)}
</div>
</>
)}
{phase === "failed" && error && ( {phase === "failed" && error && (
<> <>
<p className="mt-3 text-sm text-bad" role="alert">{error.human.code === "unknown" ? error.technical : human(error.human).message}</p> <p className="mt-3 text-sm text-bad" role="alert">{error.human.code === "unknown" ? error.technical : human(error.human).message}</p>
<div className="mt-5 flex justify-end gap-2"> <div className="mt-5 flex justify-end gap-2">
<Button variant="ghost" onClick={close}>{t("btn.close")}</Button> <Button variant="ghost" onClick={close}>{t("btn.close")}</Button>
{mode === "setup" ? <Button onClick={() => { setError(null); setPhase("choose"); }}>{t("client.dl.back")}</Button> : <Button onClick={() => void startPlan()}>{t("client.dl.retry")}</Button>} <Button onClick={() => { setError(null); setPhase("choose"); }}>{t("client.dl.back")}</Button>
</div> </div>
</> </>
)} )}
+720 -160
View File
@@ -1,30 +1,125 @@
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { Loader2 } from "lucide-react"; import {
import { api, asUiError, type CompanionSizes, type Population, type UiError } from "@/lib/api"; Loader2,
Bot,
CheckCircle2,
AlertCircle,
RefreshCw,
Power,
Users,
Database,
} from "lucide-react";
import {
api,
asUiError,
type Population,
type RealmMode,
type RealmProfiles,
type UiError,
type WildcardArchetypeDto,
} from "@/lib/api";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card"; import { Card } from "@/components/ui/card";
import { hasKey, useHuman, useT, type Key } from "@/i18n"; import { useHuman, useT } from "@/i18n";
function formatRole(roles: number): string {
const parts: string[] = [];
if (roles & 1) parts.push("Tank");
if (roles & 2) parts.push("Melee");
if (roles & 4) parts.push("Ranged");
if (roles & 8) parts.push("Healer");
return parts.join("/") || "DPS";
}
function formatStat(stat: number): string {
switch (stat) {
case 0: return "Strength";
case 1: return "Agility";
case 2: return "Stamina";
case 3: return "Intellect";
case 4: return "Spirit";
default: return "All";
}
}
export function CompanionsCard({ serverId }: { serverId: string }) { export function CompanionsCard({ serverId }: { serverId: string }) {
const t = useT(); const t = useT();
const human = useHuman(); const human = useHuman();
const [sizes, setSizes] = useState<CompanionSizes | null>(null);
// Realm & Environment state
const [profiles, setProfiles] = useState<RealmProfiles | null>(null);
const [selectedRealm, setSelectedRealm] = useState<RealmMode>("coa");
const [pop, setPop] = useState<Population | null>(null); const [pop, setPop] = useState<Population | null>(null);
const [running, setRunning] = useState(false); const [running, setRunning] = useState(false);
const [choice, setChoice] = useState<string>("small");
const [custom, setCustom] = useState("100"); // Fleet Configuration state
const [spawnMode, setSpawnMode] = useState<"population" | "fleet">("population");
const [countChoice, setCountChoice] = useState<string>("50");
const [customCount, setCustomCount] = useState<string>("50");
const [targetLevel, setTargetLevel] = useState<number>(80);
const [selectedClass, setSelectedClass] = useState<string>("all");
const [selectedRole, setSelectedRole] = useState<string>("all");
const [selectedArchetype, setSelectedArchetype] = useState<string>("all");
const [wildcardArchetypes, setWildcardArchetypes] = useState<WildcardArchetypeDto[]>([]);
// Operational state
const [busy, setBusy] = useState(false); const [busy, setBusy] = useState(false);
const [error, setError] = useState<UiError | null>(null); const [error, setError] = useState<UiError | null>(null);
const [note, setNote] = useState<string | null>(null); const [note, setNote] = useState<string | null>(null);
// Start-up login: how many existing bots the server brings online by itself every time it starts. const [job, setJob] = useState<{ baseline: number; target: number; since: number } | null>(null);
// Startup Auto-Login settings
const [autoOn, setAutoOn] = useState(true); const [autoOn, setAutoOn] = useState(true);
const [autoMax, setAutoMax] = useState(""); const [autoMax, setAutoMax] = useState("");
// A creation that is still in progress on the running server: how many existed before and how many were asked for.
const [job, setJob] = useState<{ baseline: number; target: number; since: number } | null>(null);
const [startNote, setStartNote] = useState<string | null>(null); const [startNote, setStartNote] = useState<string | null>(null);
const [startBusy, setStartBusy] = useState(false); const [startBusy, setStartBusy] = useState(false);
const [despawnN, setDespawnN] = useState("10"); const [despawnN, setDespawnN] = useState("10");
const activeServerRealm = profiles?.active ?? "coa";
const isViewingActiveRealm = selectedRealm === activeServerRealm;
const isRealmOperational = isViewingActiveRealm || running;
const maxLevelForRealm = 60;
// Load realm profiles
const loadProfiles = async () => {
try {
const r = await api.realmProfiles(serverId);
setProfiles(r);
if (!selectedRealm) {
setSelectedRealm(r.active);
}
} catch {
// ignore
}
};
useEffect(() => {
void loadProfiles();
}, [serverId]);
// Adjust target level if realm changed
useEffect(() => {
if (targetLevel > maxLevelForRealm) {
setTargetLevel(maxLevelForRealm);
}
}, [selectedRealm, maxLevelForRealm, targetLevel]);
// Load wildcard archetypes dynamically from target characters db
useEffect(() => {
if (selectedRealm === "wildcard") {
api.getWildcardArchetypes(serverId)
.then((archs) => setWildcardArchetypes(archs))
.catch(() => {});
if (selectedClass === "all") {
setSelectedClass("10");
}
} else {
setSelectedArchetype("all");
}
}, [serverId, selectedRealm]);
// Load startup settings
useEffect(() => { useEffect(() => {
void api void api
.settings(serverId, "bots") .settings(serverId, "bots")
@@ -40,6 +135,46 @@ export function CompanionsCard({ serverId }: { serverId: string }) {
const maxNum = Number(autoMax); const maxNum = Number(autoMax);
const maxValid = autoMax.trim() !== "" && Number.isInteger(maxNum) && maxNum >= 0 && maxNum <= 5000; const maxValid = autoMax.trim() !== "" && Number.isInteger(maxNum) && maxNum >= 0 && maxNum <= 5000;
// Polling population
const fetchPopulation = async () => {
const s = await api.status(serverId).catch(() => null);
if (!s) return;
const up = s.observed.world.state === "running";
setRunning(up);
if (up) {
const p = await api.population(serverId, selectedRealm).catch(() => null);
setPop(p);
} else {
setPop(null);
}
};
useEffect(() => {
let alive = true;
const poll = async () => {
if (!alive) return;
await fetchPopulation();
};
void poll();
const interval = setInterval(poll, job ? 1500 : 4000);
return () => {
alive = false;
clearInterval(interval);
};
}, [serverId, selectedRealm, job !== null]); // eslint-disable-line react-hooks/exhaustive-deps
const done = job && pop ? Math.max(0, Math.min(job.target, pop.bots_total - job.baseline)) : 0;
useEffect(() => {
if (!job) return;
if ((pop && done >= job.target) || !running) {
if (pop && done >= job.target) setNote(t("comp.progressDone", { n: job.target }));
setJob(null);
}
}, [done, running]); // eslint-disable-line react-hooks/exhaustive-deps
const count = countChoice === "custom" ? Number(customCount) : Number(countChoice);
const valid = Number.isInteger(count) && count >= 1 && count <= 2000;
async function act(fn: () => Promise<string>) { async function act(fn: () => Promise<string>) {
setBusy(true); setBusy(true);
setError(null); setError(null);
@@ -52,46 +187,136 @@ export function CompanionsCard({ serverId }: { serverId: string }) {
} }
} }
// Primary action: Spawn bots / fleet
const handleSpawn = async () => {
if (!valid) return;
setBusy(true);
setError(null);
setNote(null);
try {
if (spawnMode === "fleet") {
const race = 1;
const out = await api.spawnBotFleet(serverId, race, targetLevel, selectedRealm);
setNote(out || `Spawned level ${targetLevel} fleet`);
} else {
const classNum = selectedClass !== "all" ? parseInt(selectedClass, 10) : (selectedRealm === "wildcard" ? 10 : undefined);
let specNum: number | undefined = undefined;
if (selectedRole === "tank") {
if (selectedRealm === "reborn") {
specNum = (classNum === 7 || classNum === 9 || classNum === 11) ? 4 : (classNum === 2 ? 2 : classNum === 1 ? 3 : 1);
} else if (selectedRealm === "wildcard") {
specNum = 1;
}
} else if (selectedRole === "healer") {
if (selectedRealm === "reborn") {
specNum = (classNum === 2 || classNum === 5) ? 1 : (classNum === 7 || classNum === 11 ? 3 : 1);
} else if (selectedRealm === "wildcard") {
specNum = 2;
}
}
const archStr = selectedArchetype !== "all" ? selectedArchetype : undefined;
const r = await api.addCompanions(serverId, count, selectedRealm, targetLevel, classNum, specNum, archStr);
if (r.spawned && r.baseline !== null) {
setJob({ baseline: r.baseline, target: count, since: Date.now() });
}
setNote(
r.created
? t("comp.offlineDone", { n: r.created })
: r.spawned
? t("comp.spawned", { n: count })
: t("comp.saved", { n: count })
);
}
await fetchPopulation();
} catch (e) {
setError(asUiError(e));
} finally {
setBusy(false);
}
};
// Bring offline bots online
const handleLoginAll = () =>
act(async () => {
const out = await api.loginAllCompanions(serverId, selectedRealm);
await fetchPopulation();
return out || "All available offline bots queued for login.";
});
// Stop queued creations
const stopCreating = () => const stopCreating = () =>
act(async () => { act(async () => {
const r = await api.stopSpawning(serverId); const r = await api.stopSpawning(serverId, selectedRealm);
setJob(null); setJob(null);
await fetchPopulation();
return t("comp.stopped", { n: r.count }); return t("comp.stopped", { n: r.count });
}); });
// Take online bots offline
const takeOffline = () => { const takeOffline = () => {
if (!window.confirm(t("comp.offlineConfirm"))) return; if (!window.confirm(t("comp.offlineConfirm"))) return;
void act(async () => { void act(async () => {
const r = await api.takeOffline(serverId); const r = await api.takeOffline(serverId, selectedRealm);
setJob(null); setJob(null);
await fetchPopulation();
return t("comp.offlineDone2", { n: r.count }); return t("comp.offlineDone2", { n: r.count });
}); });
}; };
// Despawn batch
const dn = Number(despawnN); const dn = Number(despawnN);
const dnValid = Number.isInteger(dn) && dn >= 1 && dn <= 5000; const dnValid = Number.isInteger(dn) && dn >= 1 && dn <= 5000;
const despawnSome = () => const despawnSome = () =>
act(async () => { act(async () => {
const r = await api.despawnSome(serverId, dn); const r = await api.despawnSome(serverId, dn, selectedRealm);
await fetchPopulation();
return t("comp.despawnSomeDone", { n: r.count }); return t("comp.despawnSomeDone", { n: r.count });
}); });
// Delete all bots in realm
const deleteAll = () => { const deleteAll = () => {
if (!window.confirm(t("comp.deleteConfirm", { n: pop?.bots_total ?? 0 }))) return; if (!window.confirm(t("comp.deleteConfirm", { n: pop?.bots_total ?? 0 }))) return;
void act(async () => { void act(async () => {
await api.deleteAllCompanions(serverId); await api.deleteAllCompanions(serverId, selectedRealm);
setJob(null); setJob(null);
await fetchPopulation();
return t("comp.deleteDone"); return t("comp.deleteDone");
}); });
}; };
// Switch server realm
const switchServerRealm = async (mode: RealmMode) => {
if (!window.confirm(`Switch server active realm to ${mode.toUpperCase()} and restart?`)) return;
setBusy(true);
try {
await api.realmSelect(serverId, mode, true);
await loadProfiles();
setSelectedRealm(mode);
} catch (e) {
setError(asUiError(e));
} finally {
setBusy(false);
}
};
// Save auto startup settings
async function saveStart() { async function saveStart() {
setStartBusy(true); setStartBusy(true);
setError(null); setError(null);
setStartNote(null); setStartNote(null);
try { try {
await api.save(serverId, "bots", { "CoaBots.AutoLoginOnStartup": autoOn, "CoaBots.AutoLogin.MaxCount": maxNum }); // The limit is a fleet size: companions that exist count, only the missing ones are created.
setStartNote(t("comp.startSaved")); const missing = autoOn && running && isViewingActiveRealm && pop ? Math.max(0, maxNum - pop.bots_total) : 0;
if (missing > 200 && !window.confirm(t("comp.startTopUpConfirm", { n: Math.min(missing, 2000), max: maxNum }))) {
setStartBusy(false);
return;
}
await api.save(serverId, "bots", {
"CoaBots.AutoLoginOnStartup": autoOn,
"CoaBots.AutoLogin.MaxCount": maxNum,
});
const queued = autoOn && running ? await api.topUpStartupFleet(serverId, activeServerRealm) : 0;
setStartNote(queued > 0 ? t("comp.startTopUp", { n: queued, max: maxNum }) : t("comp.startSaved"));
} catch (e) { } catch (e) {
setError(asUiError(e)); setError(asUiError(e));
} finally { } finally {
@@ -99,181 +324,516 @@ export function CompanionsCard({ serverId }: { serverId: string }) {
} }
} }
useEffect(() => { // Database schema name for selected realm
void api.companionSizes().then(setSizes); const dbSchema =
let alive = true; selectedRealm === "coa"
const poll = async () => { ? "acore_characters"
const s = await api.status(serverId).catch(() => null); : selectedRealm === "wildcard"
if (!alive || !s) return; ? "acore_characters_wildcard"
const up = s.observed.world.state === "running"; : "acore_characters_reborn";
setRunning(up);
setPop(up ? await api.population(serverId).catch(() => null) : null);
};
void poll();
// Faster while companions are being created, so the progress bar moves.
const t = setInterval(poll, job ? 1500 : 4000);
return () => {
alive = false;
clearInterval(t);
};
}, [serverId, job !== null]); // eslint-disable-line react-hooks/exhaustive-deps
const done = job && pop ? Math.max(0, Math.min(job.target, pop.bots_total - job.baseline)) : 0; // Binary compatibility check
useEffect(() => { const isBinaryCompatible =
if (!job) return; selectedRealm === "coa" ||
// Finished, or the server went away, or nothing new appeared for two minutes. (selectedRealm === "wildcard" && (profiles?.supported ?? true)) ||
if ((pop && done >= job.target) || !running) { (selectedRealm === "reborn" && (profiles?.reborn_supported ?? true));
if (pop && done >= job.target) setNote(t("comp.progressDone", { n: job.target }));
setJob(null);
}
}, [done, running]); // eslint-disable-line react-hooks/exhaustive-deps
// The backend describes a size's warning in English; show the translated text for the two known kinds.
const warningFor = (size?: { bots: number; warning: string | null }) => {
if (!size?.warning) return null;
return size.warning.startsWith(`${size.bots} companions`)
? t("comp.warnHardware", { n: size.bots, cores: sizes?.hardware.cores ?? "?", ram: sizes ? sizes.hardware.ram_gb.toFixed(0) : "?" })
: t("comp.warnMemory");
};
const count = choice === "custom" ? Number(custom) : (sizes?.sizes.find((s) => s.id === choice)?.bots ?? 0);
const warning = choice === "custom" ? (count > 500 ? t("comp.largeWarning") : null) : (warningFor(sizes?.sizes.find((s) => s.id === choice)));
const valid = Number.isInteger(count) && count >= 1 && count <= 2000;
async function add() {
setBusy(true);
setError(null);
setNote(null);
try {
const r = await api.addCompanions(serverId, count);
if (r.spawned && r.baseline !== null) setJob({ baseline: r.baseline, target: count, since: Date.now() });
setNote(r.created ? t("comp.offlineDone", { n: r.created }) : r.spawned ? t("comp.spawned", { n: count }) : t("comp.saved", { n: count }));
} catch (e) {
setError(asUiError(e));
} finally {
setBusy(false);
}
}
return ( return (
<Card className="mt-6 p-6"> <Card className="mt-6 p-6 space-y-6">
<h2 className="font-semibold">{t("comp.title")}</h2> {/* Header & Realm Switcher */}
<p className="mt-1 text-sm text-muted"> <div>
{pop <div className="flex flex-wrap items-center justify-between gap-3">
? t("comp.population", { online: pop.bots_online, total: pop.bots_total }) <div className="flex items-center gap-2">
: running <Bot className="h-6 w-6 text-gold" />
? t("comp.reading") <h2 className="text-xl font-bold tracking-tight">{t("comp.title")}</h2>
: t("comp.startToSee")} </div>
</p> <div className="flex items-center gap-2">
<span className="text-xs text-muted flex items-center gap-1">
<fieldset className="mt-4"> <Database className="h-3.5 w-3.5" />
<legend className="text-sm text-muted">{t("comp.wantMore")}</legend> DB: <code className="text-gold">{dbSchema}</code>
<div className="mt-2 flex flex-wrap gap-2"> </span>
{sizes?.sizes.map((s) => ( </div>
<label key={s.id} className={`cursor-pointer rounded-md border px-3 py-2 text-sm ${choice === s.id ? "border-gold bg-gold/10" : "border-line hover:bg-white/5"}`}>
<input type="radio" name="size" className="sr-only" checked={choice === s.id} onChange={() => setChoice(s.id)} />
{hasKey(`comp.size.${s.id}`) ? t(`comp.size.${s.id}` as Key) : s.title} <span className="text-muted">· {s.bots}</span>
</label>
))}
<label className={`cursor-pointer rounded-md border px-3 py-2 text-sm ${choice === "custom" ? "border-gold bg-gold/10" : "border-line hover:bg-white/5"}`}>
<input type="radio" name="size" className="sr-only" checked={choice === "custom"} onChange={() => setChoice("custom")} />
{t("comp.custom")}
</label>
{choice === "custom" && (
<input aria-label={t("comp.numberLabel")} value={custom} onChange={(e) => setCustom(e.target.value)} inputMode="numeric" className="w-24 rounded-md border border-line bg-bg px-3 py-2 text-right text-sm outline-none focus:border-gold" />
)}
</div> </div>
</fieldset>
{warning && <p className="mt-3 text-sm text-warn" role="status">{warning}</p>} {/* Realm Navigation Tabs */}
{sizes && <p className="mt-2 text-xs text-muted">{t("comp.hardware", { cores: sizes.hardware.cores, ram: sizes.hardware.ram_gb.toFixed(0) })}</p>} <div className="mt-4 flex flex-wrap gap-2 border-b border-line pb-3">
{(["coa", "wildcard", "reborn"] as RealmMode[]).map((mode) => {
<div className="mt-4 flex items-center gap-3"> const isSelected = selectedRealm === mode;
<Button variant="primary" disabled={busy || !valid || job !== null} onClick={() => void add()}> const isActive = activeServerRealm === mode;
{busy && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />} const label =
{valid ? t("comp.add", { n: count }) : t("comp.addPlain")} mode === "coa"
</Button> ? "Conquest of Azeroth"
{!running && <span className="text-xs text-muted">{t("comp.stoppedHint")}</span>} : mode === "wildcard"
? "Wildcard (Hero)"
: "Warcraft Reborn";
return (
<button
key={mode}
type="button"
onClick={() => setSelectedRealm(mode)}
className={`flex items-center gap-2 rounded-lg px-4 py-2 text-sm font-medium transition-colors ${
isSelected
? "bg-gold/20 text-gold border border-gold/40 shadow-sm"
: "border border-line hover:bg-white/5 text-muted hover:text-white"
}`}
>
<span>{label}</span>
{isActive && (
<span className="rounded bg-ok/20 px-1.5 py-0.5 text-[10px] font-semibold text-ok uppercase">
Active Server
</span>
)}
</button>
);
})}
</div>
</div> </div>
{busy && !running && count >= 100 && (
<div className="mt-3"> {/* Binary Compatibility & Realm Mode Warning */}
<p className="text-sm text-muted" role="status">{t("comp.progressOffline", { n: count })}</p> {!isBinaryCompatible && (
<div className="mt-2 h-2 overflow-hidden rounded-full bg-white/10" role="progressbar" aria-busy="true"> <div className="rounded-lg border border-bad/40 bg-bad/10 p-4 text-sm text-bad flex items-start gap-3">
<div className="h-full w-full animate-pulse rounded-full bg-gold/70" /> <AlertCircle className="h-5 w-5 shrink-0 mt-0.5" />
<div>
<div className="font-semibold">Binary Compatibility Warning</div>
<p className="mt-1 text-xs text-bad/90">
The currently running server core binary does not have full multi-realm support enabled
for <strong>{selectedRealm.toUpperCase()}</strong>. Automated bot features may be restricted.
</p>
</div> </div>
</div> </div>
)} )}
{job && (
<div className="mt-3"> {/* Active Realm Switch Helper */}
<div className="flex justify-between text-sm"> {!isViewingActiveRealm && (
<span role="status">{t("comp.progress", { done, target: job.target })}</span> <div className="rounded-lg border border-warn/40 bg-warn/10 p-3 text-sm flex items-center justify-between gap-3">
<span className="text-muted">{Math.round((done / job.target) * 100)}%</span> <span className="text-warn text-xs">
</div> Viewing <strong>{selectedRealm.toUpperCase()}</strong> bots, but the worldserver is currently running in{" "}
<div className="mt-2 h-2 overflow-hidden rounded-full bg-white/10" role="progressbar" aria-valuenow={done} aria-valuemin={0} aria-valuemax={job.target}> <strong>{activeServerRealm.toUpperCase()}</strong> mode.
<div className="h-full rounded-full bg-gold transition-[width] duration-500" style={{ width: `${(done / job.target) * 100}%` }} /> </span>
</div> <Button
{done === 0 && Date.now() - job.since > 20000 && <p className="mt-1 text-xs text-muted">{t("comp.progressStalled")}</p>} size="sm"
<Button className="mt-2" size="sm" variant="ghost" disabled={busy} onClick={() => void stopCreating()}> variant="secondary"
{t("comp.stop")} disabled={busy}
onClick={() => void switchServerRealm(selectedRealm)}
>
Switch Server to {selectedRealm.toUpperCase()}
</Button> </Button>
</div> </div>
)} )}
{note && !job && <p className="mt-3 text-sm text-ok" role="status">{note}</p>}
{running && pop && pop.bots_total > 0 && ( {/* Realm Population Dashboard */}
<div className="mt-5 border-t border-line pt-4"> <div className="grid grid-cols-2 sm:grid-cols-4 gap-3">
<h3 className="text-sm font-semibold">{t("comp.manageTitle")}</h3> <div className="rounded-lg border border-line bg-bg/50 p-3">
<div className="mt-2 flex flex-wrap items-center gap-2 text-sm"> <div className="text-xs text-muted flex items-center gap-1.5">
<label htmlFor="despawn-n" className="text-muted">{t("comp.despawnCount")}</label> <Bot className="h-3.5 w-3.5 text-gold" />
Bots Online
</div>
<div className="mt-1 text-2xl font-bold text-white">
{running && pop ? pop.bots_online : "—"}
</div>
</div>
<div className="rounded-lg border border-line bg-bg/50 p-3">
<div className="text-xs text-muted flex items-center gap-1.5">
<Users className="h-3.5 w-3.5 text-gold" />
Total Fleet
</div>
<div className="mt-1 text-2xl font-bold text-white">
{pop ? pop.bots_total : "—"}
</div>
</div>
<div className="rounded-lg border border-line bg-bg/50 p-3">
<div className="text-xs text-muted flex items-center gap-1.5">
<CheckCircle2 className="h-3.5 w-3.5 text-ok" />
Players Online
</div>
<div className="mt-1 text-2xl font-bold text-white">
{running && pop ? pop.players_online : "—"}
</div>
</div>
<div className="rounded-lg border border-line bg-bg/50 p-3 flex flex-col justify-between">
<div className="text-xs text-muted flex items-center justify-between">
<span>Status</span>
<button
onClick={() => void fetchPopulation()}
title="Refresh"
className="text-muted hover:text-white"
>
<RefreshCw className="h-3 w-3" />
</button>
</div>
<div className="text-sm font-medium">
{running ? (
<span className="text-ok flex items-center gap-1">
<span className="h-2 w-2 rounded-full bg-ok animate-pulse" /> Running
</span>
) : (
<span className="text-muted">Offline</span>
)}
</div>
</div>
</div>
{/* Fleet Configuration & Spawning Section */}
<div className="border-t border-line pt-5 space-y-4">
<div className="flex items-center justify-between">
<h3 className="font-semibold text-sm tracking-wide uppercase text-muted">
Fleet Deployment Controls
</h3>
<div className="flex rounded-md border border-line p-0.5 text-xs">
<button
type="button"
onClick={() => setSpawnMode("population")}
className={`px-2.5 py-1 rounded transition-colors ${
spawnMode === "population" ? "bg-gold/20 text-gold font-medium" : "text-muted hover:text-white"
}`}
>
Batch Population
</button>
<button
type="button"
onClick={() => setSpawnMode("fleet")}
className={`px-2.5 py-1 rounded transition-colors ${
spawnMode === "fleet" ? "bg-gold/20 text-gold font-medium" : "text-muted hover:text-white"
}`}
>
Synchronous Fleet
</button>
</div>
</div>
{/* Count Selector */}
{spawnMode === "population" && (
<div>
<label className="text-xs text-muted">Fleet Size (Number of Bots)</label>
<div className="mt-2 flex flex-wrap gap-2">
{["10", "25", "50", "100", "250", "500"].map((n) => (
<button
key={n}
type="button"
onClick={() => setCountChoice(n)}
className={`rounded-md border px-3 py-1.5 text-sm transition-colors ${
countChoice === n
? "border-gold bg-gold/15 text-gold font-medium"
: "border-line hover:bg-white/5 text-muted"
}`}
>
{n}
</button>
))}
<button
type="button"
onClick={() => setCountChoice("custom")}
className={`rounded-md border px-3 py-1.5 text-sm transition-colors ${
countChoice === "custom"
? "border-gold bg-gold/15 text-gold font-medium"
: "border-line hover:bg-white/5 text-muted"
}`}
>
Custom
</button>
{countChoice === "custom" && (
<input
type="number"
min="1"
max="2000"
value={customCount}
onChange={(e) => setCustomCount(e.target.value)}
className="w-24 rounded-md border border-line bg-bg px-3 py-1.5 text-right text-sm outline-none focus:border-gold"
/>
)}
</div>
</div>
)}
{/* Fleet Specific Settings: Level, Class, Role, Archetype */}
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3">
{/* Target Level */}
<div>
<label className="text-xs text-muted">
{spawnMode === "fleet" ? "Fleet Level" : "Max Level Cap"} (1 - {maxLevelForRealm})
</label>
<input
type="number"
min="1"
max={maxLevelForRealm}
value={targetLevel}
onChange={(e) => setTargetLevel(Math.max(1, Math.min(maxLevelForRealm, Number(e.target.value))))}
className="mt-1.5 w-full rounded-md border border-line bg-bg px-3 py-1.5 text-sm outline-none focus:border-gold"
/>
</div>
{/* Class Filter */}
<div>
<label className="text-xs text-muted">Class Focus</label>
<select
value={selectedClass}
onChange={(e) => setSelectedClass(e.target.value)}
className="mt-1.5 w-full rounded-md border border-line bg-bg px-3 py-1.5 text-sm outline-none focus:border-gold"
>
<option value="all">All Realm Classes</option>
{selectedRealm === "coa" && (
<>
<option value="12">Barbarian</option>
<option value="13">Witch Doctor</option>
<option value="14">Felsworn</option>
<option value="15">Witch Hunter</option>
<option value="16">Stormbringer</option>
<option value="17">Knight of Xoroth</option>
<option value="18">Guardian</option>
<option value="19">Templar</option>
<option value="20">Bloodmage</option>
<option value="21">Ranger</option>
<option value="22">Chronomancer</option>
<option value="23">Necromancer</option>
<option value="24">Pyromancer</option>
<option value="25">Cultist</option>
<option value="26">Starcaller</option>
<option value="27">Tinker</option>
<option value="28">Venomancer</option>
<option value="29">Reaper</option>
<option value="30">Sun Cleric</option>
<option value="31">Runemaster</option>
<option value="32">Primalist</option>
</>
)}
{selectedRealm === "wildcard" && (
<option value="10">Hero (Freepick)</option>
)}
{selectedRealm === "reborn" && (
<>
<option value="1">Warrior</option>
<option value="2">Paladin</option>
<option value="3">Hunter</option>
<option value="4">Rogue</option>
<option value="5">Priest</option>
<option value="6">Death Knight</option>
<option value="7">Shaman</option>
<option value="8">Mage</option>
<option value="9">Warlock</option>
<option value="11">Druid</option>
</>
)}
</select>
</div>
{/* Role Filter */}
<div>
<label className="text-xs text-muted">Combat Role</label>
<select
value={selectedRole}
onChange={(e) => setSelectedRole(e.target.value)}
className="mt-1.5 w-full rounded-md border border-line bg-bg px-3 py-1.5 text-sm outline-none focus:border-gold"
>
<option value="all">All Roles</option>
<option value="tank">Tank</option>
<option value="healer">Healer</option>
<option value="melee">Melee DPS</option>
<option value="ranged">Ranged Physical DPS</option>
<option value="caster">Caster DPS</option>
</select>
</div>
{/* Archetype Filter */}
<div>
<label className="text-xs text-muted">Archetype / Build</label>
<select
value={selectedArchetype}
onChange={(e) => setSelectedArchetype(e.target.value)}
className="mt-1.5 w-full rounded-md border border-line bg-bg px-3 py-1.5 text-sm outline-none focus:border-gold"
>
<option value="all">Auto / Integral Archetype</option>
{selectedRealm === "wildcard" && (
<>
{wildcardArchetypes.map((b) => (
<option key={b.id} value={b.id}>
{b.name} ({formatRole(b.roles)}) [{formatStat(b.primary_stat)}]
</option>
))}
</>
)}
{selectedRealm === "reborn" && (
<>
<option value="spiritguard">Spirit Guard Shaman (Tank)</option>
<option value="darkapoth">Dark Apotheosis Warlock (Tank)</option>
<option value="guardianbear">Guardian Bear Druid (Tank)</option>
<option value="protpal">Protection Paladin (Tank)</option>
<option value="protwar">Protection Warrior (Tank)</option>
<option value="holypriest">Holy Priest (Healer)</option>
<option value="restodruid">Restoration Druid / Shaman</option>
</>
)}
{selectedRealm === "coa" && (
<option value="class_spec">Class Mastery Specialization</option>
)}
</select>
</div>
</div>
{/* Deployment Actions */}
<div className="flex flex-wrap items-center gap-3 pt-2">
<Button
variant="primary"
disabled={busy || !valid || job !== null || !isRealmOperational}
onClick={() => void handleSpawn()}
>
{busy && <Loader2 className="h-4 w-4 animate-spin mr-2" />}
{spawnMode === "fleet"
? `Spawn Level ${targetLevel} Fleet`
: `Deploy ${valid ? count : ""} Bots`}
</Button>
{running && pop && pop.bots_total > pop.bots_online && (
<Button
variant="secondary"
disabled={busy || job !== null || !isRealmOperational}
onClick={() => void handleLoginAll()}
title="Bring all created bots online"
>
<Power className="h-4 w-4 mr-1.5 text-ok" />
Bring All Online ({pop.bots_total - pop.bots_online} idle)
</Button>
)}
{!running && (
<span className="text-xs text-muted">
Server stopped: bots will be created directly in DB or queued for startup.
</span>
)}
</div>
{/* Progress Bar during active spawn */}
{job && (
<div className="rounded-lg border border-line bg-bg/40 p-4 space-y-2">
<div className="flex justify-between text-sm">
<span className="font-medium">
Creating bots: {done} / {job.target}
</span>
<span className="text-gold font-bold">
{Math.round((done / job.target) * 100)}%
</span>
</div>
<div className="h-2 overflow-hidden rounded-full bg-white/10">
<div
className="h-full rounded-full bg-gold transition-[width] duration-300"
style={{ width: `${(done / job.target) * 100}%` }}
/>
</div>
<div className="flex justify-between items-center pt-1">
<span className="text-xs text-muted">
Paced creation prevents server stalls and guarantees full talent/gear setup.
</span>
<Button size="sm" variant="ghost" disabled={busy} onClick={() => void stopCreating()}>
Cancel Queue
</Button>
</div>
</div>
)}
{note && !job && (
<p className="text-sm text-ok flex items-center gap-1.5">
<CheckCircle2 className="h-4 w-4 shrink-0" />
{note}
</p>
)}
</div>
{/* Online Fleet Management (Despawn, Purge) */}
{running && pop && pop.bots_total > 0 && isViewingActiveRealm && (
<div className="border-t border-line pt-5 space-y-3">
<h3 className="font-semibold text-sm tracking-wide uppercase text-muted">
Online Fleet Management
</h3>
<div className="flex flex-wrap items-center gap-3 text-sm">
<label htmlFor="despawn-n" className="text-muted text-xs">
Despawn Batch:
</label>
<input <input
id="despawn-n" id="despawn-n"
value={despawnN} value={despawnN}
onChange={(e) => setDespawnN(e.target.value)} onChange={(e) => setDespawnN(e.target.value)}
inputMode="numeric" inputMode="numeric"
aria-invalid={!dnValid} aria-invalid={!dnValid}
className="w-20 rounded-md border border-line bg-bg px-3 py-1.5 text-right outline-none focus:border-gold" className="w-20 rounded-md border border-line bg-bg px-2.5 py-1 text-right text-sm outline-none focus:border-gold"
/> />
<Button size="sm" variant="secondary" disabled={busy || !dnValid} onClick={() => void despawnSome()}> <Button
{t("comp.despawnSome", { n: dnValid ? dn : "…" })} size="sm"
variant="secondary"
disabled={busy || !dnValid}
onClick={() => void despawnSome()}
>
Despawn {dnValid ? dn : "…"} Bots
</Button> </Button>
</div>
<p className="mt-1 text-xs text-muted">{t("comp.despawnHint")}</p>
<div className="mt-3 flex flex-wrap gap-2">
<Button size="sm" variant="secondary" disabled={busy} onClick={takeOffline}> <Button size="sm" variant="secondary" disabled={busy} onClick={takeOffline}>
{t("comp.offline")} Take All Offline
</Button> </Button>
<Button size="sm" variant="ghost" className="text-bad hover:text-bad" disabled={busy} onClick={deleteAll}>
{t("comp.delete")} <Button
size="sm"
variant="ghost"
className="text-bad hover:text-bad ml-auto"
disabled={busy}
onClick={deleteAll}
>
Purge Entire Fleet ({pop.bots_total})
</Button> </Button>
</div> </div>
</div> </div>
)} )}
<div className="mt-5 border-t border-line pt-4"> {/* Startup Auto-Login Configuration */}
<h3 className="text-sm font-semibold">{t("comp.startTitle")}</h3> <div className="border-t border-line pt-5 space-y-3">
<label className="mt-2 flex cursor-pointer items-center gap-2 text-sm"> <h3 className="font-semibold text-sm tracking-wide uppercase text-muted">
<input type="checkbox" checked={autoOn} onChange={(e) => setAutoOn(e.target.checked)} /> Persistent Startup Fleet
{t("comp.startAuto")} </h3>
</label> <p className="text-xs text-muted">
<div className="mt-2 flex flex-wrap items-center gap-2 text-sm"> The server keeps this many companions. At every start the ones that exist log in, and only the missing ones are created.
<label htmlFor="start-max" className="text-muted">{t("comp.startCount")}</label> </p>
<input
id="start-max" <div className="flex flex-wrap items-center gap-4 text-sm">
value={autoMax} <label className="flex cursor-pointer items-center gap-2">
onChange={(e) => setAutoMax(e.target.value)} <input
inputMode="numeric" type="checkbox"
disabled={!autoOn} checked={autoOn}
aria-invalid={!maxValid} onChange={(e) => setAutoOn(e.target.checked)}
className="w-24 rounded-md border border-line bg-bg px-3 py-1.5 text-right outline-none focus:border-gold disabled:opacity-40" className="rounded border-line text-gold focus:ring-gold"
/> />
<Button size="sm" variant="secondary" disabled={startBusy || (autoOn && !maxValid)} onClick={() => void saveStart()}> <span>Enable Auto-Login on Server Startup</span>
{t("comp.startSave")} </label>
</Button>
<div className="flex items-center gap-2">
<label htmlFor="start-max" className="text-xs text-muted">
Startup Limit:
</label>
<input
id="start-max"
value={autoMax}
onChange={(e) => setAutoMax(e.target.value)}
inputMode="numeric"
disabled={!autoOn}
aria-invalid={!maxValid}
className="w-24 rounded-md border border-line bg-bg px-2.5 py-1 text-right text-sm outline-none focus:border-gold disabled:opacity-40"
/>
<Button
size="sm"
variant="secondary"
disabled={startBusy || (autoOn && !maxValid)}
onClick={() => void saveStart()}
>
Save Setting
</Button>
</div>
</div> </div>
{autoOn && !maxValid && autoMax !== "" && <p className="mt-1 text-xs text-warn">{t("comp.startInvalid")}</p>} {startNote && <p className="text-xs text-ok">{startNote}</p>}
<p className="mt-1 text-xs text-muted">{t("comp.startHint")}</p>
{startNote && <p className="mt-2 text-sm text-ok" role="status">{startNote}</p>}
</div> </div>
{error && <p className="mt-3 text-sm text-bad" role="alert">{error.human.code === "unknown" ? error.technical : human(error.human).message}</p>}
{error && (
<div className="rounded-md border border-bad/40 bg-bad/10 p-3 text-sm text-bad flex items-center gap-2">
<AlertCircle className="h-4 w-4 shrink-0" />
<span>{error.human.code === "unknown" ? error.technical : human(error.human).message}</span>
</div>
)}
</Card> </Card>
); );
} }
+6 -7
View File
@@ -5,7 +5,7 @@ import { cn } from "@/lib/utils";
import { useI18n, type Key } from "@/i18n"; import { useI18n, type Key } from "@/i18n";
import { asControlError, control, type AccountView, type Credentials, type JoinOutcome, type RemoteCharacter } from "@/lib/control"; import { asControlError, control, type AccountView, type Credentials, type JoinOutcome, type RemoteCharacter } from "@/lib/control";
import { REMOTE_CLIENT_ID } from "@/lib/api"; import { REMOTE_CLIENT_ID } from "@/lib/api";
import { ClientDialog, type ClientDialogMode } from "@/screens/ClientDialog"; import { ClientDialog } from "@/screens/ClientDialog";
import { Notes } from "@/screens/PortablePage"; import { Notes } from "@/screens/PortablePage";
const STATUS_TEXT: Record<string, Key> = { const STATUS_TEXT: Record<string, Key> = {
@@ -129,7 +129,7 @@ export function JoinPanel({ realm, character, automatic, onClaimed }: { realm: s
const [err, setErr] = useState<{ code: string; message: string } | null>(null); const [err, setErr] = useState<{ code: string; message: string } | null>(null);
const [linking, setLinking] = useState(false); const [linking, setLinking] = useState(false);
const [bring, setBring] = useState(false); const [bring, setBring] = useState(false);
const [clientDialog, setClientDialog] = useState<ClientDialogMode | null>(null); const [clientDialog, setClientDialog] = useState(false);
const refresh = () => control.account(realm).then(setAccount).catch(() => setAccount(null)); const refresh = () => control.account(realm).then(setAccount).catch(() => setAccount(null));
useEffect(() => { setOutcome(null); setErr(null); setLinking(false); void refresh(); }, [realm]); // eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { setOutcome(null); setErr(null); setLinking(false); void refresh(); }, [realm]); // eslint-disable-line react-hooks/exhaustive-deps
@@ -139,7 +139,7 @@ export function JoinPanel({ realm, character, automatic, onClaimed }: { realm: s
const o = await control.join(realm, bring && character ? character : null, true); const o = await control.join(realm, bring && character ? character : null, true);
setOutcome(o); setOutcome(o);
if (o.status === "needs_link") setLinking(true); if (o.status === "needs_link") setLinking(true);
if (o.status === "needs_client") setClientDialog("setup"); if (o.status === "needs_client") setClientDialog(true);
await refresh(); await refresh();
} catch (e) { setErr(asControlError(e)); } finally { setBusy(false); } } catch (e) { setErr(asControlError(e)); } finally { setBusy(false); }
} }
@@ -156,7 +156,7 @@ export function JoinPanel({ realm, character, automatic, onClaimed }: { realm: s
{outcome && text && <div className={cn("mt-3 rounded-md border p-3 text-sm", bad ? "border-warn/50 bg-warn/10" : "border-ok/40 bg-ok/10")} role="status" data-status={outcome.status}> {outcome && text && <div className={cn("mt-3 rounded-md border p-3 text-sm", bad ? "border-warn/50 bg-warn/10" : "border-ok/40 bg-ok/10")} role="status" data-status={outcome.status}>
<p>{t(text)}</p> <p>{t(text)}</p>
{outcome.status === "needs_client" && ( {outcome.status === "needs_client" && (
<Button size="sm" className="mt-2" onClick={() => setClientDialog("setup")}> <Button size="sm" className="mt-2" onClick={() => setClientDialog(true)}>
{t("btn.setupClient")} {t("btn.setupClient")}
</Button> </Button>
)} )}
@@ -170,10 +170,9 @@ export function JoinPanel({ realm, character, automatic, onClaimed }: { realm: s
{clientDialog && ( {clientDialog && (
<ClientDialog <ClientDialog
serverId={REMOTE_CLIENT_ID} serverId={REMOTE_CLIENT_ID}
mode={clientDialog} onClose={() => setClientDialog(false)}
onClose={() => setClientDialog(null)}
onChanged={() => { onChanged={() => {
setClientDialog(null); setClientDialog(false);
void join(); void join();
}} }}
/> />
+47 -16
View File
@@ -632,6 +632,8 @@ export function ModulesPage({
const [parts, setParts] = useState<ModuleView[]>([]); const [parts, setParts] = useState<ModuleView[]>([]);
const toggleLock = useRef(false); const toggleLock = useRef(false);
const [toggling, setToggling] = useState<string | null>(null); const [toggling, setToggling] = useState<string | null>(null);
const [updatingModule, setUpdatingModule] = useState<string | null>(null);
const [updatedNote, setUpdatedNote] = useState<string | null>(null);
const [changed, setChanged] = useState(false); const [changed, setChanged] = useState(false);
const [racesPatchStatus, setRacesPatchStatus] = useState<CustomRacesClientStatus | null>(null); const [racesPatchStatus, setRacesPatchStatus] = useState<CustomRacesClientStatus | null>(null);
const [raceChars, setRaceChars] = useState<CustomRaceCharacters | null>(null); const [raceChars, setRaceChars] = useState<CustomRaceCharacters | null>(null);
@@ -804,6 +806,23 @@ export function ModulesPage({
}; };
}, []); }, []);
/** Updates one module to the build this server's core recommends. Only ever started by the owner's click. */
async function updateModule(id: string) {
setUpdatingModule(id);
setUpdatedNote(null);
setError(null);
try {
const commit = await api.moduleUpdate(serverId, id);
setUpdatedNote(t("mod.update.done", { id, commit: commit.slice(0, 8) }));
await load();
onChanged?.();
} catch (e) {
setError(asUiError(e));
} finally {
setUpdatingModule(null);
}
}
async function installClientPatch() { async function installClientPatch() {
setRacesInstalling(true); setRacesInstalling(true);
setError(null); setError(null);
@@ -1345,6 +1364,10 @@ export function ModulesPage({
</div> </div>
)} )}
{updatedNote && (
<p role="status" className="rounded border border-ok/30 bg-ok/10 p-3 text-xs text-ok">{updatedNote}</p>
)}
{cacheOpen && <BuildCacheDialog serverId={serverId} locale={locale} onClose={() => setCacheOpen(false)} />} {cacheOpen && <BuildCacheDialog serverId={serverId} locale={locale} onClose={() => setCacheOpen(false)} />}
{/* Build tools: said only when something is missing */} {/* Build tools: said only when something is missing */}
@@ -1690,6 +1713,24 @@ export function ModulesPage({
</p> </p>
)} )}
{m.installed && m.available_commit && (
<div className="flex flex-wrap items-center justify-between gap-2 rounded-md border border-gold/30 bg-gold/5 px-3 py-2 text-xs">
<span>
{t("mod.update.available", { from: (m.source_commit ?? "?").slice(0, 8), to: m.available_commit.slice(0, 8) })}
<span className="ml-1 text-muted">{t("mod.update.hint")}</span>
</span>
<Button
size="sm"
variant="secondary"
disabled={updatingModule !== null || toggling !== null}
onClick={() => void updateModule(m.id)}
>
{updatingModule === m.id && <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" aria-hidden />}
{updatingModule === m.id ? t("mod.update.working") : t("mod.update.do")}
</Button>
</div>
)}
{/* Custom Races Client Patch status badge */} {/* Custom Races Client Patch status badge */}
{m.id === "custom-races" && racesPatchStatus && ( {m.id === "custom-races" && racesPatchStatus && (
<div className="text-[11px] text-muted flex items-center gap-1.5"> <div className="text-[11px] text-muted flex items-center gap-1.5">
@@ -1839,7 +1880,7 @@ export function ModulesPage({
{racesPatchStatus?.state === "enabled" && ( {racesPatchStatus?.state === "enabled" && (
<span className="inline-flex items-center gap-1.5 rounded-full bg-ok/10 px-2.5 py-1 text-xs text-ok border border-ok/30"> <span className="inline-flex items-center gap-1.5 rounded-full bg-ok/10 px-2.5 py-1 text-xs text-ok border border-ok/30">
<span className="h-1.5 w-1.5 rounded-full bg-ok" /> <span className="h-1.5 w-1.5 rounded-full bg-ok" />
{locale === "ru" ? "Патч клиента: Включен" : "Client Patch: Active"} {t("races.patch.active")}
</span> </span>
)} )}
{racesPatchStatus?.state === "disabled" && ( {racesPatchStatus?.state === "disabled" && (
@@ -1848,23 +1889,19 @@ export function ModulesPage({
title="MPQ files disabled with .disabled suffix" title="MPQ files disabled with .disabled suffix"
> >
<span className="h-1.5 w-1.5 rounded-full bg-muted" /> <span className="h-1.5 w-1.5 rounded-full bg-muted" />
{locale === "ru" {t("races.patch.disabled")}
? "Патч клиента: Отключен (.disabled)"
: "Client Patch: Disabled (.disabled)"}
</span> </span>
)} )}
{racesPatchStatus?.state === "not-installed" && ( {racesPatchStatus?.state === "not-installed" && (
<span className="inline-flex items-center gap-1.5 rounded-full bg-warn/10 px-2.5 py-1 text-xs text-warn border border-warn/30"> <span className="inline-flex items-center gap-1.5 rounded-full bg-warn/10 px-2.5 py-1 text-xs text-warn border border-warn/30">
<span className="h-1.5 w-1.5 rounded-full bg-warn" /> <span className="h-1.5 w-1.5 rounded-full bg-warn" />
{locale === "ru" ? "Патч клиента: Не установлен" : "Client Patch: Not Installed"} {t("races.patch.notInstalled")}
</span> </span>
)} )}
{racesPatchStatus?.state === "partially-installed" && ( {racesPatchStatus?.state === "partially-installed" && (
<span className="inline-flex items-center gap-1.5 rounded-full bg-warn/10 px-2.5 py-1 text-xs text-warn border border-warn/30"> <span className="inline-flex items-center gap-1.5 rounded-full bg-warn/10 px-2.5 py-1 text-xs text-warn border border-warn/30">
<span className="h-1.5 w-1.5 rounded-full bg-warn" /> <span className="h-1.5 w-1.5 rounded-full bg-warn" />
{locale === "ru" {t("races.patch.partial", { a: racesPatchStatus.installedMpqs, b: racesPatchStatus.totalMpqs })}
? `Патч клиента: ${racesPatchStatus.installedMpqs}/${racesPatchStatus.totalMpqs} MPQ`
: `Client Patch: ${racesPatchStatus.installedMpqs}/${racesPatchStatus.totalMpqs} MPQ`}
</span> </span>
)} )}
</div> </div>
@@ -1877,13 +1914,7 @@ export function ModulesPage({
onClick={() => void installClientPatch()} onClick={() => void installClientPatch()}
> >
{racesInstalling && <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" />} {racesInstalling && <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" />}
{racesPatchStatus?.state === "not-installed" {racesPatchStatus?.state === "not-installed" ? t("races.patch.install") : t("races.patch.repair")}
? locale === "ru"
? "Установить патч клиента"
: "Install Client Patch"
: locale === "ru"
? "Восстановить патч клиента"
: "Repair Client Patch"}
</Button> </Button>
{racesPatchStatus && racesPatchStatus.state !== "not-installed" && ( {racesPatchStatus && racesPatchStatus.state !== "not-installed" && (
<Button <Button
@@ -1893,7 +1924,7 @@ export function ModulesPage({
onClick={() => void uninstallClientPatch()} onClick={() => void uninstallClientPatch()}
className="text-xs" className="text-xs"
> >
{locale === "ru" ? "Удалить патч клиента" : "Uninstall Client Patch"} {t("races.patch.uninstall")}
</Button> </Button>
)} )}
</div> </div>
+7 -79
View File
@@ -1,15 +1,14 @@
import { ForceStopDialog } from "./ForceStopDialog"; import { ForceStopDialog } from "./ForceStopDialog";
import { serverLifecycle } from "@/lib/serverLifecycle"; import { serverLifecycle } from "@/lib/serverLifecycle";
import { serverUpdateBlocksRestart } from "@/lib/serverUpdate"; import { serverUpdateBlocksRestart } from "@/lib/serverUpdate";
import { dismissClientJob, startClientUpdate, stopClientJob, syncClient, useClientJob } from "@/lib/clientJob";
import { useCallback, useEffect, useRef, useState } from "react"; import { useCallback, useEffect, useRef, useState } from "react";
import { AlertTriangle, Loader2, X } from "lucide-react"; import { AlertTriangle, Loader2, X } from "lucide-react";
import { api, asUiError, type ClientInfo, type Human, type Performance, type Population, type ServerSummary, type ServiceStatus, type StatusView } from "@/lib/api"; import { api, asUiError, type ClientInfo, type Human, type Performance, type Population, type ServerSummary, type ServiceStatus, type StatusView } from "@/lib/api";
import { cn, formatBytes, formatUptime } from "@/lib/utils"; import { cn, formatUptime } from "@/lib/utils";
import { useHuman, useT } from "@/i18n"; import { useHuman, useT } from "@/i18n";
import { applyServerUpdate, useServerUpdate } from "@/lib/serverUpdate"; import { applyServerUpdate, useServerUpdate } from "@/lib/serverUpdate";
import { checkClient, useClientStatus } from "@/lib/clientUpdate"; import { checkClient } from "@/lib/clientUpdate";
import { ClientDialog, type ClientDialogMode } from "@/screens/ClientDialog"; import { ClientDialog } from "@/screens/ClientDialog";
import { RealmlistMenu } from "@/screens/RealmlistMenu"; import { RealmlistMenu } from "@/screens/RealmlistMenu";
import { RealmPicker } from "@/screens/RealmPicker"; import { RealmPicker } from "@/screens/RealmPicker";
import { CrashHistoryModal } from "@/screens/CrashHistoryModal"; import { CrashHistoryModal } from "@/screens/CrashHistoryModal";
@@ -100,13 +99,8 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
const [showDetails, setShowDetails] = useState(false); const [showDetails, setShowDetails] = useState(false);
const [pop, setPop] = useState<Population | null>(null); const [pop, setPop] = useState<Population | null>(null);
const [client, setClient] = useState<ClientInfo | null | undefined>(undefined); const [client, setClient] = useState<ClientInfo | null | undefined>(undefined);
const [dialog, setDialog] = useState<ClientDialogMode | null>(null); const [dialog, setDialog] = useState(false);
const clientStatus = useClientStatus(server.id).status;
const [playing, setPlaying] = useState(false); const [playing, setPlaying] = useState(false);
const job = useClientJob(server.id);
const jobBusy = job.phase === "scanning" || job.phase === "working";
const jobPct = job.step && job.step.total > 0 ? Math.min(100, Math.floor((job.step.done / job.step.total) * 100)) : 0;
const [keepMine, setKeepMine] = useState(true);
const [perf, setPerf] = useState<Performance | null>(null); const [perf, setPerf] = useState<Performance | null>(null);
const upd = useServerUpdate(server.id); const upd = useServerUpdate(server.id);
const visibleFailure = failure ?? upd.stateError ?? upd.uiError; const visibleFailure = failure ?? upd.stateError ?? upd.uiError;
@@ -166,10 +160,6 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
}, [server.id]); }, [server.id]);
const alive = useRef(true); const alive = useRef(true);
useEffect(() => {
if (job.phase === "done" || job.phase === "current") void api.clientInfo(server.id).then(setClient).catch(() => undefined);
}, [job.phase, server.id]);
const run = useCallback( const run = useCallback(
async (kind: Exclude<Action, null>) => { async (kind: Exclude<Action, null>) => {
setStopFailed(false); setStopFailed(false);
@@ -454,45 +444,13 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
)} )}
<div className="ml-auto flex max-w-full flex-wrap items-center justify-end gap-3"> <div className="ml-auto flex max-w-full flex-wrap items-center justify-end gap-3">
{client && <RealmlistMenu serverId={server.id} />} {client && <RealmlistMenu serverId={server.id} />}
{client && jobBusy ? ( {client ? (
<div
className="relative flex h-12 min-w-64 items-center overflow-hidden rounded-md border border-gold/50 bg-card-2"
role="progressbar"
aria-valuenow={jobPct}
aria-valuemin={0}
aria-valuemax={100}
aria-label={job.phase === "scanning" ? t("client.job.checking") : t("client.job.updating")}
>
<div className="absolute inset-y-0 left-0 bg-gold/35 transition-[width] duration-300" style={{ width: `${jobPct}%` }} />
<div className="relative z-10 flex min-w-0 flex-1 flex-col px-5 leading-tight">
<span className="text-sm font-semibold uppercase tracking-wide">{job.phase === "scanning" ? t("client.job.checking") : t("client.job.updating")}</span>
<span className="truncate text-xs text-muted">
{jobPct}%
{job.step && job.step.phase === "download" && job.step.bytes_per_sec > 0 ? ` · ${t("client.dl.speed", { speed: formatBytes(job.step.bytes_per_sec) })}` : ""}
</span>
</div>
<button
type="button"
onClick={() => stopClientJob(server.id)}
title={t("client.dl.cancel")}
aria-label={t("client.dl.cancel")}
className="relative z-10 flex h-full w-12 cursor-pointer items-center justify-center text-muted hover:text-ink"
>
<X className="h-4 w-4" aria-hidden />
</button>
</div>
) : client && (clientStatus?.update_available || job.phase === "choose") ? (
<SplitButton label={t("btn.play")}
primary={{ disabled: playing || job.phase === "choose", onClick: () => void startClientUpdate(server.id), children: t("btn.updateClient") }}
secondary={{ disabled: realmBusy || playing || upd.applying, onClick: () => void play(), children: <>{playing && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}{t("btn.playWithoutUpdate")}</> }}
/>
) : client ? (
<Button variant="primary" size="xl" disabled={realmBusy || playing} onClick={() => void play()} className="min-w-40"> <Button variant="primary" size="xl" disabled={realmBusy || playing} onClick={() => void play()} className="min-w-40">
{playing && <Loader2 className="h-5 w-5 animate-spin" aria-hidden />} {playing && <Loader2 className="h-5 w-5 animate-spin" aria-hidden />}
{t("btn.play")} {t("btn.play")}
</Button> </Button>
) : client === null ? ( ) : client === null ? (
<Button variant="secondary" size="xl" onClick={() => setDialog("setup")} className="min-w-40"> <Button variant="secondary" size="xl" onClick={() => setDialog(true)} className="min-w-40">
{t("btn.setupClient")} {t("btn.setupClient")}
</Button> </Button>
) : null} ) : null}
@@ -522,34 +480,6 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
{anyUp && !running && !transitioning && ( {anyUp && !running && !transitioning && (
<p className="mt-3 text-sm text-muted">{t("overview.partial")}</p> <p className="mt-3 text-sm text-muted">{t("overview.partial")}</p>
)} )}
{job.phase === "choose" && job.plan && (
<div className="mt-4 rounded-md border border-warn/40 bg-warn/5 p-3 text-sm">
<p className="font-medium">{t("client.upd.modifiedTitle", { n: job.plan.items.filter((i) => i.kind === "modified").length })}</p>
<p className="mt-1 text-muted">{t("client.upd.modifiedText")}</p>
<label className="mt-3 flex cursor-pointer items-center gap-2">
<input type="checkbox" checked={keepMine} onChange={(e) => setKeepMine(e.target.checked)} className="h-4 w-4 accent-[#c9a24a]" />
<span>{t("client.upd.keep")}</span>
</label>
<div className="mt-3 flex gap-2">
<Button size="sm" variant="primary" onClick={() => void syncClient(server.id, keepMine)}>{t("client.upd.start")}</Button>
<Button size="sm" variant="ghost" onClick={() => dismissClientJob(server.id)}>{t("client.upd.later")}</Button>
</div>
</div>
)}
{job.phase === "done" && <p className="mt-3 text-sm text-ok" role="status">{t("client.upd.done")}</p>}
{job.phase === "current" && <p className="mt-3 text-sm text-ok" role="status">{t("client.upd.upToDate", { v: job.plan?.version ?? "" })}</p>}
{job.phase === "stopped" && (
<p className="mt-3 flex items-center gap-3 text-sm text-muted" role="status">
{t("client.dl.cancelled")}
<Button size="sm" variant="ghost" onClick={() => void startClientUpdate(server.id)}>{t("client.dl.resume")}</Button>
</p>
)}
{job.phase === "failed" && job.error && (
<p className="mt-3 flex flex-wrap items-center gap-3 text-sm text-bad" role="alert">
{job.error.human.code === "unknown" ? job.error.technical : human(job.error.human).message}
<Button size="sm" variant="ghost" onClick={() => void startClientUpdate(server.id)}>{t("client.dl.retry")}</Button>
</p>
)}
{upd.result && "committed" in upd.result && !!upd.result.preexistingCharacters && <p className="mt-3 text-sm text-warn" role="status">{t("upd.preexistingCharacters", { n: upd.result.preexistingCharacters })}</p>} {upd.result && "committed" in upd.result && !!upd.result.preexistingCharacters && <p className="mt-3 text-sm text-warn" role="status">{t("upd.preexistingCharacters", { n: upd.result.preexistingCharacters })}</p>}
{upd.result && "committed" in upd.result && !!upd.result.modulesRebuilt?.length && <p className="mt-3 text-sm" role="status">{t("upd.modulesRebuilt", { list: upd.result.modulesRebuilt.join(", ") })}</p>} {upd.result && "committed" in upd.result && !!upd.result.modulesRebuilt?.length && <p className="mt-3 text-sm" role="status">{t("upd.modulesRebuilt", { list: upd.result.modulesRebuilt.join(", ") })}</p>}
{upd.result && "committed" in upd.result && upd.result.modulesOff?.map((m) => <p key={m.id} className="mt-3 text-sm text-warn" role="status">{t("upd.moduleOff", { id: m.id, reason: m.reason })}</p>)} {upd.result && "committed" in upd.result && upd.result.modulesOff?.map((m) => <p key={m.id} className="mt-3 text-sm text-warn" role="status">{t("upd.moduleOff", { id: m.id, reason: m.reason })}</p>)}
@@ -652,13 +582,11 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
{dialog && ( {dialog && (
<ClientDialog <ClientDialog
serverId={server.id} serverId={server.id}
mode={dialog} onClose={() => setDialog(false)}
onClose={() => setDialog(null)}
onChanged={() => { onChanged={() => {
void api.clientInfo(server.id).then(setClient).catch(() => setClient(null)); void api.clientInfo(server.id).then(setClient).catch(() => setClient(null));
void checkClient(server.id); void checkClient(server.id);
}} }}
onPlayAnyway={() => void play()}
/> />
)} )}
+5 -8
View File
@@ -1,9 +1,9 @@
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { Gauge, Globe, Settings, Swords } from "lucide-react"; import { Gauge, Globe, Settings, Swords } from "lucide-react";
import { api, asUiError, REMOTE_CLIENT_ID } from "@/lib/api"; import { api, asUiError, REMOTE_CLIENT_ID } from "@/lib/api";
import { checkClient, startClientPolling, useClientStatus } from "@/lib/clientUpdate"; import { checkClient, useClientStatus } from "@/lib/clientUpdate";
import { ClientCard } from "@/screens/ClientCard"; import { ClientCard } from "@/screens/ClientCard";
import { ClientDialog, type ClientDialogMode } from "@/screens/ClientDialog"; import { ClientDialog } from "@/screens/ClientDialog";
import { AboutCard } from "@/screens/AboutCard"; import { AboutCard } from "@/screens/AboutCard";
import { PortablePage } from "@/screens/PortablePage"; import { PortablePage } from "@/screens/PortablePage";
import { BrowsePage } from "@/screens/BrowsePage"; import { BrowsePage } from "@/screens/BrowsePage";
@@ -27,7 +27,7 @@ export function RemoteClient({ onHost }: { onHost: () => void }) {
const [error, setError] = useState<string | null>(null); const [error, setError] = useState<string | null>(null);
const [note, setNote] = useState<string | null>(null); const [note, setNote] = useState<string | null>(null);
const [revision, setRevision] = useState(0); const [revision, setRevision] = useState(0);
const [dialog, setDialog] = useState<ClientDialogMode | null>(null); const [dialog, setDialog] = useState(false);
const { status } = useClientStatus(REMOTE_CLIENT_ID); const { status } = useClientStatus(REMOTE_CLIENT_ID);
function fail(e: unknown) { function fail(e: unknown) {
const err = asUiError(e); const err = asUiError(e);
@@ -35,7 +35,6 @@ export function RemoteClient({ onHost }: { onHost: () => void }) {
} }
useEffect(() => { useEffect(() => {
void api.remoteConnection().then(p => { setHost(p.host); setSavedHost(p.host); }).catch(fail).finally(() => setLoading(false)); void api.remoteConnection().then(p => { setHost(p.host); setSavedHost(p.host); }).catch(fail).finally(() => setLoading(false));
return startClientPolling(REMOTE_CLIENT_ID);
}, []); // eslint-disable-line react-hooks/exhaustive-deps }, []); // eslint-disable-line react-hooks/exhaustive-deps
useEffect(() => { void checkClient(REMOTE_CLIENT_ID); }, [revision]); useEffect(() => { void checkClient(REMOTE_CLIENT_ID); }, [revision]);
@@ -52,8 +51,7 @@ export function RemoteClient({ onHost }: { onHost: () => void }) {
try { await api.play(REMOTE_CLIENT_ID); } catch (e) { fail(e); } finally { setBusy(false); } try { await api.play(REMOTE_CLIENT_ID); } catch (e) { fail(e); } finally { setBusy(false); }
} }
function play() { function play() {
if (!status?.linked) setDialog("setup"); if (!status?.linked) setDialog(true);
else if (status.update_available) setDialog("update");
else void launch(); else void launch();
} }
return <div className="flex h-full"> return <div className="flex h-full">
@@ -78,13 +76,12 @@ export function RemoteClient({ onHost }: { onHost: () => void }) {
</form> </form>
<p className="mt-3 text-sm text-muted">{t("remote.accountHint")}</p> <p className="mt-3 text-sm text-muted">{t("remote.accountHint")}</p>
<Button variant="primary" className="mt-4" disabled={loading || busy || !savedHost || host.trim() !== savedHost || status === null} onClick={play}>{t("btn.play")}</Button> <Button variant="primary" className="mt-4" disabled={loading || busy || !savedHost || host.trim() !== savedHost || status === null} onClick={play}>{t("btn.play")}</Button>
{status?.linked && status.update_available && <Button variant="secondary" className="mt-4 ml-3" disabled={loading || busy || !savedHost || host.trim() !== savedHost} onClick={() => void launch()}>{t("btn.playWithoutUpdate")}</Button>}
{note && <p className="mt-3 text-sm text-ok" role="status">{note}</p>} {note && <p className="mt-3 text-sm text-ok" role="status">{note}</p>}
{error && <p className="mt-3 text-sm text-bad" role="alert">{error}</p>} {error && <p className="mt-3 text-sm text-bad" role="alert">{error}</p>}
</Card> </Card>
<ClientCard key={revision} serverId={REMOTE_CLIENT_ID} remote /> <ClientCard key={revision} serverId={REMOTE_CLIENT_ID} remote />
</>} </>}
</main> </main>
{dialog && <ClientDialog serverId={REMOTE_CLIENT_ID} mode={dialog} onClose={() => setDialog(null)} onChanged={() => setRevision(n => n + 1)} onPlayAnyway={() => void launch()} />} {dialog && <ClientDialog serverId={REMOTE_CLIENT_ID} onClose={() => setDialog(false)} onChanged={() => setRevision(n => n + 1)} />}
</div>; </div>;
} }
+42 -5
View File
@@ -1,14 +1,25 @@
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { api, asUiError, type RestartSchedule } from "@/lib/api"; import { api, asUiError, type RestartSchedule, type Weekday } from "@/lib/api";
import { Card } from "@/components/ui/card"; import { Card } from "@/components/ui/card";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { useT } from "@/i18n"; import { useT } from "@/i18n";
/** A daily world restart at a chosen local time, with an in-game countdown (#202). */ const WEEKDAYS: Weekday[] = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
const DEFAULT_SCHEDULE: RestartSchedule = {
enabled: false,
time: "05:00",
warningMinutes: 5,
weeklyEnabled: false,
weeklyDay: "sunday",
weeklyTime: "05:00",
weeklyWarningMinutes: 5,
};
/** Daily and weekly world restarts at chosen local times, with an in-game countdown (#202). */
export function RestartScheduleSettings({ serverId }: { serverId: string }) { export function RestartScheduleSettings({ serverId }: { serverId: string }) {
const t = useT(); const t = useT();
const [saved, setSaved] = useState<RestartSchedule | null>(null); const [saved, setSaved] = useState<RestartSchedule | null>(null);
const [draft, setDraft] = useState<RestartSchedule>({ enabled: false, time: "05:00", warningMinutes: 5 }); const [draft, setDraft] = useState<RestartSchedule>(DEFAULT_SCHEDULE);
const [supported, setSupported] = useState(true); const [supported, setSupported] = useState(true);
const [busy, setBusy] = useState(false); const [busy, setBusy] = useState(false);
const [done, setDone] = useState(false); const [done, setDone] = useState(false);
@@ -29,6 +40,8 @@ export function RestartScheduleSettings({ serverId }: { serverId: string }) {
const changed = !!saved && JSON.stringify(saved) !== JSON.stringify(draft); const changed = !!saved && JSON.stringify(saved) !== JSON.stringify(draft);
const minutesOk = Number.isInteger(draft.warningMinutes) && draft.warningMinutes >= 1 && draft.warningMinutes <= 60; const minutesOk = Number.isInteger(draft.warningMinutes) && draft.warningMinutes >= 1 && draft.warningMinutes <= 60;
const weeklyMinutesOk = Number.isInteger(draft.weeklyWarningMinutes) && draft.weeklyWarningMinutes >= 1 && draft.weeklyWarningMinutes <= 60;
const valid = (!draft.enabled || minutesOk) && (!draft.weeklyEnabled || weeklyMinutesOk);
const input = "rounded border border-line bg-bg px-2 py-1 text-sm text-ink outline-none focus:border-gold"; const input = "rounded border border-line bg-bg px-2 py-1 text-sm text-ink outline-none focus:border-gold";
return <Card className="mt-6 p-6" aria-busy={busy}> return <Card className="mt-6 p-6" aria-busy={busy}>
<h2 className="font-semibold">{t("sched.title")}</h2> <h2 className="font-semibold">{t("sched.title")}</h2>
@@ -46,10 +59,34 @@ export function RestartScheduleSettings({ serverId }: { serverId: string }) {
<input type="number" min={1} max={60} step={1} className={`${input} w-20`} value={draft.warningMinutes} disabled={busy || !draft.enabled} onChange={e => { setDraft(d => ({ ...d, warningMinutes: Number(e.target.value) })); setDone(false); }} /> <input type="number" min={1} max={60} step={1} className={`${input} w-20`} value={draft.warningMinutes} disabled={busy || !draft.enabled} onChange={e => { setDraft(d => ({ ...d, warningMinutes: Number(e.target.value) })); setDone(false); }} />
</label> </label>
</div> </div>
<p className="mt-2 text-sm text-muted">{t("sched.hint")}</p>
<div className="mt-4 border-t border-line pt-4">
<label className="flex cursor-pointer items-center gap-3">
<input type="checkbox" className="h-4 w-4 accent-[#c9a24a]" checked={draft.weeklyEnabled} disabled={busy || !saved} onChange={e => { setDraft(d => ({ ...d, weeklyEnabled: e.target.checked })); setDone(false); }} />
<span className="text-sm font-medium">{t("sched.weeklyEnable")}</span>
</label>
<div className="mt-3 flex flex-wrap items-center gap-4 text-sm">
<label className="flex items-center gap-2">
<span>{t("sched.day")}</span>
<select className={input} value={draft.weeklyDay} disabled={busy || !draft.weeklyEnabled} onChange={e => { setDraft(d => ({ ...d, weeklyDay: e.target.value as Weekday })); setDone(false); }}>
{WEEKDAYS.map(day => <option key={day} value={day}>{t(`sched.days.${day}`)}</option>)}
</select>
</label>
<label className="flex items-center gap-2">
<span>{t("sched.time")}</span>
<input type="time" className={input} value={draft.weeklyTime} disabled={busy || !draft.weeklyEnabled} onChange={e => { setDraft(d => ({ ...d, weeklyTime: e.target.value })); setDone(false); }} />
</label>
<label className="flex items-center gap-2">
<span>{t("sched.warning")}</span>
<input type="number" min={1} max={60} step={1} className={`${input} w-20`} value={draft.weeklyWarningMinutes} disabled={busy || !draft.weeklyEnabled} onChange={e => { setDraft(d => ({ ...d, weeklyWarningMinutes: Number(e.target.value) })); setDone(false); }} />
</label>
</div>
</div>
<p className="mt-3 text-sm text-muted">{t("sched.hint")}</p>
{!supported && <p className="mt-2 text-sm text-warn">{t("sched.unsupported")}</p>} {!supported && <p className="mt-2 text-sm text-warn">{t("sched.unsupported")}</p>}
<div className="mt-3 flex items-center gap-3"> <div className="mt-3 flex items-center gap-3">
<Button size="sm" disabled={busy || !changed || (draft.enabled && !minutesOk)} onClick={() => void save()}>{t("sched.save")}</Button> <Button size="sm" disabled={busy || !changed || !valid} onClick={() => void save()}>{t("sched.save")}</Button>
{done && <span className="text-xs text-muted">{t("sched.saved")}</span>} {done && <span className="text-xs text-muted">{t("sched.saved")}</span>}
</div> </div>
{error && <p className="mt-3 text-sm text-bad" role="alert">{error}</p>} {error && <p className="mt-3 text-sm text-bad" role="alert">{error}</p>}
+138 -9
View File
@@ -1,26 +1,155 @@
import { useState } from "react"; import { useEffect, useState } from "react";
import { Card } from "@/components/ui/card"; import { Card } from "@/components/ui/card";
import { api, asUiError } from "@/lib/api"; import { Button } from "@/components/ui/button";
import { api, asUiError, type CleanLogsReport, type LogSettings, type ServerLoggingView } from "@/lib/api";
import { formatBytes } from "@/lib/utils";
import { useT } from "@/i18n"; import { useT } from "@/i18n";
const DEFAULT_LOG_SETTINGS: LogSettings = { autoCleanup: false, maxSizeMb: 500 };
export function ServerLoggingSettings({ serverId }: { serverId: string }) { export function ServerLoggingSettings({ serverId }: { serverId: string }) {
const t = useT(); const t = useT();
const [view, setView] = useState<ServerLoggingView | null>(null);
const [draft, setDraft] = useState<LogSettings>(DEFAULT_LOG_SETTINGS);
const [busy, setBusy] = useState(false); const [busy, setBusy] = useState(false);
const [saved, setSaved] = useState(false); const [saved, setSaved] = useState(false);
const [autoSaved, setAutoSaved] = useState(false);
const [cleanReport, setCleanReport] = useState<CleanLogsReport | null>(null);
const [error, setError] = useState(""); const [error, setError] = useState("");
async function apply(preset: "normal" | "errors" | "off") {
setBusy(true); setSaved(false); setError(""); useEffect(() => {
try { await api.serverLoggingPreset(serverId, preset); setSaved(true); } let alive = true;
catch (error) { setError(asUiError(error).technical); } void api.serverLoggingState(serverId)
finally { setBusy(false); } .then(v => {
if (!alive) return;
setView(v);
setDraft(v.settings);
})
.catch(err => {
if (alive) setError(asUiError(err).technical);
});
return () => { alive = false; };
}, [serverId]);
async function refreshState() {
const v = await api.serverLoggingState(serverId);
setView(v);
setDraft(v.settings);
} }
return <Card className="mt-6 p-6">
async function apply(preset: "normal" | "errors" | "off") {
setBusy(true); setSaved(false); setAutoSaved(false); setCleanReport(null); setError("");
try {
await api.serverLoggingPreset(serverId, preset);
await refreshState();
setSaved(true);
} catch (err) {
setError(asUiError(err).technical);
} finally {
setBusy(false);
}
}
async function saveAutoCleanup() {
setBusy(true); setSaved(false); setAutoSaved(false); setCleanReport(null); setError("");
try {
const v = await api.serverLoggingSettingsSave(serverId, draft);
setView(v);
setDraft(v.settings);
setAutoSaved(true);
} catch (err) {
setError(asUiError(err).technical);
} finally {
setBusy(false);
}
}
async function cleanNow() {
setBusy(true); setSaved(false); setAutoSaved(false); setCleanReport(null); setError("");
try {
const report = await api.serverLogsClean(serverId);
setCleanReport(report);
await refreshState();
} catch (err) {
setError(asUiError(err).technical);
} finally {
setBusy(false);
}
}
const changed = !!view && JSON.stringify(view.settings) !== JSON.stringify(draft);
const sizeOk = Number.isInteger(draft.maxSizeMb) && draft.maxSizeMb >= 10 && draft.maxSizeMb <= 100000;
const logBytes = view?.logBytes ?? 0;
const input = "rounded border border-line bg-bg px-2 py-1 text-sm text-ink outline-none focus:border-gold";
return <Card className="mt-6 p-6" aria-busy={busy}>
<h2 className="font-semibold">{t("serverLogs.title")}</h2> <h2 className="font-semibold">{t("serverLogs.title")}</h2>
<p className="mt-2 text-sm text-muted">{t("serverLogs.description")}</p> <p className="mt-2 text-sm text-muted">{t("serverLogs.description")}</p>
<div className="mt-4 flex flex-wrap gap-2"> <div className="mt-4 flex flex-wrap gap-2">
{(["normal", "errors", "off"] as const).map(preset => <button key={preset} disabled={busy} onClick={() => apply(preset)} className="rounded-md border border-line px-3 py-2 text-sm hover:bg-white/5 disabled:opacity-50">{t(`serverLogs.${preset}`)}</button>)} {(["normal", "errors", "off"] as const).map(preset => {
const active = view?.preset === preset;
return <button
key={preset}
disabled={busy}
aria-pressed={active}
onClick={() => void apply(preset)}
className={`rounded-md border px-3 py-2 text-sm disabled:opacity-50 ${active ? "border-gold bg-gold/10 text-gold" : "border-line hover:bg-white/5"}`}
>
{t(`serverLogs.${preset}`)}
</button>;
})}
</div> </div>
{saved && <p role="status" className="mt-3 text-sm text-ok">{t("serverLogs.saved")}</p>} {saved && <p role="status" className="mt-3 text-sm text-ok">{t("serverLogs.saved")}</p>}
<div className="mt-5 border-t border-line pt-4">
<label className="flex cursor-pointer items-center gap-3">
<input
type="checkbox"
className="h-4 w-4 accent-[#c9a24a]"
checked={draft.autoCleanup}
disabled={busy || !view}
onChange={e => { setDraft(d => ({ ...d, autoCleanup: e.target.checked })); setAutoSaved(false); }}
/>
<span className="text-sm font-medium">{t("serverLogs.autoClean")}</span>
</label>
<div className="mt-3 flex flex-wrap items-center gap-3 text-sm">
<label className="flex items-center gap-2">
<span>{t("serverLogs.maxSize")}</span>
<input
type="number"
min={10}
max={100000}
step={10}
className={`${input} w-24`}
value={draft.maxSizeMb}
disabled={busy || !draft.autoCleanup}
onChange={e => { setDraft(d => ({ ...d, maxSizeMb: Number(e.target.value) })); setAutoSaved(false); }}
/>
<span className="text-muted">MB</span>
</label>
<Button size="sm" disabled={busy || !changed || (draft.autoCleanup && !sizeOk)} onClick={() => void saveAutoCleanup()}>
{t("sched.save")}
</Button>
{autoSaved && <span role="status" className="text-xs text-ok">{t("sched.saved")}</span>}
</div>
<p className="mt-2 text-xs text-muted">{t("serverLogs.autoCleanHint")}</p>
</div>
<div className="mt-5 flex flex-wrap items-center justify-between gap-3 border-t border-line pt-4">
<span className="text-sm text-muted">
{t("serverLogs.currentSize", { size: formatBytes(logBytes) })}
</span>
<Button size="sm" disabled={busy || !view || logBytes === 0} onClick={() => void cleanNow()}>
{t("serverLogs.cleanNow", { size: formatBytes(logBytes) })}
</Button>
</div>
{cleanReport && (
<p role="status" className="mt-3 text-sm text-ok">
{t("serverLogs.cleaned", { freed: formatBytes(cleanReport.freedBytes) })}
{cleanReport.skippedFiles > 0 && ` ${t("serverLogs.skippedInUse", { remaining: formatBytes(cleanReport.remainingBytes) })}`}
</p>
)}
{error && <p role="alert" className="mt-3 text-sm text-bad">{error}</p>} {error && <p role="alert" className="mt-3 text-sm text-bad">{error}</p>}
</Card>; </Card>;
} }
+4 -8
View File
@@ -20,7 +20,7 @@ import { DashboardPage } from "@/screens/DashboardPage";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card"; import { Card } from "@/components/ui/card";
import { startServerUpdatePolling, useServerUpdate } from "@/lib/serverUpdate"; import { startServerUpdatePolling, useServerUpdate } from "@/lib/serverUpdate";
import { startClientPolling } from "@/lib/clientUpdate"; import { checkClient } from "@/lib/clientUpdate";
import type { UnsavedChangesGuard } from "@/lib/unsavedGuard"; import type { UnsavedChangesGuard } from "@/lib/unsavedGuard";
type Page = "overview" | "bots" | "dashboard" | "server" | "modules" | "players" | "characters" | "friends" | "backups" | "console" | "report" | "settings" | "migration"; type Page = "overview" | "bots" | "dashboard" | "server" | "modules" | "players" | "characters" | "friends" | "backups" | "console" | "report" | "settings" | "migration";
@@ -92,14 +92,10 @@ export function Shell(props: {
if (hiddenPages.includes(page)) setPage("overview"); if (hiddenPages.includes(page)) setPage("overview");
}, [hiddenPages, page]); }, [hiddenPages, page]);
// Look for a server and a game client update when the app starts and then every five minutes. // Look for a server update when the app starts and then every five minutes; note whether a game client is linked.
useEffect(() => { useEffect(() => {
const stopServer = startServerUpdatePolling(props.activeId); void checkClient(props.activeId);
const stopClient = startClientPolling(props.activeId); return startServerUpdatePolling(props.activeId);
return () => {
stopServer();
stopClient();
};
}, [props.activeId]); }, [props.activeId]);
return ( return (
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"version": "0.9.13", "version": "0.9.17",
"notes": [ "notes": [
"The custom races client is updated to Custom Races V2" "The game client link points to the new community site, conquestofazerothcore.to"
] ]
} }
+9 -216
View File
@@ -2,7 +2,7 @@
"components": { "components": {
"core": { "core": {
"repository": "Corfirean/azerothcore-wotlk-coa", "repository": "Corfirean/azerothcore-wotlk-coa",
"sha": "9740ced5c41806115d851ab37ab34f28e1e8b712" "sha": "30003e18ab44198ee6f2d819c3047bf6a80631f6"
}, },
"upstream": { "upstream": {
"repository": "jealous-sound/azerothcore-wotlk-coa", "repository": "jealous-sound/azerothcore-wotlk-coa",
@@ -10,7 +10,7 @@
}, },
"bots": { "bots": {
"repository": "Corfirean/mod-coa-playerbots", "repository": "Corfirean/mod-coa-playerbots",
"sha": "30a5a555f56fda8f4ccad14be8438bd0532d85b9" "sha": "178a7fde6abe1c3c8813d338073b2c83835da497"
}, },
"scaling": { "scaling": {
"repository": "Corfirean/mod-coa-content-scaling", "repository": "Corfirean/mod-coa-content-scaling",
@@ -18,7 +18,7 @@
}, },
"build": { "build": {
"repository": "Corfirean/coa-server-build", "repository": "Corfirean/coa-server-build",
"sha": "9a122d049e8be457444389e9756936bcdb4e7ef5" "sha": "087ca17c4eb2c0ef218d84dd77f37263ee4ed7ee"
}, },
"squid": { "squid": {
"repository": "Zyth45/mod-playerbots", "repository": "Zyth45/mod-playerbots",
@@ -32,218 +32,11 @@
} }
}, },
"notes": [ "notes": [
"Test build of the subclass module for two-headed Ogres", "Custom races stay on when an update changes the race catalog",
"Thin Twins can earn a subclass through their own quest, the Bravery Badge", "Server support for companion bots on Wildcard and Warcraft Reborn",
"A two-headed Ogre's ranged subclass can shoot at point-blank range", "Custom-race characters stay out of the world while custom races are off",
"Ogres have a new racial, Tolerance", "Companion bots play Wildcard and Warcraft Reborn",
"Standard-class Ogres and Thin Humans start with only their own class kit", "Stopping the server no longer leaves the world running now and then",
"Helmets sit on the Thin Human's head instead of his chest", "The server includes a native launcher for the world supervisor"
"LiveMon shows live damage, healing, crowd control and subclass combo statistics",
"Standard-class Ogres and Thin Twins can take a CoA class as their subclass",
"Thin Human and Two-Headed Ogre are now their own playable races",
"Subclassed relic users can hold a relic beside a ranged weapon",
"Server options to limit subclassing or turn the two subclass races off",
"A standard subclass brings its whole basic kit, skills and weapons",
"Two-Headed Ogres and Thin Humans with a standard class can now pick a subclass",
"Thin Humans find more gold with the Hand-Me-Downs racial",
"Two-Headed Ogres wear helmets on both heads",
"Flying mounts no longer fly in Kalimdor and the Eastern Kingdoms",
"LiveMon's character tab can be closed and goes away for deleted characters",
"Classic classes can be limited to their Wrath of the Lich King abilities",
"Dual Wield shows once in the spellbook",
"Two-Headed Ogres get Subclass Bar 1 for the other head's spells",
"Subclass forms leave Two-Headed Ogres in their own body and turn the twin brother instead",
"CoA subclass trees show their specialization painting in the subclass tab",
"Characters with a subclass no longer get Dual Specialization",
"You can hold only one subclass book and one insight at a time",
"Thin Humans and Two-Headed Ogres get the quests of their starting zone",
"The Bravery Badge and the Book of Origins look and read like a badge and a book",
"Ghost Wolf and Travel Form turn the whole ogre, and the twin brother rides the beast",
"Standard-class mains can spend points in their subclass trees and reset main talents",
"Your subclass's trainer can reset only your subclass talents",
"The Thin Human's cape lies along his back instead of sticking out like a board",
"The twin brother finishes pointing before hopping off and readies his weapon with you",
"The twin brother fights with his melee weapon up close and sits close behind you on mounts",
"The twin brother copies your pose on hover discs, carpets and other unusual mounts",
"Two-Headed Ogres sit in cars and keep their mace drawn after a shot",
"Two-Headed Ogres fight with a weapon in one hand and a gun in the other",
"The Ogre's Agree or Disagree racial now shows what it will do next",
"The Thin Twins' brother turns into a worgen in every subclass Cursed Form",
"Leaps and charges ordered for the Thin Twins' brother move him instead of you",
"CoA classes taken as a subclass get their class mechanics",
"Thin Twins and Two-Headed Ogres keep their weapons in a subclass Cursed Form",
"Hovering a Guardian standard no longer causes a Lua error",
"LiveMon shows specialization names instead of their signature spells",
"Ogre eyes are picked by colour, with a Blind checkbox for each eye",
"Two-headed ogres no longer keep casting after a subclass spell with a cast time",
"Two-headed ogres cast every subclass spell with the left arm",
"The other half only shoots when you attack a target out of melee reach",
"The other head raises her hand while casting and your presses come first",
"Saving talent changes no longer fails for characters with a subclass",
"The second-way quest no longer pops up at level 20",
"Every race can create the standard classes the creation screen offers again",
"Subclass Bar 1 shows cooldowns, charges and casts like a normal action bar",
"Subclass Bar 1 refills itself when you change subclass",
"Subclass Bar 1 appears as soon as you choose a subclass",
"Subclass Bar 1 works like an action bar and can live in Bartender4",
"A subclass can never be the character's own class",
"New characters no longer inherit the subclass of a deleted character",
"Sun Cleric, Barbarian, Bloodmage and Cultist subclass resources use the game's own orbs",
"Shapeshifting no longer takes away the twin brother or the subclass",
"A subclass specialization now teaches the ability its passive promises",
"Subclass stances and forms appear only on the subclass stance bar",
"Subclass vows, auras and formations move to the subclass stance bar",
"The Thin Human's cape rests on his shoulders and moves with them",
"The twin brother gets a real spot in cars and rides along in passenger seats",
"The twin brother puts his weapons away while he wears a subclass shape",
"The Thin Twins' brother now shows the flash and glow of subclass forms",
"The twin brother sneaks along in stealth instead of staying behind",
"The stance button takes a Thin Twin out of a form his brother wears again",
"The Two-Head and Two-Thins tabs show one wide background and the right class icon",
"The Two-Head and Two-Thins trees use the game's own talent nodes",
"Agree or Disagree takes one spellbook slot that changes name and icon",
"Subclass talent trees no longer let you spend more points than you have",
"Your brother stays at your side when you melee with a bow equipped",
"A melee brother stays on your target and keeps fighting",
"The Two-Headed Ogre twists her body less while her other head casts",
"Thin Twins and Two-Headed Ogres are Hero Races that need a level 60 character",
"The Two-Headed Ogre's portrait shows both heads instead of her body",
"Your other half's spells break your stealth, and Running Wild ends when you stealth",
"Spells your other half casts now trigger the class's talents and resources",
"Your other half takes the subclass's Cat, Bear and stance forms on their own",
"Your other head or brother can no longer finish a cast while you run",
"The other head's hand glows while she casts",
"With Play Easy on, your other half uses abilities that cost health",
"New racial passives explain the shared and split resource pools",
"The dressing room works for races without their own background, no extra addon needed",
"Your brother climbs onto your Travel Form or wolf even after a fight",
"When your brother uses Running Wild, you ride on his back",
"In Running Wild you ride on your brother's shoulders",
"Your weapons no longer go missing after a Running Wild ride",
"When both halves use the same resource, their pool is twice as big",
"The subclass window shows every CoA class's own background at full strength",
"You can rearrange Subclass Bar 1 during combat without an error",
"Your other head or brother has a cast bar of their own",
"Choice talents in the subclass window show as one node with two options",
"SpellActivationOverlay can light up Subclass Bar 1",
"Your subclass's resource now shows as an extra bar under your portrait",
"Your other half's resource bar keeps its value when you log out and back in",
"Rage, energy and runic power subclasses now get and use their resource",
"Subclass resource orbs only appear when your subclass specialization can fill them",
"Your subclass specialization comes with its first class talent learned",
"Your main class's key stat now also powers your subclass",
"Subclass talents follow the paths and point requirements of their tree",
"Your summons follow your brother while he walks beside you",
"Your brother rides on the back of your Travel Form cat and moves with it",
"Dressing your twin in the wardrobe no longer causes an addon error",
"Your brother rides on your back in Wargstride",
"A Bloodmage subclass's Cursed Form no longer replaces your own action bar",
"Pressing an active subclass stance or form again turns it off",
"Character select shows your subclass under your class",
"The Two-Headed Ogre's second head no longer pokes through hats",
"Two-Headed Ogres keep aiming between shots instead of idling",
"Two-Headed Ogres who shoot rest their gun on the shoulder when not firing",
"Two-Headed Ogres who shoot themselves aim and fire their gun with the right hand",
"Two-Headed Ogres who shoot fire their bullets from the gun hand",
"The wardrobe shows a Two-Headed Ogre's applied look and her saved outfits apply again",
"The second head's quest mark floats over her head in cities and inns",
"Subclass Bar 1 no longer fills up with Throw, Shoot, Wand and Auto Attack",
"Abilities you learn from your subclass no longer land on your own action bars",
"A caster Two-Headed Ogre keeps her staff in hand while her second head shoots",
"A Two-Headed Ogre's staff keeps its size when she puts it on her back",
"A shooting subclass starts Auto Shot on right-click without logging out first",
"A Hunter subclass keeps Auto Shot going while the main head casts or moves",
"Weapons and armor from a subclass stay usable after logging in again",
"Two-Headed Ogres are Horde again and Thin Twins share Forgotten race rules",
"Thin Humans and Two-Headed Ogres can no longer be created as Hero",
"The Two-Headed Ogre stays in her combat stance between attacks",
"The second-head tab only shows for Two-Headed Ogres and Thin Twins",
"Thin Twins capes no longer show their inside at the shoulders",
"Thin Twins keep short hair under hats",
"Thin Twins keep their face, cape and hat fit with CoA Custom 1.9.2",
"Thin Twins show their class gear in character creation",
"Two-Headed Ogre capes drape over her back",
"CoA Custom 1.9.5 races work on the subclass server",
"With Play easy, cowboy the brother leaves a spent timed form",
"The Two-Headed Ogre casts with a raised fist before her face",
"The second-head client patch is now patch-ZZZZT.MPQ",
"Dual Wield shows once in the spellbook, whichever class teaches it",
"The subclass addon keeps working when the Twins or Ogre are renamed",
"The subclass name shows only on the character tab",
"The Thin Twins' Accursed brother keeps his distance until he takes his cursed form",
"The Thin Twins' brother follows a form's cost, cooldown and duration",
"The Thin Twins' own mana bar no longer flickers",
"Witch Hunter Vault now springs over in a handspring instead of a jump",
"The Twins brother keeps his timed form and no longer takes forms a spell forbids",
"The Twins brother faces his target, leaps in and leaves a form to heal you",
"With Play easy, cowboy, the brother uses his timed forms in a fight",
"Original races no longer look broken in the 64-bit client's character creation",
"Subclasses get their specialization's free passives, like the Pyromancer's draconic form",
"The subclass cast bar no longer gets stuck and can always be Alt-dragged",
"Pick-one talents in the subclass window no longer overlap their neighbours",
"Subclass spells get their rank upgrades, resources and class mechanics",
"Subclass talents that replace a spell now replace it for the subclass too",
"The Thin Twins keep their own hairstyle under hats",
"The Twins brother takes the look of the cursed form he actually uses",
"The Twins brother stands beside you at character select in his own clothes",
"The Twins brother climbs down from your back before taking a form",
"Spells the Twins brother casts no longer play a cast animation on you",
"The Thin Twins brother is now your mirror image",
"The Thin Twins brother can have his own face, hair style and beard",
"A script builds the original races' Vault patches from your own client files",
"The subclass client patch is now built after the release's own patches",
"The mirrored Thin Twins brother is built from the current Thin Twins model",
"Pressing your subclass mount again dismounts you",
"Removing a subclass dismisses the pet it let you summon",
"Removing a Warlock or Paladin subclass no longer unlearns your mounts",
"Removing a subclass no longer leaves its spells in your spellbook",
"A Starcaller subclass shows Lunar Phase as CoA's moon",
"Your twin's or other head's pet gets its own movable pet bar",
"A Ranged Head stands still while the Melee Head is offline",
"A bot plays the missing head of a Two-Players ogre",
"A Ranged Head keeps an echo of its deleted Melee Head's gear",
"Two-Players ogres hold books, pouches and orbs forward in the off hand",
"Two-Players ogres can pair up as Melee Head and Ranged Head",
"Paired Two-Players heads share one body",
"SquidBots Lite no longer prints \"Command 'dc status' does not exist\" at login",
"The subclass action bar no longer causes a blocked-action error in combat",
"Two-Players heads split their abilities into melee for the body and ranged for the rider",
"Two-Players heads gain Agree or Disagree stacks when they fight together",
"Two-Players heads can only be CoA classes",
"The Ranged Head's gear slots are frozen in ice and can no longer be dragged",
"Two-Players heads find the abilities they borrow on their own bar",
"Two-Players ogres can Bonk Heads! together once the heads have agreed long enough",
"Abilities lent between Two-Players heads follow each head's respecs and new spells",
"Two-Players ogres can use Mutate Me! to take the eyes-everywhere look and back",
"A Two-Players ogre fills one party spot and enters dungeons as one player",
"A Two-Players ogre joins a party only when there is room for both heads",
"A Ranged Head's own frame now stands for the shared Two-Players body",
"The Two-Players Ranged Head shares the body's health and both heads get full kill XP",
"The Two-Players Ranged Head shares the body's gear",
"Two-Players heads split quest gold, share one resource pool and keep their head's specs",
"Mobs attacked by the Two-Players Ranged Head now fight the body",
"Two-Players Twins: the second brother rides piggyback on the first, visible as himself",
"Bot plans panel shows what your group's bots are doing and lets you pick their next quest",
"Questing bots do all their quests in one area before moving on",
"The Twins' second brother keeps and wears his own gear on his brother's back",
"A Two-Players twin can call his brother to his side until another player joins him",
"Agree now raises spell and ranged hit too, not only melee hit",
"Two-Players ogres drop their mount when either head attacks",
"The other head's abilities now go on your own action bars",
"A bot body keeps questing, looting and resting after a fight instead of standing still",
"A bot body's SquidBots menu now opens from a button on your own player frame",
"Character select shows a Two-Players head's joined name and its partner's class",
"The Ranged Head now goes into and out of Dungeon Finder dungeons with the body",
"Two-Players can be switched off with Subclass.TwoPlayers.Enable",
"The other head's abilities only cost you resources when they actually go off",
"Character select shows a Two-Players ogre in his Mutate Me look",
"The Ranged Head gets the enchant, gem and suffix stats of the shared gear",
"The Ranged Head of a Two-Headed Ogre no longer pops out of the body at logout",
"A Ranged Head and its bot body are in one party again, so party chat and bot orders work",
"A bot riding as the Ranged Head no longer rests, roams or makes the body sit down",
"The character sheet of a Two-Players head shows the other head's class",
"Two-Players Ogres can fit a carried mount in a window and share the fit",
"Custom Races V2 with 17 new races, subclasses and the Fading Island",
"Updated Custom Races to 2.0"
] ]
} }