Compare commits

...
Author SHA1 Message Date
ДмитрийandClaude Sonnet 5.5 af82963f35 feat: open firewall ports for every running world and list every realm publicly
- Starting a server that is open to friends adds the firewall rules for the
  world ports of all realms that start together (only missing ones; a refused
  Windows prompt does not undo the start).
- Settings shows one public-listing block per realm that starts together. The
  main realm keeps its plain local id, so an existing listing is untouched.
- A realm that runs as an extra world is reached through that world's own
  console port, so its listing reports its own state and capabilities.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 15:29:09 +05:00
ДмитрийandClaude Sonnet 5.5 321ac597ce feat: start Wildcard and Warcraft Reborn together with Conquest of Azeroth
Settings gets two options, one per extra realm; turning on both runs all
three realms. Each extra world keeps its own folder, configs, logs and
ports (multiworld now handles a set of worlds instead of one second world),
and Warcraft Reborn gets its own status card, realm list entry and firewall
rule.

Starting a server also sets CoA.ClassModel of the realm chosen on Overview
to exactly that realm's model, so the shipped "coa wcr" default no longer
shows two class models on a Conquest of Azeroth realm.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 13:09:14 +05:00
Corfirean 925a81f4f2 Merge pull request #164 from Corfirean/feat/custom-races-report-target
Add Custom Races and Content Scaling report destinations
2026-10-27 11:02:46 +05:00
Corfirean df1901ea90 Merge pull request #163 from Corfirean/fix/issue-153-skill-controls
Add profession and defense skill gain controls
2026-10-27 10:28:06 +05:00
Corfirean 569d5fffc4 Merge pull request #162 from Corfirean/fix/issue-158-persistent-lan
Restore LAN realm addresses in Internet sharing mode
2026-10-27 10:28:02 +05:00
Дмитрий 7888dbc763 feat(reports): add separate Content Scaling destination 2026-10-27 10:25:10 +05:00
Дмитрий f0e8a8c12f feat(reports): add Custom Races upstream destination 2026-10-27 09:13:34 +05:00
Дмитрий af5a9717d4 feat(config): expose profession and defense skill gains (#153) 2026-10-27 08:38:08 +05:00
Дмитрий bf2fffcffa fix(friends): restore LAN realm address after restart (#158) 2026-10-27 08:34:02 +05:00
Дмитрий 4a99dd3a6a docs: review Manager 0.8.2 release history 2026-10-27 08:01:37 +05:00
github-actions[bot] 306003b698 Update published Manager changelog 2026-10-27 02:58:39 +00:00
Corfirean d9be2b9d82 Merge pull request #161 from Corfirean/prepare/races-192-20261026
Prepare CoA Custom 1.9.2 clients and preserve server migration order
2026-10-27 07:58:04 +05:00
Дмитрий 81b040ef02 Preserve database migration introduction order across merge commits 2026-10-27 00:30:08 +05:00
Дмитрий 5fdee1d658 Prepare matching CoA Custom 1.9.2 client installation 2026-10-26 23:14:39 +05:00
Дмитрий 4e1f548012 Retain the experimental portable-character notice in Manager 0.8.1 2026-10-25 18:04:13 +05:00
github-actions[bot] b3ee94071d Update published Manager changelog 2026-10-25 13:02:58 +00:00
Corfirean 76dc7452de Merge pull request #157 from Corfirean/prepare/races-191-20261025
Prepare CoA Custom 1.9.1 client installation for the new server
2026-10-25 18:02:16 +05:00
Дмитрий 02e3a9e4e6 Validate nested client assets and retain previous split-release hashes 2026-10-25 11:55:24 +05:00
Дмитрий 8addc97bc5 Prepare compatible CoA Custom 1.9.1 client installation 2026-10-25 11:41:15 +05:00
github-actions[bot] 57807b9769 Update published Manager changelog 2026-10-24 14:50:03 +00:00
Corfirean 7e29a9f2ec Keep the experimental portable-character notice in Manager 0.8.0 notes 2026-10-24 19:49:46 +05:00
github-actions[bot] af9f148889 Update published Manager changelog 2026-10-24 14:27:27 +00:00
Corfirean 92385cf569 Merge pull request #152 from Corfirean/fix/portable-host-activation-20261024
Prepare core portable sessions when the owner enables access
2026-10-24 16:46:12 +05:00
Дмитрий b00e732c7f fix(portable): reject occupied world ports across platforms 2026-10-24 16:37:52 +05:00
Дмитрий 594bdee594 fix(portable): prepare effective core configuration on owner opt-in 2026-10-24 16:32:55 +05:00
Corfirean d4408a0e92 Merge pull request #151 from Corfirean/integrate/complete-release-20261024
Prepare Manager 0.8.0 with rulesets, portable access and relay fixes
2026-10-24 11:19:40 +05:00
73 changed files with 1786 additions and 253 deletions

No files matched your search

+30
View File
@@ -8,6 +8,36 @@ 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.
## 0.8.2 — 2026-10-27
**Portable Characters are experimental and may contain bugs.**
- Installs the verified CoA Custom 1.9.2 client patches and quest safety addon, while recognizing existing 1.9.1 installations.
- Server updates preserve the order of database migrations introduced during merges, preventing older snapshots from overwriting newer progression.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.8.2) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.8.1...v0.8.2)
## 0.8.1 — 2026-10-25
**Portable Characters are experimental and may contain bugs.**
- Install the matching CoA Custom 1.9.1 client files.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.8.1) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.8.0...v0.8.1)
## 0.8.0 — 2026-10-24
**Portable Characters are experimental and may contain bugs.**
- Server owners can allow portable characters per realm.
- Allowing portable characters also prepares the server for portable sessions.
- Managers stay compatible with the public connection service.
- Relay connections recover and use the ports of the installed server.
- Portable progress resumes after reconnecting or restarting the Manager.
- Older copies on another host may require maintenance before returning.
[Release](https://github.com/Corfirean/coa-server-manager/releases/tag/v0.8.0) · [Source changes](https://github.com/Corfirean/coa-server-manager/compare/v0.7.3...v0.8.0)
## 0.7.3 — 2026-10-23
**Portable Characters are experimental and may contain bugs.**
Generated
+3 -3
View File
@@ -586,7 +586,7 @@ dependencies = [
[[package]]
name = "coa-core"
version = "0.8.0"
version = "0.8.2"
dependencies = [
"base64 0.22.1",
"chrono",
@@ -634,7 +634,7 @@ dependencies = [
[[package]]
name = "coa-release"
version = "0.8.0"
version = "0.8.2"
dependencies = [
"chrono",
"coa-core",
@@ -643,7 +643,7 @@ dependencies = [
[[package]]
name = "coa-server-manager"
version = "0.8.0"
version = "0.8.2"
dependencies = [
"coa-control-proto",
"coa-core",
+1 -1
View File
@@ -4,7 +4,7 @@ members = ["crates/coa-core", "crates/coa-release", "crates/coa-registry-proto",
exclude = ["services/coa-registry", "services/coa-registry-e2e", "services/coa-coordinator", "services/coa-relay"]
[workspace.package]
version = "0.8.0"
version = "0.8.2"
edition = "2021"
license = "AGPL-3.0-only"
@@ -0,0 +1,7 @@
---
area: manager
type: fixed
audience: admins
title: Allowing portable characters also prepares the server for portable sessions
---
Stop the server before enabling access for the first time. The Manager enables portable sessions in the effective module configuration and preserves the required database setting across restarts. Existing configuration is backed up.
+7
View File
@@ -0,0 +1,7 @@
---
area: client
type: changed
audience: players
title: Install the matching CoA Custom 1.9.1 client files
---
The races installer verifies and installs all five client archives, including the new races and appearance corrections.
+7
View File
@@ -0,0 +1,7 @@
---
area: manager
type: changed
audience: players
title: Install the CoA Custom 1.9.2 client patches
---
Installs the updated Hozen and Centaur assets and quest safety addon. Existing CoA Custom 1.9.1 installations remain recognized when updating or removing patches.
@@ -0,0 +1,7 @@
---
area: manager
type: added
audience: admins
title: Report Content Scaling problems directly to its repository
---
The report form now includes a separate Content Scaling destination.
@@ -0,0 +1,7 @@
---
area: manager
type: added
audience: admins
title: Send custom race problem reports directly to their maintainer
---
The report form now includes Custom Races as a separate destination.
@@ -0,0 +1,7 @@
---
area: manager
type: fixed
audience: admins
title: Internet sharing restores the LAN address after server restarts
---
Friends on the local network receive the server's LAN address and network mask while internet players keep using its public address.
@@ -0,0 +1,7 @@
---
area: manager
type: fixed
audience: admins
title: Server updates preserve the order of database migrations added during merges
---
Older database snapshots no longer run after newer updates when preparing server packages. This prevents outdated Manastorm reward ranges from overwriting newer progression data.
@@ -0,0 +1,7 @@
---
area: manager
type: fixed
audience: admins
title: Public listing offers every realm that starts together, not just the main one
---
With Wildcard or Warcraft Reborn started next to Conquest of Azeroth, Settings now has one listing block per realm, each with its own name, description and access options.
@@ -0,0 +1,7 @@
---
area: manager
type: added
audience: admins
title: Configure profession and defense skill gains in server settings
---
Advanced rate settings now include prospecting and milling skill gains, plus the points gained from crafting, defense and gathering.
@@ -0,0 +1,7 @@
---
area: manager
type: fixed
audience: admins
title: Starting a server sets the character classes of the realm chosen on Overview
---
A new Conquest of Azeroth server could show two class models, or none, on the character creation screen. The Manager now sets the model of the chosen realm before every start.
@@ -0,0 +1,7 @@
---
area: manager
type: added
audience: admins
title: Start Wildcard and Warcraft Reborn together with Conquest of Azeroth
---
Settings now has two options, one for Wildcard and one for Warcraft Reborn. Turn on either one, or both to run all three realms at once, each with its own characters and port.
+58 -1
View File
@@ -129,7 +129,16 @@
"Corfirean/coa-server-manager:20261023-shared-addons-links.md",
"Corfirean/coa-server-manager:20261023-time-is-time-settings.md",
"Corfirean/coa-server-manager:20261023-update-check-database-timeout.md",
"Corfirean/coa-server-manager:20261024-portable-schema-nine.md"
"Corfirean/coa-server-manager:20261024-portable-admission.md",
"Corfirean/coa-server-manager:20261024-portable-owner-core-activation.md",
"Corfirean/coa-server-manager:20261024-portable-schema-nine.md",
"Corfirean/coa-server-manager:20261024-relay-authentication.md",
"Corfirean/coa-server-manager:20261024-relay-recovery.md",
"Corfirean/coa-server-manager:20261024-remote-progress.md",
"Corfirean/coa-server-manager:20261024-remote-refresh.md",
"Corfirean/coa-server-manager:20261025-custom-races-191.md",
"Corfirean/coa-server-manager:20261026-custom-races-192.md",
"Corfirean/coa-server-manager:20261027-merged-database-migration-order.md"
],
"releases": [
{
@@ -664,6 +673,54 @@
"portable-characters"
],
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.7.2...v0.7.3"
},
{
"tag": "v0.8.0",
"version": "0.8.0",
"date": "2026-10-24",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.8.0",
"notes": [
"Server owners can allow portable characters per realm",
"Allowing portable characters also prepares the server for portable sessions",
"Managers stay compatible with the public connection service",
"Relay connections recover and use the ports of the installed server",
"Portable progress resumes after reconnecting or restarting the Manager",
"Older copies on another host may require maintenance before returning"
],
"commit": "b00e732c7f53f33680aaf6bd520da64b70b26a5a",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.7.3...v0.8.0",
"experimentalFeatures": [
"portable-characters"
]
},
{
"tag": "v0.8.1",
"version": "0.8.1",
"date": "2026-10-25",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.8.1",
"notes": [
"Install the matching CoA Custom 1.9.1 client files"
],
"commit": "02e3a9e4e66870a627feeb0b4d3ec2d75a23973d",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.8.0...v0.8.1",
"experimentalFeatures": [
"portable-characters"
]
},
{
"tag": "v0.8.2",
"version": "0.8.2",
"date": "2026-10-27",
"url": "https://github.com/Corfirean/coa-server-manager/releases/tag/v0.8.2",
"notes": [
"Installs the verified CoA Custom 1.9.2 client patches and quest safety addon, while recognizing existing 1.9.1 installations",
"Server updates preserve the order of database migrations introduced during merges, preventing older snapshots from overwriting newer progression"
],
"commit": "81b040ef02763c7cf7a3a3da1424b73177e9d433",
"compare": "https://github.com/Corfirean/coa-server-manager/compare/v0.8.1...v0.8.2",
"experimentalFeatures": [
"portable-characters"
]
}
]
}
+26
View File
@@ -2,6 +2,7 @@
pub mod merge;
pub mod parser;
pub mod portable;
pub mod schema;
use std::collections::{BTreeMap, BTreeSet};
@@ -1033,6 +1034,31 @@ Spellbook.New = 5
assert!(v.drift_keys.is_empty());
}
#[test]
fn skill_controls_persist_and_reject_invalid_gains() {
let (_d, root, meta) = fixture();
let changes = BTreeMap::from([
("SkillChance.Prospecting".into(), json!(true)),
("SkillChance.Milling".into(), json!(true)),
("SkillGain.Crafting".into(), json!(3)),
("SkillGain.Defense".into(), json!(4)),
("SkillGain.Gathering".into(), json!(5)),
]);
let report = save(&root, &meta, Scope::Server, &changes).unwrap();
assert_eq!(report.changed.len(), 5);
assert_eq!(report.restart, Some(Restart::World));
for path in ["Settings/worldserver.conf.template", "Core/configs/worldserver.conf"] {
let conf = load_conf(&root.join(path)).unwrap();
for (key, expected) in [("SkillChance.Prospecting", "1"), ("SkillChance.Milling", "1"), ("SkillGain.Crafting", "3"), ("SkillGain.Defense", "4"), ("SkillGain.Gathering", "5")] {
assert_eq!(conf.get(key), Some(expected));
}
assert_eq!(conf.get("Unknown.Custom"), Some("\"keep me\""));
}
for value in [json!(-1), json!(1.5), json!(451)] {
assert!(save(&root, &meta, Scope::Server, &BTreeMap::from([("SkillGain.Crafting".into(), value)])).is_err());
}
}
#[test]
fn creature_rates_save_independently_in_template_and_active_config() {
let (_d, root, meta) = fixture();
+175
View File
@@ -0,0 +1,175 @@
//! Prepare the core side of the owner's portable-character opt-in.
use std::{fs, path::Path};
use super::{parser::ConfFile, take_snapshot, targets, Scope};
use crate::{fsx, Error, Result};
/// Configuration is changed only while the world is stopped. Disabling admission is
/// handled by the control service and must not disable an active session's core.
pub fn enable(root: &Path) -> Result<()> {
let meta = crate::registry::metadata_dir_for(root)?;
let _lock = crate::update::operation_lock_for(&meta, "configuring portable characters", false)?;
let module = root.join("Core/configs/modules/coa.conf");
let module_source = if module.is_file() {
module.clone()
} else {
root.join("Core/configs/modules/coa.conf.dist")
};
let bytes = fs::read(&module_source).map_err(|_| Error::Invalid(
"Update this server before enabling portable characters; its portable configuration is missing.".into()
))?;
let mut conf = ConfFile::parse_bytes(&bytes)?;
if conf.get("PortableSession.Enable").is_none() {
return Err(Error::Invalid("Update this server before enabling portable characters; its core configuration has no portable session support.".into()));
}
let mut writes = Vec::new();
if conf.get("PortableSession.Enable").map(str::trim) != Some("1")
|| conf.get("PortableImport.JobDir").map(str::trim) != Some("\"PortableImport\"")
|| !module.is_file()
{
conf.set(
"PortableSession.Enable",
"1",
&["Enabled by the realm owner's portable-character opt-in"],
);
conf.set(
"PortableImport.JobDir",
"\"PortableImport\"",
&["Shared working directory for the core and Manager"],
);
writes.push((
module.clone(),
module.is_file().then(|| bytes.clone()),
conf.to_text(),
));
}
for path in targets(root, Scope::Server)?.writes {
let bytes = fs::read(&path)?;
let mut conf = ConfFile::parse_bytes(&bytes)?;
if conf.get("CharacterDatabase.WorkerThreads").map(str::trim) != Some("1") {
conf.set(
"CharacterDatabase.WorkerThreads",
"1",
&["Portable sessions require ordered character database transactions"],
);
writes.push((path, Some(bytes), conf.to_text()));
}
}
if writes.is_empty() {
fs::create_dir_all(root.join("Core/PortableImport"))?;
return Ok(());
}
let observed = crate::process::observe(root, &crate::layout::read_ports(root));
if observed.world.state != crate::process::ServiceState::Stopped
|| observed.world.conflict.is_some()
|| std::net::TcpStream::connect_timeout(
&std::net::SocketAddr::from(([127, 0, 0, 1], crate::layout::read_ports(root).world)),
std::time::Duration::from_millis(100),
)
.is_ok()
|| crate::multiworld::is_running(root)
{
return Err(Error::Invalid("Stop this server, then enable portable characters and save again. The Manager must configure the core before its next start.".into()));
}
let originals = writes
.iter()
.filter_map(|(p, old, _)| old.clone().map(|bytes| (p.clone(), bytes)))
.collect::<Vec<_>>();
take_snapshot(
&meta,
Scope::Server,
"before enabling portable characters",
&originals,
)?;
for (index, (path, _, text)) in writes.iter().enumerate() {
if let Err(error) = fsx::atomic_write(path, text.as_bytes()) {
for (path, old, _) in writes.iter().take(index) {
if let Some(bytes) = old {
let _ = fsx::atomic_write(path, bytes);
} else {
let _ = fs::remove_file(path);
}
}
return Err(error);
}
}
fs::create_dir_all(root.join("Core/PortableImport"))?;
Ok(())
}
#[cfg(test)]
mod tests {
use super::*;
use tempfile::tempdir;
#[test]
fn portable_opt_in_updates_the_effective_module_and_survives_launcher_rendering() {
let temp = tempdir().unwrap();
let root = temp.path().join("realm");
fs::create_dir_all(root.join("Core/configs/modules")).unwrap();
fs::create_dir_all(root.join("Settings")).unwrap();
fs::write(
root.join("Settings/repack.json"),
r#"{"worldPort":49143,"authPort":49144,"mysqlPort":49145,"raPort":49146}"#,
)
.unwrap();
fs::write(
root.join("Core/configs/modules/coa.conf"),
"# Owner setting\nCoA.Enable = 1\nPortableSession.Enable = 0\n",
)
.unwrap();
for name in [
"Settings/worldserver.conf.template",
"Core/configs/worldserver.conf",
] {
fs::write(
root.join(name),
"CharacterDatabase.WorkerThreads = 3\nMaxPlayerLevel = 80\n",
)
.unwrap();
}
enable(&root).unwrap();
assert!(root.join("Core/PortableImport").is_dir());
let module = fs::read_to_string(root.join("Core/configs/modules/coa.conf")).unwrap();
assert!(
module.contains("# Owner setting") && module.contains("PortableSession.Enable = 1")
);
for name in [
"Settings/worldserver.conf.template",
"Core/configs/worldserver.conf",
] {
let text = fs::read_to_string(root.join(name)).unwrap();
assert!(
text.contains("CharacterDatabase.WorkerThreads = 1")
&& text.contains("MaxPlayerLevel = 80")
);
}
let snapshots =
super::super::list_snapshots(&crate::registry::metadata_dir_for(&root).unwrap());
assert_eq!(snapshots.len(), 1);
enable(&root).unwrap();
assert_eq!(
super::super::list_snapshots(&crate::registry::metadata_dir_for(&root).unwrap()).len(),
1
);
let listener = std::net::TcpListener::bind("127.0.0.1:0").unwrap();
fs::write(
root.join("Settings/repack.json"),
format!(
r#"{{"worldPort":{}}}"#,
listener.local_addr().unwrap().port()
),
)
.unwrap();
let disabled = "PortableSession.Enable = 0\n";
fs::write(root.join("Core/configs/modules/coa.conf"), disabled).unwrap();
assert!(enable(&root)
.unwrap_err()
.to_string()
.contains("Stop this server"));
assert_eq!(
fs::read_to_string(root.join("Core/configs/modules/coa.conf")).unwrap(),
disabled
);
}
}
+1
View File
@@ -471,6 +471,7 @@ mod tests {
std::env::var("COA_REAL_CONTROL_ROOT").expect("disposable root"),
);
assert!(root.starts_with("C:/games/source/candidate-evidence-20261021"));
crate::config::portable::enable(&root).expect("owner portable-character opt-in");
let databases = realms().expect("disposable databases");
reset_b(&databases.b);
let server = Server::start(spec().expect("disposable worldserver"));
+5 -1
View File
@@ -620,6 +620,10 @@ mod tests {
tx,
reset_on_drop: true,
});
assert_eq!(peer.read(&mut [0u8; 1]).unwrap(), 0);
match peer.read(&mut [0u8; 1]) {
Ok(0) => {},
Err(error) if matches!(error.kind(), std::io::ErrorKind::ConnectionReset | std::io::ErrorKind::ConnectionAborted) => {},
other => panic!("The abandoned relay stream must close, got {other:?}"),
}
}
}
+2
View File
@@ -223,6 +223,8 @@ fn err(code: AppError, message: &str) -> Response {
fn unavailable(what: &str, e: &Error) -> Response {
tracing::warn!(error = %e, "{what}");
#[cfg(test)]
eprintln!("{what}: {e}");
err(
AppError::Unavailable,
"The server could not do that right now.",
+93 -29
View File
@@ -14,12 +14,14 @@ use crate::download::Cancel;
use crate::error::{Error, Result};
use crate::fsx;
pub const CLIENT_VERSION: &str = "1.8.3";
pub const CLIENT_VERSION: &str = "1.9.2";
pub const MANIFEST_FILENAME: &str = "custom_races_patch_manifest.txt";
pub const ARCHIVES: &[(&str, &str)] = &[
("CoA-Custom-1.8.3-Client-1.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.8.3/CoA-Custom-1.8.3-Client-1.zip"),
("CoA-Custom-1.8.3-Client-2.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.8.3/CoA-Custom-1.8.3-Client-2.zip"),
("CoA-Custom-1.8.3-Client-3.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.8.3/CoA-Custom-1.8.3-Client-3.zip"),
("CoA-Custom-1.9.2-Client-1.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.9.2/CoA-Custom-1.9.2-Client-1.zip"),
("CoA-Custom-1.9.2-Client-2.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.9.2/CoA-Custom-1.9.2-Client-2.zip"),
("CoA-Custom-1.9.2-Client-3.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.9.2/CoA-Custom-1.9.2-Client-3.zip"),
("CoA-Custom-1.9.2-Client-4.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.9.2/CoA-Custom-1.9.2-Client-4.zip"),
("CoA-Custom-1.9.2-Client-5.zip", "https://github.com/ilusixn/azerothcore-wotlk-coa/releases/download/coa-custom-1.9.2/CoA-Custom-1.9.2-Client-5.zip"),
];
pub const RACE_MPQS: &[&str] = &[
@@ -53,9 +55,15 @@ pub const RACE_MPQS: &[&str] = &[
"patch-ZZX.MPQ",
"patch-ZZZC.MPQ",
"patch-ZZZD.MPQ",
"patch-ZZZA.MPQ",
"patch-ZZZE.MPQ",
"patch-ZZZF.MPQ",
"patch-ZZZZ.MPQ",
];
pub const RACE_ADDONS: &[&str] = &[
"CoAQuestSafe/CoAQuestSafe.lua",
"CoAQuestSafe/CoAQuestSafe.toc",
"CoAWC2Cursor/CoAWC2Cursor.lua",
"CoAWC2Cursor/CoAWC2Cursor.toc",
"CoAHideArmor/CoAHideArmor.lua",
@@ -186,6 +194,10 @@ fn patch_files(client: &Path) -> Result<Vec<PatchFile>> {
include_str!("custom_races_hashes_1_7.json")
} else if manifest.lines().any(|line| line == "# CoA Custom 1.8") {
include_str!("custom_races_hashes_1_8.json")
} else if manifest.lines().any(|line| line == "# CoA Custom 1.8.3") {
include_str!("custom_races_hashes_1_8_3.json")
} else if manifest.lines().any(|line| line == "# CoA Custom 1.9.1") {
include_str!("custom_races_hashes_1_9_1.json")
} else {
include_str!("custom_races_hashes.json")
};
@@ -200,11 +212,6 @@ fn patch_files(client: &Path) -> Result<Vec<PatchFile>> {
}
Some(format!("Data/{name}"))
} else if let Some(name) = line.strip_prefix("ROOT:") {
if name.contains(['/', '\\']) {
return Err(Error::Invalid(
"Invalid custom races patch manifest.".into(),
));
}
Some(name.to_string())
} else {
line.strip_prefix("ADDON:")
@@ -624,16 +631,37 @@ pub fn uninstall_client_patches(client: &Path) -> Result<()> {
tx.finish()
}
fn stage_root_asset(staging: &Path, relative: &str, reader: &mut impl Read) -> Result<String> {
let dest = fsx::safe_join(staging, relative)?;
fs::create_dir_all(
dest.parent()
.ok_or_else(|| Error::Invalid("Invalid client asset path.".into()))?,
)?;
let mut output = File::create(&dest)?;
io::copy(reader, &mut output)?;
let disabled = PathBuf::from(format!("{}.disabled", dest.display()));
if disabled.is_file() {
fs::remove_file(disabled)?;
}
Ok(relative.to_string())
}
fn verify_archive(path: &Path, filename: &str) -> Result<()> {
let expected = match filename {
"CoA-Custom-1.8.3-Client-1.zip" => {
"CoA-Custom-1.9.2-Client-1.zip" => {
"a9dd51ed2d90fb048d549602f40f5429d56e2df0df5606a38781b358fa369568"
}
"CoA-Custom-1.8.3-Client-2.zip" => {
"CoA-Custom-1.9.2-Client-2.zip" => {
"ab084a55509ccbcc2977a06dd0c01fa879973a1892baaacaeb3ff52f3dfc750e"
}
"CoA-Custom-1.8.3-Client-3.zip" => {
"270c7b306624bf9e5c3fe577e3bd058601221df223dd9e449ff7c25de70b9461"
"CoA-Custom-1.9.2-Client-3.zip" => {
"907e267f0ee7038807e626c3c1eca5e12db6c88b747137a23c5fb52eaa1a358e"
}
"CoA-Custom-1.9.2-Client-4.zip" => {
"e0bd87172af989fa50a8e2b08ba4321c72b6265047482f051a1db3b80d55bcaa"
}
"CoA-Custom-1.9.2-Client-5.zip" => {
"73364ad1b58c6342641a848a3b20a835472834f600416606be1470386774ca78"
}
_ => return Err(Error::Invalid("Unknown custom races archive.".into())),
};
@@ -867,22 +895,8 @@ pub fn install_client_patches(
let mut out = File::create(&dest)?;
io::copy(&mut zfile, &mut out)?;
installed_roots.push(relative);
} else if zname_norm.contains("files/client_root/") {
let base = Path::new(&zname_norm)
.file_name()
.map(|n| n.to_string_lossy().into_owned())
.unwrap_or_default();
if !base.is_empty() {
let dest = staging.path().join(&base);
let mut out = File::create(&dest)?;
io::copy(&mut zfile, &mut out)?;
let disabled = staging.path().join(format!("{base}.disabled"));
if disabled.is_file() {
fs::remove_file(disabled)?;
}
installed_roots.push(base);
}
} else if let Some(relative) = zname_norm.split("files/client_root/").nth(1) {
installed_roots.push(stage_root_asset(staging.path(), relative, &mut zfile)?);
}
}
}
@@ -1048,6 +1062,56 @@ mod tests {
fs::remove_dir(link).unwrap();
}
#[test]
fn nested_root_manifest_remains_valid_and_rejects_traversal() {
let temp = tempfile::tempdir().unwrap();
let relative = "Data/Retail/Assets/EquipmentFitting/60-0.bin";
fs::write(
temp.path().join(MANIFEST_FILENAME),
format!("# CoA Custom {CLIENT_VERSION}\nROOT:{relative}\n"),
)
.unwrap();
assert_eq!(patch_files(temp.path()).unwrap()[0].path, relative);
fs::write(temp.path().join(MANIFEST_FILENAME), "ROOT:../outside.bin\n").unwrap();
assert!(patch_files(temp.path()).is_err());
}
#[test]
fn previous_split_release_retains_its_original_hash_inventory() {
let temp = tempfile::tempdir().unwrap();
fs::write(temp.path().join(MANIFEST_FILENAME), "# CoA Custom 1.8.3\n").unwrap();
let old: std::collections::BTreeMap<String, String> =
serde_json::from_str(include_str!("custom_races_hashes_1_8_3.json")).unwrap();
let files = patch_files(temp.path()).unwrap();
assert_eq!(files.len(), old.len());
assert!(files
.iter()
.all(|file| old.get(&file.path) == Some(&file.sha256)));
}
#[test]
fn previous_191_release_keeps_its_hashes_and_does_not_claim_new_addons() {
let temp = tempfile::tempdir().unwrap();
fs::write(temp.path().join(MANIFEST_FILENAME), "# CoA Custom 1.9.1\n").unwrap();
let old: std::collections::BTreeMap<String, String> =
serde_json::from_str(include_str!("custom_races_hashes_1_9_1.json")).unwrap();
let files = patch_files(temp.path()).unwrap();
assert_eq!(files.len(), old.len());
assert!(files.iter().all(|file| old.get(&file.path) == Some(&file.sha256)));
assert!(!files.iter().any(|file| file.path.contains("CoAQuestSafe")));
}
#[test]
fn root_assets_preserve_nested_paths_and_reject_traversal() {
let temp = tempfile::tempdir().unwrap();
let relative = "Data/Retail/Assets/EquipmentFitting/60-0.bin";
let result = stage_root_asset(temp.path(), relative, &mut &b"fitting"[..]).unwrap();
assert_eq!(result, relative);
assert_eq!(fs::read(temp.path().join(relative)).unwrap(), b"fitting");
assert!(!temp.path().join("60-0.bin").exists());
assert!(stage_root_asset(temp.path(), "../outside.bin", &mut &b"bad"[..]).is_err());
}
#[test]
#[cfg(windows)]
fn shared_addons_junction_supports_install_switch_and_rollback() {
+51 -8
View File
@@ -1,5 +1,20 @@
{
"Ascension.exe": "e2c347019d554a59639e5978fd68e50e906973ab313c6573cc56ca82e8e3c547",
"Data/Retail/Assets/EquipmentFitting/1068-1.bin": "332d2c38b037a118f262bbb3096a01ebfb33c5347e96bbfb64157437b300281b",
"Data/Retail/Assets/EquipmentFitting/60-0.bin": "ffbf6efc9ea09b0c442f048c5bc7b4c5975258045cfddedd9a77a93363312b5e",
"Data/Retail/Assets/EquipmentFitting/60-1.bin": "36ceed2a55756f3322e018938809acea5124351161405058ef27d100173778da",
"Data/Retail/Assets/EquipmentFitting/61-0.bin": "3b302a4055d1e795c451b02e38dfe8007527ee1bc5f926ebcd6ef17f433cd232",
"Data/Retail/Assets/EquipmentFitting/61-1.bin": "c42df399ed99be3c7ce1b5fdb95a873711011713a4cd867bc226a14b1ce0e8ca",
"Data/Retail/Assets/EquipmentFitting/65-0.bin": "8ce3f884ae197d14dff0f955c2cf05abb716742c8aff79f7af1cec5cf7225f04",
"Data/Retail/Assets/EquipmentFitting/68-0.bin": "f1d878f0f943cbdb8025af8daac4a38c1d1e159bd961d9d76f225931c11648ac",
"Data/Retail/Assets/EquipmentFitting/68-1.bin": "2ccbae634384200340c0cc3dca36a7a014a8ddad110598e4470ff1b266576465",
"Data/Retail/Assets/EquipmentFitting/73-0.bin": "5530882678f677ad47987ce906e851338a35f7d9737e3f9d829938027b8af67f",
"Data/Retail/Assets/EquipmentFitting/74-0.bin": "53a7be86b3bfdd6995406c706df3ca091484206d8141cebb39113c714500384a",
"Data/Retail/Assets/EquipmentFitting/74-1.bin": "e688c55a355231978d42480a003c26d379460f5931c2469c119ecb073ea153e1",
"Data/Retail/Assets/EquipmentFitting/75-0.bin": "289abc71c6df0e031a64d62a40e658eaefd37e45373a062ca52f08fbe803500c",
"Data/Retail/Assets/EquipmentFitting/76-0.bin": "63a493e70b91f59ff49f1942d959df986062bd267fe2ba589f344963df771021",
"Data/Retail/Assets/EquipmentFitting/77-0.bin": "b1366ce0dc4f31cb8c8c9705be2da565df4b905224af04b6b88f8c8e9c87e3c9",
"Data/Retail/Assets/EquipmentFitting/78-0.bin": "7b0031fb12ab19020005bdccacca2dd3991349c36949a58b035992585b4134db",
"Data/patch-T.MPQ": "fe597138ab7f56881b5f4f27d6dc9d81bb278b483ca0d91b7207ffd4a5ae7bfd",
"Data/patch-ZE1.MPQ": "69d79dbbea54ec0312c37770debc79c7bc9ce2e21eedef99c03cd8d911955283",
"Data/patch-ZE2.MPQ": "1a41cae77ad730e9cf69e8d63fd12ae3a579418bb550d351fff469573a97ac3c",
@@ -22,28 +37,48 @@
"Data/patch-ZZE.MPQ": "4b1e289e12c82644cb78f50170e6b5fd53918eb2de834f9e0cebddd81873a8bb",
"Data/patch-ZZR.MPQ": "5a7575e592dc0c8a6913e0d946bbe06fa0ca2e4d817ef1f8548d3d13142bcbd3",
"Data/patch-ZZS.MPQ": "533fd69d5784d83e872a5a28d27301dc9ab5d0cb925f8b2116926854e4a0a5b8",
"Data/patch-ZZT.MPQ": "aef3bbe4951333d62fb55224484724fbaa9c35773a19944ffb9935e250cfb59c",
"Data/patch-ZZU.MPQ": "8ee1839415b56d46c6eff7eb4dfbaf6fbafc4c6b29b39380d69f4d827d02a99e",
"Data/patch-ZZV.MPQ": "8d5e61d37008abf70478e5d5f46ec7afb0490b9a643323bd75a1c70cadd63290",
"Data/patch-ZZW.MPQ": "3689c485f8ee8fccaa6dbae1d073bc9231229f9a040f79a272d80a87486d0c33",
"Data/patch-ZZT.MPQ": "e60dab63fe5650fdf5f0846ea6d4136219293bcfdad46d9b796697faeff9ab4c",
"Data/patch-ZZU.MPQ": "0311de8f034eae7dec1bd2c92b1fe6c741cbaf53da62c7609cd12b6c37908e47",
"Data/patch-ZZV.MPQ": "3b04008905e7185d165827d68f7ca228dda8272816364f7d71874ecc83b64f0e",
"Data/patch-ZZW.MPQ": "3bbbc72901fd2d662113036485c380701e693f5a39ba9479af306bf2fa2030bd",
"Data/patch-ZZX.MPQ": "4c12608089cfe356f7c8882d66db90239ed3ec8ddd980d91d7a3a488680f3c88",
"Data/patch-ZZZ.MPQ": "566aaadf501af42e29a828b1bc2edbd36d436288fb309fe423bd74b9619bf593",
"Data/patch-ZZZA.MPQ": "57ccbdc0a66000767554ffd194088df6d602ddd8341a141bca8201e7d5435889",
"Data/patch-ZZZC.MPQ": "691a53f6325c2615a64ced0802f18bc4d96e99c62aaa606fc930f9406ee74cdf",
"Data/patch-ZZZD.MPQ": "e4ce9d8b363eb609d0d6d92627eb53454fa2e03e4dbc1795b3573a22b7d009c8",
"Data/patch-ZZZD.MPQ": "ca893cf8129f6fd442a63f0697a8ddea88546e3ce71bde713be2cc832b892bc9",
"Data/patch-ZZZE.MPQ": "2e245ee0fe3b913087eed399062fda5843d98b04afac38024f7c64ac3bf43e18",
"Data/patch-ZZZF.MPQ": "40eac695cfcafb598b8376f3b9a61ecc037e4d445b87279cfe387a91edad32c3",
"Data/patch-ZZZZ.MPQ": "860c990db3b4185fdc36e1a001d3ca3507a68253a4506793a115f86eb0892a15",
"EsteriaAppearance.bin": "90d9cfaeaf6de10f014f1d1610ea10453ec9b240255759aea99513cac488a3ec",
"EsteriaAppearance.dll": "196a82f24dd287653e2b2fc4d12bfc796f8ee3f6687ca8308905a5ab528a51a9",
"EsteriaAppearance.dll": "88e268d3be9eca3b0644f543d823f4bdcc04a9700a6e8ed73fd2a1260ad191af",
"EsteriaAppearanceGeometry.bin": "19de5b4b4f79778ea5316659efc2f66c6edb6b5149c46efa47c46bfa4ec6904c",
"EsteriaAppearanceMaterials.bin": "f72f027f54a55c05aa0f76b457b97b484fe0e1aedc0e068cc0e0ca53e1878cba",
"EsteriaBanshee.bin": "d3fe66caa6a0ecba96bddb07ac1cbdb915694e87fc1608da0fdabecdf9ffea4d",
"EsteriaBansheeTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaCentaur.bin": "d63f0b7d21cee67d234d134e832fe6d55c398f2b63f9f6c191dcfa9671637185",
"EsteriaCentaurTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaCosmeticWings.bin": "57352c28459d073a29b3014d33b70f3b3756afa37fa9583ef6b30d503422ac3f",
"EsteriaDrakonid.bin": "95440ee9c065ef20bb7fed6158d20623d68745291cedc2726fc746ff54601f95",
"EsteriaDrakonidCoverage.bin": "9cdc227f08329e1245d2b864a996e7a772c96ecdbe5d81925f4d60cdbe4fa11e",
"EsteriaDrakonidTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaEarthen.bin": "8a0db93ba2d5c756b44ed84f2f7bc7c15eef13be6a7d87baf1383c6c0c624e02",
"EsteriaEthereal.bin": "ada3b7588511a847dd5154d91e3041e9f7f193998b06bfede5e0afc32570b48c",
"EsteriaEtherealTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaFaceless.bin": "1c5a1d7a6b1db6984a8e41bc4804e9f7c50d65dcdbb8c0a9d1a9e8af8c91bd8f",
"EsteriaFacelessTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaGnoll.bin": "cfacc8e681bb8e54a4f01ee9c12a91bf0bd23a23527bb548d4dc21ec1b33eea2",
"EsteriaGnollTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaHaranir.bin": "59f31d00e372fd2646e1cf0d9d3d5d671b31edd60ff7b862f8d1ce7e53ba1f2f",
"EsteriaHaranirTextures.bin": "99948ca570be2d376f0c67e3b8088739b6fa9f9d2c73985e19f68df77689a229",
"EsteriaHighmountain.bin": "e83349252ad2687ac23fcfc5623db7401cf32e5faf47a5a7be20c2f94b014938",
"EsteriaHozen.bin": "739bc3775388976f5c09bcbf3a98b62d804dff78d545e25a41d07dd99b5fddc5",
"EsteriaHozenTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaKvItems.bin": "fc5f9d86114234b38dbb0e14a6a5ec16249eaa92a73411a7fc371a950549dcce",
"EsteriaKvSkins.bin": "60b2b899f5f83137368514928f92f3b04c0fae058f534c487ddbe913ee4bec18",
"EsteriaKyrian.bin": "9329147f08805ff4003f9e062fea7c6ea8fdd8c4d6a40de63a6d228ebe1b7c9a",
"EsteriaKyrianTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaMantid.bin": "71536dee6c2abd0b0e13f33bc73cad7e6fb1b0fc1f6912a95c55d57bc7ee1787",
"EsteriaMantidTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaNaga.bin": "e87547cff5d09500c294f8b06935d134cdd0bbb962e294a72de09404505bd8b3",
"EsteriaNagaTextures.bin": "57ec560f99c1d48ac1e8f6a797c156513b99e7d349e3071afe405f812d159ae3",
"EsteriaSaberon.bin": "7735c9325c807c5125760d87f323d6b7d4162fb542c1d8b5f435ea2d6b9a4daa",
@@ -51,18 +86,26 @@
"EsteriaSaberonTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaSethrak.bin": "bd14857a8c11fdf8027128763293701586b2102f9a6539d33a727014789fd606",
"EsteriaSethrakTextures.bin": "d2b2cf58087a391f00198008fe871edd400ddf28d54a3a05674df74c5198528a",
"EsteriaSlime.bin": "491e942ceb6abda83c0249afebae7c9c43af3897b35e45fa33d6f9177ecbc177",
"EsteriaSlimeTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaTarasek.bin": "f718444d5ec36f7aff018883486ae1981151fe6e01f5b7781d68d74e9fadfa47",
"EsteriaTarasekTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaThinHuman.bin": "75794d192ea0c228b3da7bf7d0bdff1119f79d3f9bfef6650cd5e1a2b5d106eb",
"EsteriaThinHumanTextures.bin": "02aeb4c05893d06125b8b58fdb7c2a56fe3d66a7d094706a44b43cb503d1731e",
"EsteriaThinHuman.bin": "bc12e5ca2c087ca0a8642ff6cd8e78fe2e1f85928518b12c19b4245a8320585d",
"EsteriaThinHumanTextures.bin": "27488a7494fa9733b53118d1d0f4acef50a9e19004f81f9c8a614b10f4c3fd5e",
"EsteriaTuskarr.bin": "ecbe7ef490ba67eca029a57639192db61238522618491549766fe38529914387",
"EsteriaTuskarrTextures.bin": "e2116c2c83adea079126fd5da765d20da24f044d4f161c4124e4368cb3d6bc71",
"EsteriaVenthyr.bin": "5bcf7804363e59b3c922830d06de17bbd348b9967307f39b7d72bc09f58814eb",
"EsteriaVenthyrTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaVorkai.bin": "d6d2088c7e867b5db437e9afc2d323c22d830c6f84a3598415eedcaa27e2461f",
"EsteriaVorkaiTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaVrykul.bin": "39e2b7b4c67997dbbd34bae840bd606a59290f7f2fc82565a0ba00090335415c",
"EsteriaVrykulTextures.bin": "46098750a0e235724c6e9cc8d9d4e26550aa47bef95fd5f0f82efe5e945bf296",
"EsteriaVulpera.bin": "c5434993b9af4a17d881965e4735cd2ac379e39c7142aac9844adff9528562d4",
"EsteriaVulperaTextures.bin": "1ab844e74684aced2b069f1b91cd563aade45e05bd5e23f866a6c0c301cb098e",
"Interface/AddOns/CoAHideArmor/CoAHideArmor.lua": "8c1c7403524fc9bd56c0809b4101b141da700ba163701209bf1420f2ef106aa7",
"Interface/AddOns/CoAHideArmor/CoAHideArmor.toc": "123580d92fd5ceee258e96296f42c359b7e83cdff151af49c50c6c4e2059677c",
"Interface/AddOns/CoAQuestSafe/CoAQuestSafe.lua": "062de55c91228971553f482fd2c8753f4752993b4e8e49d4ded04fa18b98bde7",
"Interface/AddOns/CoAQuestSafe/CoAQuestSafe.toc": "890bb9d1087e236f4823603f5df3ab0e316dbb65c28feebbda08fb0ab53a408f",
"Interface/AddOns/CoAWC2Cursor/CoAWC2Cursor.lua": "1cf9537ff5f10b77250fea4407aea1008da690afe102ed6ed2dac21f79638cfa",
"Interface/AddOns/CoAWC2Cursor/CoAWC2Cursor.toc": "48ce695dce712b3643ebe13a77e318d623c964acc69479b8fc8cc675099801bf",
"Interface/AddOns/CoA_TalentReset/CoA_TalentReset.lua": "827d756d5948ef918fafaf8b869290b3a1faa4e4cc21b19b512a00d4509f3d41",
@@ -0,0 +1,73 @@
{
"Ascension.exe": "e2c347019d554a59639e5978fd68e50e906973ab313c6573cc56ca82e8e3c547",
"Data/patch-T.MPQ": "fe597138ab7f56881b5f4f27d6dc9d81bb278b483ca0d91b7207ffd4a5ae7bfd",
"Data/patch-ZE1.MPQ": "69d79dbbea54ec0312c37770debc79c7bc9ce2e21eedef99c03cd8d911955283",
"Data/patch-ZE2.MPQ": "1a41cae77ad730e9cf69e8d63fd12ae3a579418bb550d351fff469573a97ac3c",
"Data/patch-ZE3.MPQ": "b587202c21b6f580682b601b7c2e905fbfa766276e74733db55c1bddbffb7f87",
"Data/patch-ZE5.MPQ": "476b5a1fcf69f64fdb281e3b445362b936d016066ccd12f897acfcf200d6c0cf",
"Data/patch-ZE6.MPQ": "762592c9ed950b4a7b6c7d85d45050b30fa3f35d53e348ee1e1516fdbb7e5484",
"Data/patch-ZE7.MPQ": "de54b0189d242763d2872223419a259b6b8a4b380c24b50a2ef9c6fa44466248",
"Data/patch-ZE8.MPQ": "1bc5691fb84a84f3e7a0a70baaa9192a97b4ec5906ee37c85838ffe08adef934",
"Data/patch-ZE9.MPQ": "d49c94463e9548e76378ce2c0454d8f204f0745c8c0de32b6dce7f0b0fd67c4a",
"Data/patch-ZEA.MPQ": "78fd10ec5262ae2417eba9700d2172553bbc1e5cfb0b597aada8f1753ca46d9d",
"Data/patch-ZES.MPQ": "a2d9348f917f745c7aa25b2eed96efa312f7b2d2f62cb86a4f2eaabc2dfa895f",
"Data/patch-ZG.MPQ": "48979e1fda775f8deb47bffa48e0a468595d4c71286fee518f51dc5801c5ca39",
"Data/patch-ZH.MPQ": "5e1d2fe287053abba703d7af381e10096c6525ba477ffed3971c2fc4f93e919c",
"Data/patch-ZHA.MPQ": "0fc6ebeafe1d14192dc64bafc90bde3c49230df1297f98bf65900a3bcf953617",
"Data/patch-ZHM.MPQ": "317d3ae00f0bd674b358af07544976acb7804aa6d8b19d1788ad96030e8c9bf0",
"Data/patch-ZJ.MPQ": "f821e99add86ef68d108c5ec466328c97677d3ed52f7944e200f3fe38c13b4de",
"Data/patch-ZK.MPQ": "444d0ecb72c1e990509d53e3cfa5b7634c816733533e8a97e5d7f5653ee32cce",
"Data/patch-ZM.MPQ": "424ab1978986e854551633983a94bd15beba6328aabea8c02f98eaa32f6f0b61",
"Data/patch-ZVU.MPQ": "c679b85a2e97344395756b54d2cf6abefe4e80e74944cb55b6e573ad17b7d020",
"Data/patch-ZZE.MPQ": "4b1e289e12c82644cb78f50170e6b5fd53918eb2de834f9e0cebddd81873a8bb",
"Data/patch-ZZR.MPQ": "5a7575e592dc0c8a6913e0d946bbe06fa0ca2e4d817ef1f8548d3d13142bcbd3",
"Data/patch-ZZS.MPQ": "533fd69d5784d83e872a5a28d27301dc9ab5d0cb925f8b2116926854e4a0a5b8",
"Data/patch-ZZT.MPQ": "aef3bbe4951333d62fb55224484724fbaa9c35773a19944ffb9935e250cfb59c",
"Data/patch-ZZU.MPQ": "8ee1839415b56d46c6eff7eb4dfbaf6fbafc4c6b29b39380d69f4d827d02a99e",
"Data/patch-ZZV.MPQ": "8d5e61d37008abf70478e5d5f46ec7afb0490b9a643323bd75a1c70cadd63290",
"Data/patch-ZZW.MPQ": "3689c485f8ee8fccaa6dbae1d073bc9231229f9a040f79a272d80a87486d0c33",
"Data/patch-ZZX.MPQ": "4c12608089cfe356f7c8882d66db90239ed3ec8ddd980d91d7a3a488680f3c88",
"Data/patch-ZZZ.MPQ": "566aaadf501af42e29a828b1bc2edbd36d436288fb309fe423bd74b9619bf593",
"Data/patch-ZZZC.MPQ": "691a53f6325c2615a64ced0802f18bc4d96e99c62aaa606fc930f9406ee74cdf",
"Data/patch-ZZZD.MPQ": "e4ce9d8b363eb609d0d6d92627eb53454fa2e03e4dbc1795b3573a22b7d009c8",
"EsteriaAppearance.bin": "90d9cfaeaf6de10f014f1d1610ea10453ec9b240255759aea99513cac488a3ec",
"EsteriaAppearance.dll": "196a82f24dd287653e2b2fc4d12bfc796f8ee3f6687ca8308905a5ab528a51a9",
"EsteriaAppearanceGeometry.bin": "19de5b4b4f79778ea5316659efc2f66c6edb6b5149c46efa47c46bfa4ec6904c",
"EsteriaAppearanceMaterials.bin": "f72f027f54a55c05aa0f76b457b97b484fe0e1aedc0e068cc0e0ca53e1878cba",
"EsteriaCosmeticWings.bin": "57352c28459d073a29b3014d33b70f3b3756afa37fa9583ef6b30d503422ac3f",
"EsteriaDrakonid.bin": "95440ee9c065ef20bb7fed6158d20623d68745291cedc2726fc746ff54601f95",
"EsteriaDrakonidCoverage.bin": "9cdc227f08329e1245d2b864a996e7a772c96ecdbe5d81925f4d60cdbe4fa11e",
"EsteriaDrakonidTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaEarthen.bin": "8a0db93ba2d5c756b44ed84f2f7bc7c15eef13be6a7d87baf1383c6c0c624e02",
"EsteriaGnoll.bin": "cfacc8e681bb8e54a4f01ee9c12a91bf0bd23a23527bb548d4dc21ec1b33eea2",
"EsteriaGnollTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaHaranir.bin": "59f31d00e372fd2646e1cf0d9d3d5d671b31edd60ff7b862f8d1ce7e53ba1f2f",
"EsteriaHaranirTextures.bin": "99948ca570be2d376f0c67e3b8088739b6fa9f9d2c73985e19f68df77689a229",
"EsteriaHighmountain.bin": "e83349252ad2687ac23fcfc5623db7401cf32e5faf47a5a7be20c2f94b014938",
"EsteriaNaga.bin": "e87547cff5d09500c294f8b06935d134cdd0bbb962e294a72de09404505bd8b3",
"EsteriaNagaTextures.bin": "57ec560f99c1d48ac1e8f6a797c156513b99e7d349e3071afe405f812d159ae3",
"EsteriaSaberon.bin": "7735c9325c807c5125760d87f323d6b7d4162fb542c1d8b5f435ea2d6b9a4daa",
"EsteriaSaberonCoverage.bin": "9cdc227f08329e1245d2b864a996e7a772c96ecdbe5d81925f4d60cdbe4fa11e",
"EsteriaSaberonTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaSethrak.bin": "bd14857a8c11fdf8027128763293701586b2102f9a6539d33a727014789fd606",
"EsteriaSethrakTextures.bin": "d2b2cf58087a391f00198008fe871edd400ddf28d54a3a05674df74c5198528a",
"EsteriaTarasek.bin": "f718444d5ec36f7aff018883486ae1981151fe6e01f5b7781d68d74e9fadfa47",
"EsteriaTarasekTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaThinHuman.bin": "75794d192ea0c228b3da7bf7d0bdff1119f79d3f9bfef6650cd5e1a2b5d106eb",
"EsteriaThinHumanTextures.bin": "02aeb4c05893d06125b8b58fdb7c2a56fe3d66a7d094706a44b43cb503d1731e",
"EsteriaTuskarr.bin": "ecbe7ef490ba67eca029a57639192db61238522618491549766fe38529914387",
"EsteriaTuskarrTextures.bin": "e2116c2c83adea079126fd5da765d20da24f044d4f161c4124e4368cb3d6bc71",
"EsteriaVrykul.bin": "39e2b7b4c67997dbbd34bae840bd606a59290f7f2fc82565a0ba00090335415c",
"EsteriaVrykulTextures.bin": "46098750a0e235724c6e9cc8d9d4e26550aa47bef95fd5f0f82efe5e945bf296",
"EsteriaVulpera.bin": "c5434993b9af4a17d881965e4735cd2ac379e39c7142aac9844adff9528562d4",
"EsteriaVulperaTextures.bin": "1ab844e74684aced2b069f1b91cd563aade45e05bd5e23f866a6c0c301cb098e",
"Interface/AddOns/CoAHideArmor/CoAHideArmor.lua": "8c1c7403524fc9bd56c0809b4101b141da700ba163701209bf1420f2ef106aa7",
"Interface/AddOns/CoAHideArmor/CoAHideArmor.toc": "123580d92fd5ceee258e96296f42c359b7e83cdff151af49c50c6c4e2059677c",
"Interface/AddOns/CoAWC2Cursor/CoAWC2Cursor.lua": "1cf9537ff5f10b77250fea4407aea1008da690afe102ed6ed2dac21f79638cfa",
"Interface/AddOns/CoAWC2Cursor/CoAWC2Cursor.toc": "48ce695dce712b3643ebe13a77e318d623c964acc69479b8fc8cc675099801bf",
"Interface/AddOns/CoA_TalentReset/CoA_TalentReset.lua": "827d756d5948ef918fafaf8b869290b3a1faa4e4cc21b19b512a00d4509f3d41",
"Interface/AddOns/CoA_TalentReset/CoA_TalentReset.toc": "16298c04af68e68d6445e7a11f42aee525dd4145f85d2771ff434fb7c6e95a85",
"dinput8.dll": "f8de78606c241fb3911dce22faf68f5b9f9885b142b183c1e2c09ddc8f7e380c",
"wc2_human.cur": "f609736e29596bb386ef1597b157d211e01a86d32c2a929e256c581c37d71791",
"wc2_orc.cur": "baa512c9b9045762ba35b6e0d35b8f79c54b7649f35cc9c0e0cc8c168a1e5a97"
}
@@ -0,0 +1,114 @@
{
"Ascension.exe": "e2c347019d554a59639e5978fd68e50e906973ab313c6573cc56ca82e8e3c547",
"Data/Retail/Assets/EquipmentFitting/1068-1.bin": "332d2c38b037a118f262bbb3096a01ebfb33c5347e96bbfb64157437b300281b",
"Data/Retail/Assets/EquipmentFitting/60-0.bin": "ffbf6efc9ea09b0c442f048c5bc7b4c5975258045cfddedd9a77a93363312b5e",
"Data/Retail/Assets/EquipmentFitting/60-1.bin": "36ceed2a55756f3322e018938809acea5124351161405058ef27d100173778da",
"Data/Retail/Assets/EquipmentFitting/61-0.bin": "3b302a4055d1e795c451b02e38dfe8007527ee1bc5f926ebcd6ef17f433cd232",
"Data/Retail/Assets/EquipmentFitting/61-1.bin": "c42df399ed99be3c7ce1b5fdb95a873711011713a4cd867bc226a14b1ce0e8ca",
"Data/Retail/Assets/EquipmentFitting/65-0.bin": "8ce3f884ae197d14dff0f955c2cf05abb716742c8aff79f7af1cec5cf7225f04",
"Data/Retail/Assets/EquipmentFitting/68-0.bin": "f1d878f0f943cbdb8025af8daac4a38c1d1e159bd961d9d76f225931c11648ac",
"Data/Retail/Assets/EquipmentFitting/68-1.bin": "2ccbae634384200340c0cc3dca36a7a014a8ddad110598e4470ff1b266576465",
"Data/Retail/Assets/EquipmentFitting/73-0.bin": "5530882678f677ad47987ce906e851338a35f7d9737e3f9d829938027b8af67f",
"Data/Retail/Assets/EquipmentFitting/74-0.bin": "53a7be86b3bfdd6995406c706df3ca091484206d8141cebb39113c714500384a",
"Data/Retail/Assets/EquipmentFitting/74-1.bin": "e688c55a355231978d42480a003c26d379460f5931c2469c119ecb073ea153e1",
"Data/Retail/Assets/EquipmentFitting/75-0.bin": "289abc71c6df0e031a64d62a40e658eaefd37e45373a062ca52f08fbe803500c",
"Data/Retail/Assets/EquipmentFitting/76-0.bin": "63a493e70b91f59ff49f1942d959df986062bd267fe2ba589f344963df771021",
"Data/Retail/Assets/EquipmentFitting/77-0.bin": "b1366ce0dc4f31cb8c8c9705be2da565df4b905224af04b6b88f8c8e9c87e3c9",
"Data/Retail/Assets/EquipmentFitting/78-0.bin": "7b0031fb12ab19020005bdccacca2dd3991349c36949a58b035992585b4134db",
"Data/patch-T.MPQ": "fe597138ab7f56881b5f4f27d6dc9d81bb278b483ca0d91b7207ffd4a5ae7bfd",
"Data/patch-ZE1.MPQ": "69d79dbbea54ec0312c37770debc79c7bc9ce2e21eedef99c03cd8d911955283",
"Data/patch-ZE2.MPQ": "1a41cae77ad730e9cf69e8d63fd12ae3a579418bb550d351fff469573a97ac3c",
"Data/patch-ZE3.MPQ": "b587202c21b6f580682b601b7c2e905fbfa766276e74733db55c1bddbffb7f87",
"Data/patch-ZE5.MPQ": "476b5a1fcf69f64fdb281e3b445362b936d016066ccd12f897acfcf200d6c0cf",
"Data/patch-ZE6.MPQ": "762592c9ed950b4a7b6c7d85d45050b30fa3f35d53e348ee1e1516fdbb7e5484",
"Data/patch-ZE7.MPQ": "de54b0189d242763d2872223419a259b6b8a4b380c24b50a2ef9c6fa44466248",
"Data/patch-ZE8.MPQ": "1bc5691fb84a84f3e7a0a70baaa9192a97b4ec5906ee37c85838ffe08adef934",
"Data/patch-ZE9.MPQ": "d49c94463e9548e76378ce2c0454d8f204f0745c8c0de32b6dce7f0b0fd67c4a",
"Data/patch-ZEA.MPQ": "78fd10ec5262ae2417eba9700d2172553bbc1e5cfb0b597aada8f1753ca46d9d",
"Data/patch-ZES.MPQ": "a2d9348f917f745c7aa25b2eed96efa312f7b2d2f62cb86a4f2eaabc2dfa895f",
"Data/patch-ZG.MPQ": "48979e1fda775f8deb47bffa48e0a468595d4c71286fee518f51dc5801c5ca39",
"Data/patch-ZH.MPQ": "5e1d2fe287053abba703d7af381e10096c6525ba477ffed3971c2fc4f93e919c",
"Data/patch-ZHA.MPQ": "0fc6ebeafe1d14192dc64bafc90bde3c49230df1297f98bf65900a3bcf953617",
"Data/patch-ZHM.MPQ": "317d3ae00f0bd674b358af07544976acb7804aa6d8b19d1788ad96030e8c9bf0",
"Data/patch-ZJ.MPQ": "f821e99add86ef68d108c5ec466328c97677d3ed52f7944e200f3fe38c13b4de",
"Data/patch-ZK.MPQ": "444d0ecb72c1e990509d53e3cfa5b7634c816733533e8a97e5d7f5653ee32cce",
"Data/patch-ZM.MPQ": "424ab1978986e854551633983a94bd15beba6328aabea8c02f98eaa32f6f0b61",
"Data/patch-ZVU.MPQ": "c679b85a2e97344395756b54d2cf6abefe4e80e74944cb55b6e573ad17b7d020",
"Data/patch-ZZE.MPQ": "4b1e289e12c82644cb78f50170e6b5fd53918eb2de834f9e0cebddd81873a8bb",
"Data/patch-ZZR.MPQ": "5a7575e592dc0c8a6913e0d946bbe06fa0ca2e4d817ef1f8548d3d13142bcbd3",
"Data/patch-ZZS.MPQ": "533fd69d5784d83e872a5a28d27301dc9ab5d0cb925f8b2116926854e4a0a5b8",
"Data/patch-ZZT.MPQ": "e60dab63fe5650fdf5f0846ea6d4136219293bcfdad46d9b796697faeff9ab4c",
"Data/patch-ZZU.MPQ": "0311de8f034eae7dec1bd2c92b1fe6c741cbaf53da62c7609cd12b6c37908e47",
"Data/patch-ZZV.MPQ": "3b04008905e7185d165827d68f7ca228dda8272816364f7d71874ecc83b64f0e",
"Data/patch-ZZW.MPQ": "3bbbc72901fd2d662113036485c380701e693f5a39ba9479af306bf2fa2030bd",
"Data/patch-ZZX.MPQ": "4c12608089cfe356f7c8882d66db90239ed3ec8ddd980d91d7a3a488680f3c88",
"Data/patch-ZZZ.MPQ": "566aaadf501af42e29a828b1bc2edbd36d436288fb309fe423bd74b9619bf593",
"Data/patch-ZZZA.MPQ": "57ccbdc0a66000767554ffd194088df6d602ddd8341a141bca8201e7d5435889",
"Data/patch-ZZZC.MPQ": "691a53f6325c2615a64ced0802f18bc4d96e99c62aaa606fc930f9406ee74cdf",
"Data/patch-ZZZD.MPQ": "ca893cf8129f6fd442a63f0697a8ddea88546e3ce71bde713be2cc832b892bc9",
"Data/patch-ZZZE.MPQ": "2e245ee0fe3b913087eed399062fda5843d98b04afac38024f7c64ac3bf43e18",
"Data/patch-ZZZF.MPQ": "0e0dd0b46e5308756af779803259e2ba6c99920a01b62a01505b268c20a15bbe",
"Data/patch-ZZZZ.MPQ": "ae27e2f203755c8a74f21cabf8d3ebafd076b53452b1eb9d894fa1ce9837d0ea",
"EsteriaAppearance.bin": "90d9cfaeaf6de10f014f1d1610ea10453ec9b240255759aea99513cac488a3ec",
"EsteriaAppearance.dll": "88e268d3be9eca3b0644f543d823f4bdcc04a9700a6e8ed73fd2a1260ad191af",
"EsteriaAppearanceGeometry.bin": "19de5b4b4f79778ea5316659efc2f66c6edb6b5149c46efa47c46bfa4ec6904c",
"EsteriaAppearanceMaterials.bin": "f72f027f54a55c05aa0f76b457b97b484fe0e1aedc0e068cc0e0ca53e1878cba",
"EsteriaBanshee.bin": "d3fe66caa6a0ecba96bddb07ac1cbdb915694e87fc1608da0fdabecdf9ffea4d",
"EsteriaBansheeTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaCentaur.bin": "d63f0b7d21cee67d234d134e832fe6d55c398f2b63f9f6c191dcfa9671637185",
"EsteriaCentaurTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaCosmeticWings.bin": "57352c28459d073a29b3014d33b70f3b3756afa37fa9583ef6b30d503422ac3f",
"EsteriaDrakonid.bin": "95440ee9c065ef20bb7fed6158d20623d68745291cedc2726fc746ff54601f95",
"EsteriaDrakonidCoverage.bin": "9cdc227f08329e1245d2b864a996e7a772c96ecdbe5d81925f4d60cdbe4fa11e",
"EsteriaDrakonidTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaEarthen.bin": "8a0db93ba2d5c756b44ed84f2f7bc7c15eef13be6a7d87baf1383c6c0c624e02",
"EsteriaEthereal.bin": "ada3b7588511a847dd5154d91e3041e9f7f193998b06bfede5e0afc32570b48c",
"EsteriaEtherealTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaFaceless.bin": "1c5a1d7a6b1db6984a8e41bc4804e9f7c50d65dcdbb8c0a9d1a9e8af8c91bd8f",
"EsteriaFacelessTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaGnoll.bin": "cfacc8e681bb8e54a4f01ee9c12a91bf0bd23a23527bb548d4dc21ec1b33eea2",
"EsteriaGnollTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaHaranir.bin": "59f31d00e372fd2646e1cf0d9d3d5d671b31edd60ff7b862f8d1ce7e53ba1f2f",
"EsteriaHaranirTextures.bin": "99948ca570be2d376f0c67e3b8088739b6fa9f9d2c73985e19f68df77689a229",
"EsteriaHighmountain.bin": "e83349252ad2687ac23fcfc5623db7401cf32e5faf47a5a7be20c2f94b014938",
"EsteriaHozen.bin": "739bc3775388976f5c09bcbf3a98b62d804dff78d545e25a41d07dd99b5fddc5",
"EsteriaHozenTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaKvItems.bin": "fc5f9d86114234b38dbb0e14a6a5ec16249eaa92a73411a7fc371a950549dcce",
"EsteriaKvSkins.bin": "60b2b899f5f83137368514928f92f3b04c0fae058f534c487ddbe913ee4bec18",
"EsteriaKyrian.bin": "9329147f08805ff4003f9e062fea7c6ea8fdd8c4d6a40de63a6d228ebe1b7c9a",
"EsteriaKyrianTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaMantid.bin": "71536dee6c2abd0b0e13f33bc73cad7e6fb1b0fc1f6912a95c55d57bc7ee1787",
"EsteriaMantidTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaNaga.bin": "e87547cff5d09500c294f8b06935d134cdd0bbb962e294a72de09404505bd8b3",
"EsteriaNagaTextures.bin": "57ec560f99c1d48ac1e8f6a797c156513b99e7d349e3071afe405f812d159ae3",
"EsteriaSaberon.bin": "7735c9325c807c5125760d87f323d6b7d4162fb542c1d8b5f435ea2d6b9a4daa",
"EsteriaSaberonCoverage.bin": "9cdc227f08329e1245d2b864a996e7a772c96ecdbe5d81925f4d60cdbe4fa11e",
"EsteriaSaberonTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaSethrak.bin": "bd14857a8c11fdf8027128763293701586b2102f9a6539d33a727014789fd606",
"EsteriaSethrakTextures.bin": "d2b2cf58087a391f00198008fe871edd400ddf28d54a3a05674df74c5198528a",
"EsteriaSlime.bin": "491e942ceb6abda83c0249afebae7c9c43af3897b35e45fa33d6f9177ecbc177",
"EsteriaSlimeTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaTarasek.bin": "f718444d5ec36f7aff018883486ae1981151fe6e01f5b7781d68d74e9fadfa47",
"EsteriaTarasekTextures.bin": "1ba9133a75dad291d98a068b2dcde01f31a897a1764cd7f3e2c316c288a8f605",
"EsteriaThinHuman.bin": "bc12e5ca2c087ca0a8642ff6cd8e78fe2e1f85928518b12c19b4245a8320585d",
"EsteriaThinHumanTextures.bin": "27488a7494fa9733b53118d1d0f4acef50a9e19004f81f9c8a614b10f4c3fd5e",
"EsteriaTuskarr.bin": "ecbe7ef490ba67eca029a57639192db61238522618491549766fe38529914387",
"EsteriaTuskarrTextures.bin": "e2116c2c83adea079126fd5da765d20da24f044d4f161c4124e4368cb3d6bc71",
"EsteriaVenthyr.bin": "5bcf7804363e59b3c922830d06de17bbd348b9967307f39b7d72bc09f58814eb",
"EsteriaVenthyrTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaVorkai.bin": "d6d2088c7e867b5db437e9afc2d323c22d830c6f84a3598415eedcaa27e2461f",
"EsteriaVorkaiTextures.bin": "837774377ca055e6a5c79c1a4cfd8151e7c1f7ce2c16990b00fd445281137433",
"EsteriaVrykul.bin": "39e2b7b4c67997dbbd34bae840bd606a59290f7f2fc82565a0ba00090335415c",
"EsteriaVrykulTextures.bin": "46098750a0e235724c6e9cc8d9d4e26550aa47bef95fd5f0f82efe5e945bf296",
"EsteriaVulpera.bin": "c5434993b9af4a17d881965e4735cd2ac379e39c7142aac9844adff9528562d4",
"EsteriaVulperaTextures.bin": "1ab844e74684aced2b069f1b91cd563aade45e05bd5e23f866a6c0c301cb098e",
"Interface/AddOns/CoAHideArmor/CoAHideArmor.lua": "8c1c7403524fc9bd56c0809b4101b141da700ba163701209bf1420f2ef106aa7",
"Interface/AddOns/CoAHideArmor/CoAHideArmor.toc": "123580d92fd5ceee258e96296f42c359b7e83cdff151af49c50c6c4e2059677c",
"Interface/AddOns/CoAWC2Cursor/CoAWC2Cursor.lua": "1cf9537ff5f10b77250fea4407aea1008da690afe102ed6ed2dac21f79638cfa",
"Interface/AddOns/CoAWC2Cursor/CoAWC2Cursor.toc": "48ce695dce712b3643ebe13a77e318d623c964acc69479b8fc8cc675099801bf",
"Interface/AddOns/CoA_TalentReset/CoA_TalentReset.lua": "827d756d5948ef918fafaf8b869290b3a1faa4e4cc21b19b512a00d4509f3d41",
"Interface/AddOns/CoA_TalentReset/CoA_TalentReset.toc": "16298c04af68e68d6445e7a11f42aee525dd4145f85d2771ff434fb7c6e95a85",
"dinput8.dll": "f8de78606c241fb3911dce22faf68f5b9f9885b142b183c1e2c09ddc8f7e380c",
"wc2_human.cur": "f609736e29596bb386ef1597b157d211e01a86d32c2a929e256c581c37d71791",
"wc2_orc.cur": "baa512c9b9045762ba35b6e0d35b8f79c54b7649f35cc9c0e0cc8c168a1e5a97"
}
+4
View File
@@ -96,6 +96,9 @@ pub fn run(root: &Path, meta: &InstallMeta) -> Report {
if let Some(second) = &o.secondary_world {
services.push(("Second world", second));
}
if let Some(reborn) = &o.reborn_world {
services.push(("Warcraft Reborn world", reborn));
}
for (title, s) in services {
let (lvl, text) = match (s.state, &s.conflict) {
(ServiceState::Running, _) => (Level::Ok, "Running".to_string()),
@@ -639,6 +642,7 @@ fn processes_report(root: &Path, ports: &layout::Ports) -> String {
Some(&o.auth),
Some(&o.world),
o.secondary_world.as_ref(),
o.reborn_world.as_ref(),
]
.into_iter()
.flatten()
+3
View File
@@ -758,6 +758,7 @@ pub fn observe_with(d: &dyn Docker, root: &Path, ports: &Ports) -> Observed {
auth: unknown("auth", ports.auth),
world: unknown("world", ports.world),
secondary_world: None,
reborn_world: None,
};
};
let n = cfg.names();
@@ -767,6 +768,7 @@ pub fn observe_with(d: &dyn Docker, root: &Path, ports: &Ports) -> Observed {
auth: unknown("auth", ports.auth),
world: unknown("world", ports.world),
secondary_world: None,
reborn_world: None,
};
};
let ip = connect_ip(&cfg);
@@ -795,6 +797,7 @@ pub fn observe_with(d: &dyn Docker, root: &Path, ports: &Ports) -> Observed {
listening(state.get(&n.world), ports.world),
),
secondary_world: None,
reborn_world: None,
}
}
+1 -1
View File
@@ -254,7 +254,7 @@ fn run_inner(root: &Path, verb: Verb, validating_update: bool) -> Result<DriverO
let observed = crate::process::observe(&root, &crate::layout::read_ports(&root));
for service in [&observed.mysql, &observed.auth, &observed.world]
.into_iter()
.chain(observed.secondary_world.iter())
.chain(observed.extra_worlds())
{
if let Some(conflict) = &service.conflict {
output.push_str(&format!(
+10 -6
View File
@@ -88,23 +88,27 @@ fn run_elevated(commands: &[String]) -> Result<()> {
/// Make sure both rules exist (adds only the missing ones) and confirm afterwards.
pub fn ensure_rules(ports: &Ports) -> Result<Status> {
ensure_rules_with_secondary(ports, None)
ensure_rules_with_extra(ports, &[])
}
pub fn ensure_rules_with_secondary(ports: &Ports, secondary: Option<u16>) -> Result<Status> {
/// As `ensure_rules`, plus one rule for the world port of each extra realm that runs next to the main one.
pub fn ensure_rules_with_extra(ports: &Ports, extra: &[u16]) -> Result<Status> {
let have = status();
let mut cmds = plan(ports, &have);
let second_name = secondary.map(|port| format!("CoA Server Manager - Second World {port}"));
if let (Some(port), Some(name)) = (secondary, &second_name) {
let extra_names: Vec<String> = extra
.iter()
.map(|port| format!("CoA Server Manager - Second World {port}"))
.collect();
for (port, name) in extra.iter().zip(&extra_names) {
if !rule_exists(name) {
cmds.push(add_cmd(name, port));
cmds.push(add_cmd(name, *port));
}
}
if !cmds.is_empty() {
run_elevated(&cmds)?;
}
let now = status();
if now.auth && now.world && second_name.as_ref().is_none_or(|name| rule_exists(name)) {
if now.auth && now.world && extra_names.iter().all(|name| rule_exists(name)) {
Ok(now)
} else {
Err(Error::Invalid(
+75 -12
View File
@@ -163,20 +163,64 @@ pub fn set_open(root: &Path, meta: &Path, open: bool) -> Result<bool> {
/// Make the realm list advertise `host` to remote clients (the launcher resets it to 127.0.0.1 at every start, so this
/// runs after each start).
pub fn apply_realm_address(root: &Path, host: &str) -> Result<()> {
fn realm_address_sql(
host: &str,
local: Option<(std::net::Ipv4Addr, std::net::Ipv4Addr)>,
where_realms: &str,
) -> Result<String> {
if !host_ok(host) {
return Err(Error::Invalid("That address is not valid.".into()));
}
let db = Db::from_repack(root, Account::Admin)?;
let realm = crate::realms::state(root)?.active.realm_id();
let where_realms = if crate::realms::state(root)?.simultaneous {
"id IN (1,2)".into()
} else {
format!("id={realm}")
let local = local
.map(|(address, mask)| format!(",localAddress='{address}',localSubnetMask='{mask}'"))
.unwrap_or_default();
Ok(format!(
"UPDATE acore_auth.realmlist SET address='{host}'{local} WHERE {where_realms};"
))
}
pub fn apply_realm_address(root: &Path, settings: &Settings) -> Result<()> {
let host = settings.host.as_deref().unwrap_or("127.0.0.1");
let local = match settings.mode {
Mode::Direct | Mode::Lan => {
let address = if settings.mode == Mode::Lan {
host.to_owned()
} else {
crate::net::resolve_lan_host(
settings.lan_address_override.as_deref(),
crate::net::lan_ip(),
)?
};
let address = crate::net::validate_lan_address(&address)?;
let mask = if_addrs::get_if_addrs()?
.into_iter()
.find_map(|interface| match interface.addr {
if_addrs::IfAddr::V4(v4) if v4.ip == address => Some(v4.netmask),
_ => None,
})
.ok_or_else(|| {
Error::Invalid("The selected local network address is not connected.".into())
})?;
Some((address, mask))
}
Mode::Local => Some((
std::net::Ipv4Addr::LOCALHOST,
std::net::Ipv4Addr::new(255, 0, 0, 0),
)),
Mode::Private => None,
};
db.query(&format!(
"UPDATE acore_auth.realmlist SET address='{host}' WHERE {where_realms};"
))?;
let db = Db::from_repack(root, Account::Admin)?;
let state = crate::realms::state(root)?;
let mut ids = vec![state.active];
ids.extend(state.extra_modes());
let where_realms = format!(
"id IN ({})",
ids.iter()
.map(|m| m.realm_id().to_string())
.collect::<Vec<_>>()
.join(",")
);
db.query(&realm_address_sql(host, local, &where_realms)?)?;
Ok(())
}
@@ -194,9 +238,9 @@ pub fn ensure_bind(root: &Path, meta: &Path) -> Result<bool> {
/// After every server start: put the chosen address back into the realm list (the launcher resets it to 127.0.0.1).
pub fn reapply(root: &Path, meta: &Path) -> Result<()> {
let s = load(meta);
match (s.mode, s.host) {
match (s.mode, &s.host) {
(Mode::Local, _) | (_, None) => Ok(()),
(_, Some(host)) => apply_realm_address(root, &host),
(_, Some(_)) => apply_realm_address(root, &s),
}
}
@@ -390,6 +434,25 @@ CoA.AllowRemoteClients = 0
);
}
#[test]
fn realm_addresses_restore_lan_without_replacing_public_host() {
let sql = realm_address_sql(
"203.0.113.9",
Some((
"192.168.50.7".parse().unwrap(),
"255.255.254.0".parse().unwrap(),
)),
"id IN (1,2)",
)
.unwrap();
assert_eq!(sql, "UPDATE acore_auth.realmlist SET address='203.0.113.9',localAddress='192.168.50.7',localSubnetMask='255.255.254.0' WHERE id IN (1,2);");
assert_eq!(
realm_address_sql("100.64.1.2", None, "id=1").unwrap(),
"UPDATE acore_auth.realmlist SET address='100.64.1.2' WHERE id=1;"
);
assert!(realm_address_sql("bad'host", None, "id=1").is_err());
}
#[test]
fn old_settings_load_without_migrating_effective_host_to_override() {
let s: Settings = serde_json::from_str(r#"{"mode":"lan","host":"192.168.1.50"}"#).unwrap();
+253 -60
View File
@@ -12,12 +12,66 @@ use std::{
path::{Path, PathBuf},
};
pub fn root(main: &Path) -> PathBuf {
main.join(".realms/secondary")
/// A world that runs next to the primary one. Each has its own folder, configs, logs and ports; auth and MySQL stay shared.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Tree {
/// Wildcard next to Conquest of Azeroth (or Conquest of Azeroth next to Wildcard when Wildcard is the primary).
Second,
/// Warcraft Reborn next to Conquest of Azeroth.
Reborn,
}
pub fn is_running(main: &Path) -> bool {
let second = root(main);
impl Tree {
pub const ALL: [Tree; 2] = [Tree::Second, Tree::Reborn];
fn dir(self) -> &'static str {
match self {
Tree::Second => ".realms/secondary",
Tree::Reborn => ".realms/reborn",
}
}
fn label(self) -> &'static str {
match self {
Tree::Second => "second realm",
Tree::Reborn => "Warcraft Reborn realm",
}
}
fn mode(self, active: Mode) -> Mode {
match self {
Tree::Second if active == Mode::Coa => Mode::Wildcard,
Tree::Second => Mode::Coa,
Tree::Reborn => Mode::Reborn,
}
}
fn enabled(self, s: &RealmState) -> bool {
match self {
Tree::Second => s.simultaneous,
Tree::Reborn => s.with_reborn,
}
}
fn ports(self, s: &RealmState) -> (Option<u16>, Option<u16>) {
match self {
Tree::Second => (s.secondary_world_port, s.secondary_ra_port),
Tree::Reborn => (s.reborn_world_port, s.reborn_ra_port),
}
}
}
pub fn tree_root(main: &Path, tree: Tree) -> PathBuf {
main.join(tree.dir())
}
/// The folder of the second realm (Wildcard next to Conquest of Azeroth).
pub fn root(main: &Path) -> PathBuf {
tree_root(main, Tree::Second)
}
pub fn tree_running(main: &Path, tree: Tree) -> bool {
let second = tree_root(main, tree);
if !second.exists() {
return false;
}
@@ -28,6 +82,26 @@ pub fn is_running(main: &Path) -> bool {
.any(|n| process::read_state_record(&second, n).is_some_and(|p| process::is_alive(&p)))
}
/// The folder whose world server runs `mode`: the main folder, or the folder of the extra world that runs that realm.
/// Its settings hold the console port that belongs to that world.
pub fn world_root(main: &Path, mode: Mode) -> PathBuf {
let Ok(s) = realms::state(main) else {
return main.to_path_buf();
};
if mode == s.active {
return main.to_path_buf();
}
Tree::ALL
.into_iter()
.find(|t| t.enabled(&s) && t.mode(s.active) == mode)
.map_or_else(|| main.to_path_buf(), |t| tree_root(main, t))
}
/// Any of the extra worlds is running or still stopping.
pub fn is_running(main: &Path) -> bool {
Tree::ALL.into_iter().any(|t| tree_running(main, t))
}
fn copy_tree(from: &Path, to: &Path) -> Result<()> {
fs::create_dir_all(to)?;
for entry in fs::read_dir(from)? {
@@ -55,23 +129,52 @@ fn copy_tree(from: &Path, to: &Path) -> Result<()> {
Ok(())
}
/// Start Wildcard together with Conquest of Azeroth.
pub fn set_enabled(main: &Path, enabled: bool) -> Result<realms::View> {
set_tree(main, Tree::Second, enabled)
}
/// Start Warcraft Reborn together with Conquest of Azeroth.
pub fn set_reborn_enabled(main: &Path, enabled: bool) -> Result<realms::View> {
set_tree(main, Tree::Reborn, enabled)
}
fn set_tree(main: &Path, tree: Tree, enabled: bool) -> Result<realms::View> {
if enabled && !cfg!(windows) {
return Err(Error::Invalid(
"Simultaneous realms currently require Windows.".into(),
));
}
if enabled {
if realms::state(main)?.active == Mode::Reborn {
return Err(Error::Invalid(
"Simultaneous startup supports CoA and Wildcard. Select one of these realms first."
.into(),
));
}
if !realms::view(main)?.supported {
return Err(Error::Invalid(
"Update the server to a build with Wildcard support first.".into(),
));
let active = realms::state(main)?.active;
let view = realms::view(main)?;
match tree {
Tree::Second => {
if active == Mode::Reborn {
return Err(Error::Invalid(
"Wildcard starts together with Conquest of Azeroth. Select Conquest of Azeroth first."
.into(),
));
}
if !view.supported {
return Err(Error::Invalid(
"Update the server to a build with Wildcard support first.".into(),
));
}
}
Tree::Reborn => {
if active != Mode::Coa {
return Err(Error::Invalid(
"Warcraft Reborn starts together with Conquest of Azeroth. Select Conquest of Azeroth first."
.into(),
));
}
if !view.reborn_supported {
return Err(Error::Invalid(
"Update the server to a build with Warcraft Reborn support first.".into(),
));
}
}
}
secondary_launcher(&fs::read_to_string(main.join("Scripts/manage.py"))?)?;
}
@@ -81,20 +184,21 @@ pub fn set_enabled(main: &Path, enabled: bool) -> Result<realms::View> {
|| is_running(main)
{
return Err(Error::Invalid(
"Stop both realms before changing simultaneous startup.".into(),
"Stop all realms before changing which realms start together.".into(),
));
}
let original = realms::state(main)?.active;
if enabled && !realms::state(main)?.wildcard_created {
realms::select(main, Mode::Wildcard)?;
if original != Mode::Wildcard {
realms::select(main, original)?;
}
if enabled {
realms::ensure_created(main, tree.mode(realms::state(main)?.active))?;
}
let mut s = realms::state(main)?;
if enabled {
let p = crate::layout::read_ports(main);
let mut reserved = vec![p.mysql, p.auth, p.world, p.ra];
// Ports already saved for any other extra world stay reserved, so two worlds never get the same one.
for other in Tree::ALL.into_iter().filter(|t| *t != tree) {
let (world, ra) = other.ports(&s);
reserved.extend(world.into_iter().chain(ra));
}
let mut choose = |saved: Option<u16>, near: u16| -> Result<u16> {
if let Some(port) = saved.filter(|p| *p > 0 && !reserved.contains(p)) {
reserved.push(port);
@@ -104,31 +208,41 @@ pub fn set_enabled(main: &Path, enabled: bool) -> Result<realms::View> {
.find(|p| {
!reserved.contains(p) && std::net::TcpListener::bind(("127.0.0.1", *p)).is_ok()
})
.ok_or_else(|| Error::Invalid("No free port for the second realm.".into()))?;
.ok_or_else(|| Error::Invalid(format!("No free port for the {}.", tree.label())))?;
reserved.push(port);
Ok(port)
};
s.secondary_world_port = Some(choose(s.secondary_world_port, p.world)?);
s.secondary_ra_port = Some(choose(s.secondary_ra_port, p.ra)?);
let (world, ra) = tree.ports(&s);
let (world, ra) = (choose(world, p.world)?, choose(ra, p.ra)?);
match tree {
Tree::Second => {
s.secondary_world_port = Some(world);
s.secondary_ra_port = Some(ra);
}
Tree::Reborn => {
s.reborn_world_port = Some(world);
s.reborn_ra_port = Some(ra);
}
}
}
match tree {
Tree::Second => s.simultaneous = enabled,
Tree::Reborn => s.with_reborn = enabled,
}
s.simultaneous = enabled;
fsx::atomic_write_json(&main.join("Settings/realm-profile.json"), &s)?;
realms::view(main)
}
fn prepare(main: &Path) -> Result<PathBuf> {
if is_running(main) {
return Err(Error::Invalid(
"The second realm is still running; stop it before preparing its files.".into(),
));
fn prepare(main: &Path, tree: Tree) -> Result<PathBuf> {
if tree_running(main, tree) {
return Err(Error::Invalid(format!(
"The {} is still running; stop it before preparing its files.",
tree.label()
)));
}
let s = realms::state(main)?;
let mode = if s.active == Mode::Coa {
Mode::Wildcard
} else {
Mode::Coa
};
let second = fsx::ensure_within(main, &root(main))?;
let mode = tree.mode(s.active);
let second = fsx::ensure_within(main, &tree_root(main, tree))?;
for folder in ["Runtime", "BugReport", "mysql/bin"] {
copy_tree(
&main.join(folder),
@@ -214,13 +328,12 @@ fn prepare(main: &Path) -> Result<PathBuf> {
)?;
}
let mut cfg: serde_json::Value = fsx::read_json(&main.join("Settings/repack.json"))?;
cfg["worldPort"] = s
.secondary_world_port
.ok_or_else(|| Error::Invalid("Second realm world port is missing.".into()))?
let (world_port, ra_port) = tree.ports(&s);
cfg["worldPort"] = world_port
.ok_or_else(|| Error::Invalid(format!("The {} world port is missing.", tree.label())))?
.into();
cfg["raPort"] = s
.secondary_ra_port
.ok_or_else(|| Error::Invalid("Second realm console port is missing.".into()))?
cfg["raPort"] = ra_port
.ok_or_else(|| Error::Invalid(format!("The {} console port is missing.", tree.label())))?
.into();
fsx::atomic_write_json(&second.join("Settings/repack.json"), &cfg)?;
fsx::atomic_write(
@@ -232,6 +345,7 @@ fn prepare(main: &Path) -> Result<PathBuf> {
&RealmState {
active: mode,
wildcard_created: true,
reborn_created: true,
..Default::default()
},
)?;
@@ -256,12 +370,9 @@ fn secondary_launcher(source: &str) -> Result<String> {
))
}
pub fn start(main: &Path) -> Result<()> {
if !realms::state(main)?.simultaneous {
return Ok(());
}
if is_running(main) {
let second = root(main);
fn start_tree(main: &Path, tree: Tree) -> Result<()> {
if tree_running(main, tree) {
let second = tree_root(main, tree);
if process::observe(&second, &crate::layout::read_ports(&second))
.world
.state
@@ -269,35 +380,50 @@ pub fn start(main: &Path) -> Result<()> {
{
return Ok(());
}
return Err(Error::Invalid(
"The second realm is still starting or stopping.".into(),
));
return Err(Error::Invalid(format!(
"The {} is still starting or stopping.",
tree.label()
)));
}
let second = prepare(main)?;
let second = prepare(main, tree)?;
let out = driver::run(&second, Verb::StartWorld)?;
if !out.ok {
return Err(Error::Invalid(format!(
"The second realm did not start: {}",
"The {} did not start: {}",
tree.label(),
out.output
)));
}
Ok(())
}
pub fn stop(main: &Path) -> Result<()> {
let second = root(main);
/// Start every extra world that is switched on.
pub fn start(main: &Path) -> Result<()> {
let s = realms::state(main)?;
for tree in Tree::ALL.into_iter().filter(|t| t.enabled(&s)) {
start_tree(main, tree)?;
}
Ok(())
}
fn stop_tree(main: &Path, tree: Tree) -> Result<()> {
let second = tree_root(main, tree);
if !second.join("Scripts/manage.py").exists() {
if is_running(main) {
return Err(Error::Invalid("The running second realm's launcher is missing. The shared database was left running.".into()));
if tree_running(main, tree) {
return Err(Error::Invalid(format!(
"The running {}'s launcher is missing. The shared database was left running.",
tree.label()
)));
}
return Ok(());
}
// Its state has no auth/MySQL records: the shared database remains up until the primary world stops.
if is_running(main) {
if tree_running(main, tree) {
let out = driver::run(&second, Verb::StopAll)?;
if !out.ok || is_running(main) {
if !out.ok || tree_running(main, tree) {
return Err(Error::Invalid(format!(
"The second realm could not stop; the database was left running: {}",
"The {} could not stop; the database was left running: {}",
tree.label(),
out.output
)));
}
@@ -305,9 +431,76 @@ pub fn stop(main: &Path) -> Result<()> {
Ok(())
}
/// Stop every extra world; one that fails does not keep the others running.
pub fn stop(main: &Path) -> Result<()> {
let mut first = None;
for tree in Tree::ALL {
if let Err(e) = stop_tree(main, tree) {
first.get_or_insert(e);
}
}
first.map_or(Ok(()), Err)
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn every_extra_world_has_its_own_folder_realm_and_ports() {
let mut s = RealmState::default();
assert_eq!(Tree::Second.mode(Mode::Coa), Mode::Wildcard);
assert_eq!(Tree::Second.mode(Mode::Wildcard), Mode::Coa);
assert_eq!(Tree::Reborn.mode(Mode::Coa), Mode::Reborn);
assert_ne!(Tree::Second.dir(), Tree::Reborn.dir());
s.secondary_world_port = Some(8086);
s.reborn_world_port = Some(8087);
assert_eq!(Tree::Second.ports(&s).0, Some(8086));
assert_eq!(Tree::Reborn.ports(&s).0, Some(8087));
assert!(!Tree::Second.enabled(&s) && !Tree::Reborn.enabled(&s));
s.with_reborn = true;
assert!(!Tree::Second.enabled(&s) && Tree::Reborn.enabled(&s));
}
#[test]
fn a_realm_is_reached_through_the_folder_of_its_own_world() {
let t = tempfile::tempdir().unwrap();
let main = t.path();
fsx::atomic_write(
&main.join("Settings/realm-profile.json"),
br#"{"active":"coa","wildcard_created":true,"reborn_created":true,"simultaneous":true,"with_reborn":true}"#,
)
.unwrap();
assert_eq!(world_root(main, Mode::Coa), main);
assert_eq!(world_root(main, Mode::Wildcard), main.join(".realms/secondary"));
assert_eq!(world_root(main, Mode::Reborn), main.join(".realms/reborn"));
// A realm that is not switched on has no world of its own: the main folder answers.
fsx::atomic_write(
&main.join("Settings/realm-profile.json"),
br#"{"active":"coa","wildcard_created":true,"reborn_created":true,"with_reborn":true}"#,
)
.unwrap();
assert_eq!(world_root(main, Mode::Wildcard), main);
assert_eq!(world_root(main, Mode::Reborn), main.join(".realms/reborn"));
}
#[test]
fn reborn_starts_together_with_conquest_of_azeroth_only() {
let t = tempfile::tempdir().unwrap();
fsx::atomic_write(
&t.path().join("Core/worldserver.exe"),
b"Warcraft Reborn class spells are unavailable",
)
.unwrap();
fsx::atomic_write(
&t.path().join("Settings/realm-profile.json"),
br#"{"active":"wildcard","wildcard_created":true}"#,
)
.unwrap();
let err = set_reborn_enabled(t.path(), true).unwrap_err().to_string();
assert!(err.contains("Select Conquest of Azeroth first"), "{err}");
assert!(!realms::state(t.path()).unwrap().with_reborn);
}
#[test]
fn secondary_never_starts_the_shared_database() {
let patched = secondary_launcher("def start_world(config, offset):\r\n start_mysql(config)\r\n wait_ready('world', 8086)\r\n").unwrap();
+2 -1
View File
@@ -284,7 +284,7 @@ fn stop_failure(
)];
for service in [&status.mysql, &status.auth, &status.world]
.into_iter()
.chain(status.secondary_world.iter())
.chain(status.extra_worlds())
{
if service.state != crate::process::ServiceState::Stopped {
details.push(format!(
@@ -506,6 +506,7 @@ mod tests {
auth: stopped("auth"),
world: stopped("world"),
secondary_world: None,
reborn_world: None,
};
let outcome = crate::driver::DriverOutcome {
ok: false,
@@ -248,9 +248,15 @@ impl RealmAccess {
}
}
/// The folder of the world server this realm runs in: an extra world next to the main one has its own console port.
fn world_folder(&self, root: &Path) -> PathBuf {
self.mode
.map_or_else(|| root.to_path_buf(), |m| crate::multiworld::world_root(root, m))
}
pub fn ra(&self) -> Result<Ra> {
match &self.source {
Source::Install { root } => Ra::connect(root),
Source::Install { root } => Ra::connect(&self.world_folder(root)),
Source::Descriptor(d) => Ra::connect_to(d.ra_port, &d.ra_user, d.ra_password.expose()),
}
}
@@ -261,7 +267,7 @@ impl RealmAccess {
pub fn ports(&self) -> (Option<u16>, u16) {
match &self.source {
Source::Install { root } => (None, read_ports(root).ra),
Source::Install { root } => (None, read_ports(&self.world_folder(root)).ra),
Source::Descriptor(d) => (Some(d.db_port), d.ra_port),
}
}
@@ -1681,6 +1681,8 @@ impl PortableService {
let ops = [Operation::OnlineImport, Operation::RuntimeSession];
let report = self.report(&model, &caps, &opts, &ops, true);
if verdict_of(report.verdict()) == Verdict::Incompatible {
#[cfg(test)]
eprintln!("Remote import compatibility: {report:?}");
return Err(fail(
"incompatible",
"Character is incompatible with this realm; nothing was changed.",
+34 -13
View File
@@ -64,6 +64,16 @@ pub struct Observed {
pub auth: ServiceStatus,
pub world: ServiceStatus,
pub secondary_world: Option<ServiceStatus>,
/// The Warcraft Reborn world that starts together with Conquest of Azeroth.
#[serde(default)]
pub reborn_world: Option<ServiceStatus>,
}
impl Observed {
/// The worlds that run next to the primary one.
pub fn extra_worlds(&self) -> impl Iterator<Item = &ServiceStatus> {
self.secondary_world.iter().chain(self.reborn_world.iter())
}
}
pub fn read_state_record(root: &Path, name: &str) -> Option<ProcessIdentity> {
@@ -392,20 +402,30 @@ pub fn observe(root: &Path, ports: &Ports) -> Observed {
}
let listen = listeners();
let (world, auth, mysql) = crate::layout::executables(root);
let secondary = crate::multiworld::root(root);
let secondary_world = if crate::realms::state(root).is_ok_and(|s| s.simultaneous)
|| crate::multiworld::is_running(root)
{
Some(service(
&secondary,
"world-secondary",
secondary.join("Core/worldserver.exe"),
crate::layout::read_ports(&secondary).world,
&listen,
))
} else {
None
use crate::multiworld::Tree;
let realm_state = crate::realms::state(root).ok();
let extra_world = |tree: Tree, name: &'static str, enabled: bool| {
let folder = crate::multiworld::tree_root(root, tree);
(enabled || crate::multiworld::tree_running(root, tree)).then(|| {
service(
&folder,
name,
folder.join("Core/worldserver.exe"),
crate::layout::read_ports(&folder).world,
&listen,
)
})
};
let secondary_world = extra_world(
Tree::Second,
"world-secondary",
realm_state.as_ref().is_some_and(|s| s.simultaneous),
);
let reborn_world = extra_world(
Tree::Reborn,
"world-reborn",
realm_state.as_ref().is_some_and(|s| s.with_reborn),
);
Observed {
mysql: service(root, "mysql", mysql, ports.mysql, &listen),
auth: service(root, "auth", auth, ports.auth, &listen),
@@ -418,6 +438,7 @@ pub fn observe(root: &Path, ports: &Ports) -> Observed {
&listen,
),
secondary_world,
reborn_world,
}
}
+4 -1
View File
@@ -154,7 +154,10 @@ pub fn find_access(
st.active == crate::realms::Mode::Wildcard
|| (st.simultaneous && st.wildcard_created)
}
crate::realms::Mode::Reborn => st.active == crate::realms::Mode::Reborn,
crate::realms::Mode::Reborn => {
st.active == crate::realms::Mode::Reborn
|| (st.with_reborn && st.reborn_created)
}
};
if !supported {
return None;
+300 -50
View File
@@ -63,15 +63,50 @@ pub struct RealmState {
pub wildcard_created: bool,
#[serde(default)]
pub reborn_created: bool,
/// Wildcard starts together with Conquest of Azeroth (the second of the two when Wildcard is the primary realm).
#[serde(default)]
pub simultaneous: bool,
#[serde(default)]
pub secondary_world_port: Option<u16>,
#[serde(default)]
pub secondary_ra_port: Option<u16>,
/// Warcraft Reborn starts together with Conquest of Azeroth, which is then the primary realm.
#[serde(default)]
pub with_reborn: bool,
#[serde(default)]
pub reborn_world_port: Option<u16>,
#[serde(default)]
pub reborn_ra_port: Option<u16>,
}
impl RealmState {
/// World ports of the realms that run next to the primary one (the ones that are switched on).
pub fn extra_world_ports(&self) -> Vec<u16> {
[
self.secondary_world_port.filter(|_| self.simultaneous),
self.reborn_world_port.filter(|_| self.with_reborn),
]
.into_iter()
.flatten()
.collect()
}
/// Realms that run as a world of their own next to the primary one.
pub fn extra_modes(&self) -> Vec<Mode> {
let mut modes = Vec::new();
if self.simultaneous {
modes.push(if self.active == Mode::Coa {
Mode::Wildcard
} else {
Mode::Coa
});
}
if self.with_reborn {
modes.push(Mode::Reborn);
}
modes
}
pub fn created(&self, mode: Mode) -> bool {
match mode {
Mode::Coa => true,
@@ -101,6 +136,9 @@ pub struct View {
pub simultaneous: bool,
pub secondary_world_port: Option<u16>,
pub secondary_running: bool,
pub with_reborn: bool,
pub reborn_world_port: Option<u16>,
pub reborn_running: bool,
}
pub fn state(root: &Path) -> Result<RealmState> {
@@ -139,7 +177,10 @@ pub fn view(root: &Path) -> Result<View> {
recovery_pending: root.join(JOURNAL).exists(),
simultaneous: s.simultaneous,
secondary_world_port: s.secondary_world_port,
secondary_running: crate::multiworld::is_running(root),
secondary_running: crate::multiworld::tree_running(root, crate::multiworld::Tree::Second),
with_reborn: s.with_reborn,
reborn_world_port: s.reborn_world_port,
reborn_running: crate::multiworld::tree_running(root, crate::multiworld::Tree::Reborn),
})
}
@@ -447,6 +488,58 @@ fn create_databases(root: &Path, mode: Mode) -> Result<()> {
})
}
/// Create the saved settings and the databases of a realm that was never set up. `before` is the current
/// configuration, the base of a new realm while Conquest of Azeroth is the active one.
fn create_realm(root: &Path, s: &mut RealmState, mode: Mode, before: &Files) -> Result<()> {
if s.created(mode) {
return Ok(());
}
let base = if s.active == Mode::Coa {
before.clone()
} else {
fsx::read_json(&snapshot(root, Mode::Coa))?
};
let files = match mode {
Mode::Wildcard => wildcard_configs(base)?,
Mode::Reborn => reborn_configs(base)?,
Mode::Coa => unreachable!(),
};
fsx::atomic_write_json(&snapshot(root, mode), &files)?;
create_databases(root, mode)?;
match mode {
Mode::Wildcard => s.wildcard_created = true,
Mode::Reborn => s.reborn_created = true,
Mode::Coa => {}
}
fsx::atomic_write_json(&root.join(STATE), s)?;
Ok(())
}
/// Set a realm up without making it the active one, so it can start next to the active realm.
pub fn ensure_created(root: &Path, mode: Mode) -> Result<()> {
let meta = crate::registry::metadata_dir_for(root)?;
let _update_lock = crate::update::operation_lock(&meta)?;
crate::update::ensure_recovered(&meta)?;
require_world_stopped(root)?;
recover(root)?;
let mut s = state(root)?;
let supported = view(root)?;
if mode == Mode::Wildcard && !supported.supported {
return Err(Error::Invalid(
"Update the server to a build with Wildcard support first.".into(),
));
}
if mode == Mode::Reborn && !supported.reborn_supported {
return Err(Error::Invalid(
"Update the server to a build with Warcraft Reborn support first.".into(),
));
}
// Verify launcher support before creating databases, as selecting a realm does.
prepare_launcher(root)?;
let before = configs(root)?;
create_realm(root, &mut s, mode, &before)
}
pub fn select(root: &Path, mode: Mode) -> Result<View> {
let meta = crate::registry::metadata_dir_for(root)?;
let _update_lock = crate::update::operation_lock(&meta)?;
@@ -467,35 +560,16 @@ pub fn select(root: &Path, mode: Mode) -> Result<View> {
"Update the server to a build with Warcraft Reborn support first.".into(),
));
}
if s.simultaneous && mode != s.active {
if (s.simultaneous || s.with_reborn) && mode != s.active {
return Err(Error::Invalid(
"Disable simultaneous startup before switching realms.".into(),
"Disable the realms that start together before switching realms.".into(),
));
}
// Verify launcher support before creating databases or changing the selected realm.
prepare_launcher(root)?;
let before = configs(root)?;
fsx::atomic_write_json(&snapshot(root, s.active), &before)?;
if !s.created(mode) {
let base = if s.active == Mode::Coa {
before.clone()
} else {
fsx::read_json(&snapshot(root, Mode::Coa))?
};
let files = match mode {
Mode::Wildcard => wildcard_configs(base)?,
Mode::Reborn => reborn_configs(base)?,
Mode::Coa => unreachable!(),
};
fsx::atomic_write_json(&snapshot(root, mode), &files)?;
create_databases(root, mode)?;
match mode {
Mode::Wildcard => s.wildcard_created = true,
Mode::Reborn => s.reborn_created = true,
Mode::Coa => {}
}
fsx::atomic_write_json(&root.join(STATE), &s)?;
}
create_realm(root, &mut s, mode, &before)?;
let target: Files = fsx::read_json(&snapshot(root, mode))?;
// The launcher and batch files share this lock; recheck after the potentially long database copy.
fs::create_dir_all(root.join(".state"))?;
@@ -653,9 +727,46 @@ pub(crate) fn unpatch_launcher(source: &str) -> Option<String> {
(check == source).then_some(original)
}
/// The character-creation model the world server advertises for a realm. Every realm has its own database and its own
/// entry on Overview, so it advertises exactly one model: a list such as `"coa wcr"` would let players create
/// Warcraft Reborn characters in the Conquest of Azeroth realm.
fn class_model_for(mode: Mode) -> &'static str {
match mode {
Mode::Coa => "coa",
Mode::Wildcard => "hero",
Mode::Reborn => "wcr",
}
}
/// The client builds its character-creation screen from `CoA.ClassModel`, so a realm whose setting lacks its own
/// model would show the wrong screen (a Conquest of Azeroth realm set to `"hero"` has no classes). The realm chosen in
/// the Manager wins: any other setting is replaced by the realm's own model.
/// A missing key means the server default, `"coa"`; a missing file is left to the server.
fn align_class_model(root: &Path, mode: Mode) -> Result<()> {
let path = root.join("Core/configs/modules/coa.conf");
let Ok(bytes) = fs::read(&path) else {
return Ok(());
};
let mut conf = ConfFile::parse_bytes(&bytes)?;
let current = conf
.get("CoA.ClassModel")
.map(crate::config::parser::unquote)
.unwrap_or("coa")
.to_string();
let wanted = class_model_for(mode);
if current.split_whitespace().eq([wanted]) {
return Ok(());
}
conf.set("CoA.ClassModel", &format!("\"{wanted}\""), &[]);
fsx::atomic_write(&path, conf.to_text().as_bytes())?;
tracing::warn!(realm = mode.name(), from = %current, to = wanted, "CoA.ClassModel did not fit the selected realm and was corrected");
Ok(())
}
pub fn before_start(root: &Path) -> Result<()> {
recover(root)?;
let s = state(root)?;
align_class_model(root, s.active)?;
if !root.join(STATE).exists() {
return Ok(());
}
@@ -665,12 +776,22 @@ pub fn before_start(root: &Path) -> Result<()> {
"The installed server build does not support simultaneous Wildcard startup.".into(),
));
}
if s.simultaneous && s.active == Mode::Reborn {
if (s.simultaneous || s.with_reborn) && s.active == Mode::Reborn {
return Err(Error::Invalid(
"Simultaneous startup supports CoA and Wildcard only.".into(),
"Realms that start together need Conquest of Azeroth or Wildcard as the main realm.".into(),
));
}
if s.simultaneous {
if s.with_reborn && s.active != Mode::Coa {
return Err(Error::Invalid(
"Warcraft Reborn can start together with Conquest of Azeroth only. Select Conquest of Azeroth first.".into(),
));
}
if s.with_reborn && !view(root)?.reborn_supported {
return Err(Error::Invalid(
"The installed server build does not support Warcraft Reborn.".into(),
));
}
if s.simultaneous || s.with_reborn {
fsx::atomic_write_json(&snapshot(root, s.active), &configs(root)?)?;
}
if s.active == Mode::Reborn && !view(root)?.reborn_supported {
@@ -734,37 +855,38 @@ pub fn setup_realmlist(root: &Path) -> Result<()> {
};
db.query(&format!("UPDATE acore_auth.realmlist SET port=CASE id WHEN 1 THEN {coa} ELSE {wildcard} END,flag=0 WHERE id IN (1,2);"))?;
}
if s.with_reborn {
let reborn = s
.reborn_world_port
.ok_or_else(|| Error::Invalid("Warcraft Reborn realm port is missing.".into()))?;
db.query(&format!(
"UPDATE acore_auth.realmlist SET port={reborn},flag=0 WHERE id={};",
Mode::Reborn.realm_id()
))?;
}
Ok(())
}
pub fn world_port_for_mode(root: &Path, mode: Mode) -> Result<u16> {
let ports = crate::layout::read_ports(root);
let s = state(root)?;
if s.simultaneous {
let second = s
.secondary_world_port
.ok_or_else(|| Error::Invalid("Second realm port is missing.".into()))?;
let port = match (s.active, mode) {
(Mode::Coa, Mode::Coa) => ports.world,
(Mode::Coa, Mode::Wildcard) => second,
(Mode::Wildcard, Mode::Wildcard) => ports.world,
(Mode::Wildcard, Mode::Coa) => second,
_ => {
return Err(Error::Invalid(format!(
"Unsupported mode {mode:?} for simultaneous hosting (active: {:?})",
s.active
)))
}
};
Ok(port)
} else if mode == s.active {
Ok(ports.world)
} else {
Err(Error::Invalid(format!(
"Realm mode {mode:?} is not active (active: {:?}) and simultaneous mode is disabled.",
s.active
)))
if mode == s.active {
return Ok(ports.world);
}
if mode == Mode::Reborn && s.with_reborn && s.active == Mode::Coa {
return s
.reborn_world_port
.ok_or_else(|| Error::Invalid("Warcraft Reborn realm port is missing.".into()));
}
if s.simultaneous && matches!((s.active, mode), (Mode::Coa, Mode::Wildcard) | (Mode::Wildcard, Mode::Coa)) {
return s
.secondary_world_port
.ok_or_else(|| Error::Invalid("Second realm port is missing.".into()));
}
Err(Error::Invalid(format!(
"Realm mode {mode:?} is not active (active: {:?}) and simultaneous mode is disabled.",
s.active
)))
}
#[cfg(test)]
@@ -838,6 +960,134 @@ mod tests {
assert!(guard_module(t.path(), "content-scaling").is_ok());
}
fn write_class_model(root: &Path, text: &str) {
fsx::atomic_write(&root.join("Core/configs/modules/coa.conf"), text.as_bytes()).unwrap();
}
fn class_model(root: &Path) -> String {
let bytes = fs::read(root.join("Core/configs/modules/coa.conf")).unwrap();
ConfFile::parse_bytes(&bytes)
.unwrap()
.get("CoA.ClassModel")
.unwrap_or_default()
.to_string()
}
#[test]
fn a_class_model_that_does_not_fit_the_realm_is_replaced_by_the_realms_own() {
let t = tempfile::tempdir().unwrap();
// No file: left to the server. No key: the server default "coa" applies, which fits Conquest of Azeroth.
align_class_model(t.path(), Mode::Coa).unwrap();
assert!(!t.path().join("Core/configs/modules/coa.conf").exists());
write_class_model(t.path(), "[worldserver]
# CoA.ClassModel = \"hero\"
");
align_class_model(t.path(), Mode::Coa).unwrap();
assert_eq!(class_model(t.path()), "");
write_class_model(t.path(), "# note
CoA.ClassModel = \"hero\"
CoA.GameModeMask = 0
");
align_class_model(t.path(), Mode::Coa).unwrap();
assert_eq!(
fs::read_to_string(t.path().join("Core/configs/modules/coa.conf")).unwrap(),
"# note
CoA.ClassModel = \"coa\"
CoA.GameModeMask = 0
"
);
align_class_model(t.path(), Mode::Wildcard).unwrap();
assert_eq!(class_model(t.path()), "\"hero\"");
align_class_model(t.path(), Mode::Reborn).unwrap();
assert_eq!(class_model(t.path()), "\"wcr\"");
// A missing key does not fit a realm other than Conquest of Azeroth.
write_class_model(t.path(), "[worldserver]
");
align_class_model(t.path(), Mode::Wildcard).unwrap();
assert_eq!(class_model(t.path()), "\"hero\"");
}
#[test]
fn a_class_model_list_is_narrowed_to_the_realms_own_model() {
let t = tempfile::tempdir().unwrap();
// The shipped default serves two models; the realm chosen in the Manager keeps only its own.
for (mode, want) in [(Mode::Coa, "\"coa\""), (Mode::Reborn, "\"wcr\"")] {
write_class_model(t.path(), "CoA.ClassModel = \"coa wcr\"
");
align_class_model(t.path(), mode).unwrap();
assert_eq!(class_model(t.path()), want);
}
// A setting that is already exactly right is not rewritten, quoted or not.
for (text, mode) in [
("CoA.ClassModel = \"coa\"
", Mode::Coa),
("CoA.ClassModel = hero
", Mode::Wildcard),
] {
write_class_model(t.path(), text);
align_class_model(t.path(), mode).unwrap();
assert_eq!(
fs::read_to_string(t.path().join("Core/configs/modules/coa.conf")).unwrap(),
text
);
}
}
#[test]
fn before_start_aligns_the_class_model_with_the_active_realm() {
let t = tempfile::tempdir().unwrap();
write_class_model(t.path(), "CoA.ClassModel = \"hero\"
");
before_start(t.path()).unwrap();
assert_eq!(class_model(t.path()), "\"coa\"");
}
#[test]
fn extra_realms_follow_the_two_switches_and_old_states_still_load() {
let old: RealmState = serde_json::from_str(
r#"{"active":"coa","wildcard_created":true,"simultaneous":true,"secondary_world_port":8086}"#,
)
.unwrap();
assert!(!old.with_reborn && old.reborn_world_port.is_none());
assert_eq!(old.extra_modes(), [Mode::Wildcard]);
let mut s = RealmState::default();
assert!(s.extra_modes().is_empty());
s.with_reborn = true;
assert_eq!(s.extra_modes(), [Mode::Reborn]);
s.simultaneous = true;
assert_eq!(s.extra_modes(), [Mode::Wildcard, Mode::Reborn]);
s.secondary_world_port = Some(8086);
s.reborn_world_port = Some(8087);
assert_eq!(s.extra_world_ports(), [8086, 8087]);
s.with_reborn = false;
assert_eq!(s.extra_world_ports(), [8086]);
s.with_reborn = true;
// Wildcard as the main realm still pairs with Conquest of Azeroth.
s.active = Mode::Wildcard;
s.with_reborn = false;
assert_eq!(s.extra_modes(), [Mode::Coa]);
}
#[test]
fn each_running_realm_has_its_own_world_port() {
let t = tempfile::tempdir().unwrap();
fsx::atomic_write(&t.path().join("Settings/repack.json"), br#"{"worldPort": 8085}"#).unwrap();
let write = |json: &str| fsx::atomic_write(&t.path().join(STATE), json.as_bytes()).unwrap();
write(r#"{"active":"coa","wildcard_created":true,"reborn_created":true,"simultaneous":true,"secondary_world_port":8086,"with_reborn":true,"reborn_world_port":8087}"#);
assert_eq!(world_port_for_mode(t.path(), Mode::Coa).unwrap(), 8085);
assert_eq!(world_port_for_mode(t.path(), Mode::Wildcard).unwrap(), 8086);
assert_eq!(world_port_for_mode(t.path(), Mode::Reborn).unwrap(), 8087);
// Only Reborn next to Conquest of Azeroth: Wildcard is not running anywhere.
write(r#"{"active":"coa","wildcard_created":true,"reborn_created":true,"with_reborn":true,"reborn_world_port":8087}"#);
assert_eq!(world_port_for_mode(t.path(), Mode::Reborn).unwrap(), 8087);
assert!(world_port_for_mode(t.path(), Mode::Wildcard).is_err());
// Reborn only pairs with Conquest of Azeroth as the main realm.
write(r#"{"active":"wildcard","wildcard_created":true,"reborn_created":true,"with_reborn":true,"reborn_world_port":8087}"#);
assert!(world_port_for_mode(t.path(), Mode::Reborn).is_err());
}
#[test]
fn reborn_support_requires_the_new_code_in_the_installed_binary() {
let t = tempfile::tempdir().unwrap();
+52
View File
@@ -39,6 +39,8 @@ fn sql_in(dir: &Path) -> Vec<PathBuf> {
fn introduction_rank(repo: &Path, pathspecs: &[&str]) -> std::collections::HashMap<String, usize> {
let mut args = vec![
"log",
"--full-history",
"--diff-merges=first-parent",
"--reverse",
"--diff-filter=A",
"--name-only",
@@ -306,6 +308,56 @@ pub fn revision(commit: &str) -> Revision {
mod tests {
use super::*;
#[test]
fn migrations_added_by_a_merge_precede_later_dependent_updates() {
let directory = tempfile::tempdir().unwrap();
let root = directory.path();
let git = |args: &[&str]| {
let output = Command::new("git")
.current_dir(root)
.args(args)
.output()
.unwrap();
assert!(
output.status.success(),
"git {args:?}: {}",
String::from_utf8_lossy(&output.stderr)
);
};
git(&["init", "-b", "main"]);
git(&["config", "user.name", "Migration Test"]);
git(&["config", "user.email", "migration-test@example.invalid"]);
write(
root,
"data/sql/updates/pending_db_world/00_schema.sql",
"SELECT 1;",
);
git(&["add", "."]);
git(&["commit", "-m", "schema"]);
git(&["switch", "-c", "side"]);
git(&["commit", "--allow-empty", "-m", "side"]);
git(&["switch", "main"]);
git(&["commit", "--allow-empty", "-m", "main"]);
git(&["merge", "--no-ff", "--no-commit", "side"]);
write(
root,
"data/sql/updates/pending_db_world/10_snapshot.sql",
"SELECT 2;",
);
git(&["add", "."]);
git(&["commit", "-m", "merge with snapshot"]);
write(
root,
"data/sql/updates/pending_db_world/20_progression.sql",
"SELECT 3;",
);
git(&["add", "."]);
git(&["commit", "-m", "new progression"]);
let sql = collect_core_sql(root).unwrap();
let ids: Vec<_> = sql.iter().map(|file| file.id.as_str()).collect();
assert_eq!(ids, ["00_schema", "10_snapshot", "20_progression"]);
}
fn write(root: &Path, rel: &str, c: &str) {
let p = root.join(rel);
fs::create_dir_all(p.parent().unwrap()).unwrap();
+16 -5
View File
@@ -1,5 +1,4 @@
//! Where a problem report goes. A report about the bots goes to the repository of the bot system in question, anything
//! else to the Manager's own. The repositories come from the module catalog, so there is one list to keep right.
//! Problem-report destinations for the Manager, bot systems and upstream custom races.
use std::path::Path;
@@ -36,14 +35,14 @@ fn catalog_repo(id: &str) -> Option<String> {
.and_then(|e| repo_of(&e.repo))
}
/// The three places, in the order the page lists them. A bot system whose repository is unknown falls back to the Manager's.
/// Report destinations in display order. Custom-race reports go to the upstream asset maintainer.
pub fn targets() -> Vec<Target> {
let mut v = vec![Target {
id: "manager",
repo: MANAGER_REPO.into(),
ours: true,
}];
for (id, module) in [("companions", "companions"), ("squid", "playerbots")] {
for (id, module) in [("companions", "companions"), ("squid", "playerbots"), ("content-scaling", "content-scaling")] {
if let Some(repo) = catalog_repo(module) {
v.push(Target {
id,
@@ -52,6 +51,11 @@ pub fn targets() -> Vec<Target> {
});
}
}
v.push(Target {
id: "custom-races",
repo: "ilusixn/azerothcore-wotlk-coa".into(),
ours: false,
});
v
}
@@ -103,7 +107,7 @@ mod tests {
use super::*;
#[test]
fn the_three_targets_come_from_the_catalog() {
fn report_targets_route_to_their_maintainers() {
let t = targets();
let repo = |id: &str| t.iter().find(|x| x.id == id).map(|x| x.repo.clone());
assert_eq!(
@@ -116,6 +120,10 @@ mod tests {
);
assert_eq!(repo("squid").as_deref(), Some("Zyth45/mod-playerbots"));
assert!(t.iter().find(|x| x.id == "squid").is_some_and(|x| !x.ours));
assert_eq!(repo("custom-races").as_deref(), Some("ilusixn/azerothcore-wotlk-coa"));
assert!(t.iter().find(|x| x.id == "custom-races").is_some_and(|x| !x.ours));
assert_eq!(repo("content-scaling").as_deref(), Some("Corfirean/mod-coa-content-scaling"));
assert!(t.iter().find(|x| x.id == "content-scaling").is_some_and(|x| x.ours));
}
#[test]
@@ -135,6 +143,9 @@ mod tests {
#[test]
fn only_the_new_issue_pages_of_the_targets_are_allowed() {
assert!(is_new_issue_url("https://github.com/Corfirean/mod-coa-content-scaling/issues/new?title=a&body=b"));
assert!(is_new_issue_url("https://github.com/ilusixn/azerothcore-wotlk-coa/issues/new?title=a&body=b"));
assert!(!is_new_issue_url("https://github.com/ilusixn/azerothcore-wotlk-coa/issues/newer"));
assert!(is_new_issue_url(
"https://github.com/Zyth45/mod-playerbots/issues/new"
));
+2 -3
View File
@@ -1851,9 +1851,8 @@ impl RepackEnv<'_> {
if o.mysql.state == ServiceState::Running
&& o.auth.state == ServiceState::Running
&& o.world.state == ServiceState::Running
&& o.secondary_world
.as_ref()
.is_none_or(|s| s.state == ServiceState::Running)
&& o.extra_worlds()
.all(|s| s.state == ServiceState::Running)
{
let since = ready_since.get_or_insert_with(std::time::Instant::now);
if since.elapsed() >= std::time::Duration::from_secs(10) {
+16 -2
View File
@@ -18,6 +18,20 @@ const FILES: &[&str] = &[
".realms/secondary/Core/configs/worldserver.conf",
".realms/secondary/Core/configs/authserver.conf",
"Settings/realm-profiles/reborn.json",
".realms/reborn/Settings/repack.json",
".realms/reborn/Settings/realm-profile.json",
".realms/reborn/Settings/worldserver.conf.template",
".realms/reborn/Settings/authserver.conf.template",
".realms/reborn/Core/configs/worldserver.conf",
".realms/reborn/Core/configs/authserver.conf",
];
/// Ports of the extra worlds kept in the realm profile.
const REALM_PORT_KEYS: [&str; 4] = [
"secondary_world_port",
"secondary_ra_port",
"reborn_world_port",
"reborn_ra_port",
];
#[derive(Serialize, Deserialize)]
@@ -62,7 +76,7 @@ pub(crate) fn begin(root: &Path, meta: &Path) -> Result<()> {
.collect();
if let Some(state) = &realm {
excluded.extend(
["secondary_world_port", "secondary_ra_port"]
REALM_PORT_KEYS
.iter()
.filter_map(|key| state[*key].as_u64()),
);
@@ -82,7 +96,7 @@ pub(crate) fn begin(root: &Path, meta: &Path) -> Result<()> {
settings[key] = reserve()?.into();
}
if let Some(state) = &mut realm {
for key in ["secondary_world_port", "secondary_ra_port"] {
for key in REALM_PORT_KEYS {
state[key] = reserve()?.into();
}
}
+2
View File
@@ -60,3 +60,5 @@ Use **Saved versions** to see when progress was saved. If the Manager reports a
In the realm's Public list card, enable “Allow portable characters on this realm” and save. It is off until the owner opts in. Turning it off blocks new exports and imports; it does not delete saved characters. Keep the host Manager running. The control connection and game relay have separate status indicators: a connected control channel does not establish a game tunnel. Characters stay within their original ruleset (CoA, Wildcard or Warcraft Reborn); changing servers does not convert their ruleset.
Keep both Managers running. Saving resumes after reconnecting or restarting, and later logins stay monitored. Wait for saving before switching realms. Your installed servers use local preparation and recovery. Experimental limitation: an older existing copy on another host cannot yet be refreshed automatically while its worldserver runs. Returning may require host maintenance. The stale copy is blocked and your canonical character stays saved. Do not delete the character or reinstall the server to bypass this message.
Stop the server before enabling this for the first time. Saving prepares portable sessions for its next start; disabling access leaves ongoing sessions intact.
+2
View File
@@ -51,3 +51,5 @@ Unter **Gespeicherte Versionen (Saved versions)** siehst du, wann dein Fortschri
Aktiviere in der Karte zur öffentlichen Realmliste „Portable Charaktere auf diesem Realm erlauben“ und speichere. Ohne Zustimmung des Betreibers bleibt der Zugang gesperrt. Ausschalten verhindert neue Exporte und Importe, löscht aber keine gespeicherten Charaktere. Der Manager des Betreibers muss laufen. Steuerverbindung und Spiel-Relay haben getrennte Statusanzeigen; eine Steuerverbindung allein ist noch kein Spieltunnel. Charaktere bleiben in ihrem ursprünglichen Spielmodus: CoA, Wildcard oder Warcraft Reborn.
Lass beide Manager laufen. Nach Verbindungsabbrüchen oder Neustarts wird ausstehender Fortschritt weiter gespeichert; auch spätere Anmeldungen werden überwacht. Warte vor dem Realmwechsel auf den Abschluss. Eigene installierte Server nutzen die lokale Vorbereitung und Wiederherstellung. Experimentelle Einschränkung: Eine ältere Kopie bei einem anderen Host lässt sich auf dessen laufendem Worldserver noch nicht automatisch aktualisieren. Die Rückkehr kann Wartungsarbeiten des Hosts erfordern. Die alte Kopie wird blockiert, dein kanonischer Charakter bleibt gespeichert. Lösche den Charakter nicht und installiere den Server nicht neu, um die Meldung zu umgehen.
Stoppe den Server vor dem ersten Aktivieren. Beim Speichern werden portable Sitzungen für den nächsten Start eingerichtet. Das Sperren neuer Zugriffe unterbricht laufende Sitzungen nicht.
+2
View File
@@ -51,3 +51,5 @@ En **Versiones guardadas (Saved versions)** puedes ver cuándo se guardó el pro
En la tarjeta de publicación del reino, activa «Permitir personajes portátiles en este reino» y guarda. El acceso está desactivado por defecto. Desactivarlo impide nuevas exportaciones e importaciones sin borrar personajes guardados. El Manager del anfitrión debe permanecer abierto. La conexión de control y el relay del juego muestran estados separados: un canal de control conectado no garantiza un túnel de juego. Los personajes conservan su modo original: CoA, Wildcard o Warcraft Reborn.
Mantén abiertos ambos Managers. Tras una desconexión o reinicio, el progreso pendiente vuelve a guardarse; también se supervisan los siguientes inicios de sesión. Espera a que termine antes de cambiar de reino. Tus servidores instalados usan la preparación y recuperación locales. Limitación experimental: una copia antigua en otro anfitrión todavía no se actualiza automáticamente mientras su worldserver está en ejecución. Volver puede requerir mantenimiento del anfitrión. Esa copia se bloquea y tu personaje canónico queda guardado. No borres el personaje ni reinstales el servidor para evitar este mensaje.
Detén el servidor antes de activar esta opción por primera vez. Al guardar se preparan las sesiones portátiles para el próximo inicio. Bloquear nuevos accesos no interrumpe las sesiones actuales.
+2
View File
@@ -51,3 +51,5 @@ Sur un royaume dont le niveau maximal est inférieur, votre personnage peut temp
Dans la carte de publication du royaume, activez « Autoriser les personnages portables sur ce royaume », puis enregistrez. Cet accès est désactivé par défaut. Le désactiver bloque les nouveaux exports et imports sans supprimer les personnages sauvegardés. Le Manager de l’hôte doit rester ouvert. La connexion de contrôle et le relais de jeu ont des états distincts : un canal de contrôle connecté ne suffit pas à établir un tunnel de jeu. Chaque personnage conserve son mode d’origine : CoA, Wildcard ou Warcraft Reborn.
Gardez les deux Managers ouverts. Après une coupure ou un redémarrage, la sauvegarde reprend ; les connexions suivantes restent suivies. Attendez la fin avant de changer de royaume. Vos serveurs installés utilisent la préparation et la récupération locales. Limite expérimentale : une ancienne copie chez un autre hôte ne peut pas encore être actualisée automatiquement sur son worldserver en cours d’exécution. Le retour peut nécessiter une maintenance par l’hôte. Cette copie est bloquée et votre personnage canonique reste enregistré. Ne supprimez pas le personnage et ne réinstallez pas le serveur pour contourner ce message.
Arrêtez le serveur avant la première activation. L’enregistrement prépare les sessions portables pour le prochain démarrage. Bloquer les nouveaux accès ne coupe pas les sessions en cours.
+2
View File
@@ -51,3 +51,5 @@
В блоке «Публичный список» включите «Разрешить переносимых персонажей на этом реалме» и сохраните. По умолчанию доступ выключен. Отключение запрещает новые экспорты и импорты, но не удаляет сохранённых персонажей. Менеджер владельца должен оставаться запущенным. Подключение к службе управления и игровой relay имеют отдельные статусы: управляющий канал ещё не означает наличие игрового туннеля. Персонажи остаются в своём режиме (CoA, Wildcard или Warcraft Reborn); смена сервера не преобразует режим персонажа.
Во время игры должны работать оба менеджера. После обрыва связи или перезапуска сохранение продолжается автоматически; повторные входы тоже отслеживаются. Перед сменой реалма дождитесь сохранения. Ваши установленные серверы используют локальную подготовку и восстановление. Ограничение экспериментальной функции: устаревшая копия у другого владельца пока не обновляется автоматически при работающем worldserver. Для возвращения может потребоваться обслуживание владельцем. Устаревшая копия блокируется, основной персонаж остаётся сохранённым. Не удаляйте персонажа и не переустанавливайте сервер для обхода сообщения.
Перед первым включением остановите сервер. При сохранении Менеджер настроит портативные сессии для следующего запуска. Запрет доступа не прерывает текущие сессии.
+2
View File
@@ -51,3 +51,5 @@
在服务器的公开列表设置中,勾选“允许便携角色进入此服务器”并保存。默认不允许访问。关闭后会阻止新的导出和导入,但不会删除已保存的角色。主机端 Manager 必须保持运行。控制连接与游戏中继分别显示状态;控制连接成功不代表游戏隧道已经建立。角色始终保留原来的游戏模式(CoA、Wildcard 或 Warcraft Reborn),更换服务器不会转换角色模式。
请保持两个管理器运行。断线或重启后,待保存的进度会继续同步,再次登录也会继续跟踪。请等待保存完成后再切换服务器。自己安装的服务器使用本地准备和恢复流程。实验功能限制:其他主机上的旧角色副本目前无法在其 worldserver 运行时自动更新。返回该服务器可能需要主人进行维护。旧副本会被阻止,你的主角色仍然保存在管理器中。请勿通过删除角色或重装服务器绕过提示。
首次启用前请先停止服务器。保存时会为下次启动配置便携角色会话;关闭准入不会中断正在进行的会话。
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "coa-server-manager",
"version": "0.8.0",
"version": "0.8.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "coa-server-manager",
"version": "0.8.0",
"version": "0.8.2",
"dependencies": {
"@tauri-apps/api": "^2.12.0",
"@tauri-apps/plugin-dialog": "^2.8.0",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "coa-server-manager",
"private": true,
"version": "0.8.0",
"version": "0.8.2",
"license": "AGPL-3.0-only",
"type": "module",
"scripts": {
+61
View File
@@ -1025,6 +1025,67 @@
"advanced": false,
"restartRequired": "world",
"dangerous": false
},
{
"key": "SkillChance.Prospecting",
"type": "bool",
"category": "rates",
"title": "Prospecting skill gains",
"description": "Allow prospecting to increase the profession skill.",
"default": false,
"advanced": true,
"restartRequired": "world",
"dangerous": false
},
{
"key": "SkillChance.Milling",
"type": "bool",
"category": "rates",
"title": "Milling skill gains",
"description": "Allow milling to increase the profession skill.",
"default": false,
"advanced": true,
"restartRequired": "world",
"dangerous": false
},
{
"key": "SkillGain.Crafting",
"type": "int",
"category": "rates",
"title": "Crafting skill gain",
"description": "Skill points awarded by a successful crafting skill increase.",
"default": 1,
"advanced": true,
"restartRequired": "world",
"dangerous": false,
"min": 0,
"max": 450
},
{
"key": "SkillGain.Defense",
"type": "int",
"category": "rates",
"title": "Defense skill gain",
"description": "Skill points awarded by a successful defense skill increase.",
"default": 1,
"advanced": true,
"restartRequired": "world",
"dangerous": false,
"min": 0,
"max": 450
},
{
"key": "SkillGain.Gathering",
"type": "int",
"category": "rates",
"title": "Gathering skill gain",
"description": "Skill points awarded by a successful gathering skill increase.",
"default": 1,
"advanced": true,
"restartRequired": "world",
"dangerous": false,
"min": 0,
"max": 450
}
]
}
+25
View File
@@ -183,6 +183,31 @@ pub(crate) async fn registry_set_access(
.clone()
.ok_or_else(|| fail("stopped", "the publishing service did not start"))?;
tauri::async_runtime::spawn_blocking(move || {
if allow_portable {
if let Some(route) = route.as_deref().filter(|value| !value.trim().is_empty()) {
coa_core::realm_registry::settings::validate_route(route.trim())
.map_err(|e| fail("invalid", e.to_string()))?;
}
let installs = Registry::at(data_dir().join("installs.json"))
.list().map_err(|e| fail("invalid", e.to_string()))?;
let access = coa_core::realm_registry::advert::find_access(
&data_dir().join("portable/realms"), &installs, &local_id,
).ok_or_else(|| fail("invalid", "This realm is no longer installed."))?;
if let Some(root) = &access.root {
coa_core::config::portable::enable(root)
.map_err(|e| fail("invalid", e.to_string()))?;
} else {
let db = access.db().map_err(|e| fail("invalid", e.to_string()))?;
let mut ra = access.ra().map_err(|e| fail("invalid", e.to_string()))?;
let caps = coa_core::portable::realm::profile::probe_capabilities(
&db, Some(&access.data_dir), Some(&mut ra),
&coa_core::portable::extension::ExtensionRegistry::new(),
).map_err(|e| fail("invalid", e.to_string()))?;
if !caps.content.supports(coa_core::portable::capabilities::Feature::RuntimeSessions) {
return Err(fail("invalid", "Enable portable sessions in this external server's core configuration and restart it before allowing portable characters."));
}
}
}
rt.set_access(&local_id, existing_only, allow_portable, route.as_deref())
.map_err(|e| fail("invalid", e.to_string()))
})
+33 -5
View File
@@ -604,7 +604,19 @@ async fn start_server(
})
.await;
let _ = tauri::async_runtime::spawn_blocking(move || {
meta_dir(&root).and_then(|m| coa_core::friends::reapply(&root, &m))
let meta = meta_dir(&root)?;
coa_core::friends::reapply(&root, &meta)?;
// A world switched on after the server was opened to friends has no firewall rule yet. Rules are only
// added when missing (one Windows confirmation); a refusal must not undo a start that worked.
if platform::flavor() == Flavor::Repack
&& coa_core::friends::load(&meta).mode != coa_core::friends::Mode::Local
{
let extra = coa_core::realms::state(&root)?.extra_world_ports();
if let Err(e) = coa_core::firewall::ensure_rules_with_extra(&layout::read_ports(&root), &extra) {
tracing::warn!("firewall rules for the running worlds were not added: {e}");
}
}
Ok::<(), Error>(())
})
.await;
}
@@ -1169,6 +1181,17 @@ async fn realm_simultaneous(
blocking(move || coa_core::multiworld::set_enabled(&root, enabled)).await
}
#[tauri::command]
async fn realm_with_reborn(
state: State<'_, AppState>,
id: String,
enabled: bool,
) -> std::result::Result<coa_core::realms::View, UiError> {
let root = path_of(&state, &id)?;
let _guard = BusyGuard::acquire(&state, &id)?;
blocking(move || coa_core::multiworld::set_reborn_enabled(&root, enabled)).await
}
#[tauri::command]
async fn check_database(
state: State<'_, AppState>,
@@ -2322,6 +2345,7 @@ struct FriendsStatus {
auth_port: u16,
world_port: u16,
secondary_world_port: Option<u16>,
reborn_world_port: Option<u16>,
}
/// Open one of a few known help pages in the default browser. Anything else is refused, so a page can never ask the
@@ -2485,6 +2509,9 @@ async fn friends_status(
secondary_world_port: coa_core::realms::state(&root)?
.secondary_world_port
.filter(|_| coa_core::realms::state(&root).is_ok_and(|s| s.simultaneous)),
reborn_world_port: coa_core::realms::state(&root)?
.reborn_world_port
.filter(|_| coa_core::realms::state(&root).is_ok_and(|s| s.with_reborn)),
})
})
.await
@@ -2542,7 +2569,7 @@ async fn friends_enable(
let ports = layout::read_ports(&root);
let mut note = None;
let realms = coa_core::realms::state(&root)?;
let secondary = realms.secondary_world_port.filter(|_| realms.simultaneous);
let extra = realms.extra_world_ports();
let host = match mode {
Mode::Local => "127.0.0.1".to_string(),
Mode::Lan => coa_core::net::resolve_lan_host(lan_address_override.as_deref(), coa_core::net::lan_ip())?,
@@ -2552,7 +2579,7 @@ async fn friends_enable(
let open = mode != Mode::Local;
let changed = friends::set_open(&root, &meta, open)?;
if open && platform::flavor() == Flavor::Repack {
coa_core::firewall::ensure_rules_with_secondary(&ports, secondary)?;
coa_core::firewall::ensure_rules_with_extra(&ports, &extra)?;
}
if mode == Mode::Direct && use_upnp {
match coa_core::upnp::discover() {
@@ -2560,7 +2587,7 @@ async fn friends_enable(
let lan = coa_core::net::lan_ip().ok_or_else(|| Error::Invalid("No local address.".into()))?;
coa_core::upnp::add_mapping(&gw, ports.auth, lan, "Auth")?;
coa_core::upnp::add_mapping(&gw, ports.world, lan, "World")?;
if let Some(port) = secondary { coa_core::upnp::add_mapping(&gw, port, lan, "Second world")?; }
for port in &extra { coa_core::upnp::add_mapping(&gw, *port, lan, "Extra world")?; }
note = Some("Your router was asked to forward the game ports.".to_string());
}
None => note = Some("Your router does not support automatic setup; forward the two game ports by hand or use the private network.".to_string()),
@@ -2571,7 +2598,7 @@ async fn friends_enable(
friends::save(&meta, &settings)?;
let running = coa_core::process::observe(&root, &ports).world.state == coa_core::process::ServiceState::Running;
if running {
friends::apply_realm_address(&root, &host)?;
friends::apply_realm_address(&root, &settings)?;
}
Ok(FriendsResult { host, restart_required: changed && running, note })
})
@@ -2793,6 +2820,7 @@ pub fn run() {
realm_profiles,
realm_select,
realm_simultaneous,
realm_with_reborn,
check_database,
repair_server,
module_set_enabled,
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://schema.tauri.app/config/2",
"productName": "CoA Server Manager",
"version": "0.8.0",
"version": "0.8.2",
"identifier": "com.coa.servermanager",
"build": {
"beforeDevCommand": "npm run dev",
+7 -5
View File
@@ -11,6 +11,7 @@ export {};
let added = new URLSearchParams(location.search).has("demo"), running = false;
let realm: "coa" | "wildcard" | "reborn" = "coa", wildcardCreated = false, rebornCreated = false;
let simultaneous = false;
let withReborn = false;
let remoteHost = localStorage.getItem("demo-remote-host") ?? "";
const moduleEdits: Record<string, Record<string, string>> = {};
const modState: Record<string, boolean> = { "companions": true, "content-scaling": true, "client-compat": true, "tbc-content": true, "wotlk-content": true, "npc-enchanter": true };
@@ -27,18 +28,19 @@ export {};
(window as any).__TAURI_INTERNALS__ = {
transformCallback: (cb: unknown)=>cb, unregisterCallback(){}, convertFileSrc:(x: unknown)=>x,
invoke: async (cmd: string, args?: any)=>{
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};
if(cmd==="realm_simultaneous") { if(running) throw new Error("Stop both realms before changing simultaneous startup."); simultaneous=args.enabled; wildcardCreated ||= simultaneous; 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:false}; }
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_simultaneous") { if(running) throw new Error("Stop both realms before changing simultaneous startup."); simultaneous=args.enabled; wildcardCreated ||= simultaneous; 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:false,with_reborn:withReborn,reborn_world_port:withReborn?8087:null,reborn_running:false}; }
if(cmd==="realm_with_reborn") { if(running) throw new Error("Stop all realms before changing which realms start together."); withReborn=args.enabled; rebornCreated ||= withReborn; 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:false,with_reborn:withReborn,reborn_world_port:withReborn?8087:null,reborn_running:false}; }
if(cmd==="check_database") return [{realm, migrations:[],problems:[],full_schema:false}];
if(cmd==="repair_server") { if(running) throw new Error("Stop the server before repairing it."); return {restored:[],applied:[],backup:"demo-before-repair",database:[{realm,migrations:[],problems:[],full_schema:false}],error:null}; }
if(cmd==="realm_select"){await new Promise(r=>setTimeout(r,600));realm=args.mode;rebornCreated ||= realm==="reborn";wildcardCreated ||= realm==="wildcard";modState.companions=realm==="coa";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};}
if(cmd==="realm_select"){await new Promise(r=>setTimeout(r,600));realm=args.mode;rebornCreated ||= realm==="reborn";wildcardCreated ||= realm==="wildcard";modState.companions=realm==="coa";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==="remote_connection") return {host:remoteHost,client_path:null};
if(cmd==="remote_connect") { remoteHost=args.host.trim(); localStorage.setItem("demo-remote-host",remoteHost); return {host:remoteHost,client_path:null}; }
if(cmd==="play") return {ok:true,exit_code:null,code:null,human:null,output:""};
if(cmd==="list_servers") return added?[{id:"1",name:"CoA-Repack",path:report.path}]:[];
if(cmd==="scan_server") return report;
if(cmd==="add_server"){added=true;return {id:"1",name:"CoA-Repack",path:report.path};}
if(cmd==="server_status"){const s=running?"running":"stopped";return {observed:{mysql:svc("mysql",3307,s),auth:svc("auth",3724,s),world:svc("world",8085,s),secondary_world:simultaneous?svc("world-secondary",8086,s):null},busy:false,path_exists:true};}
if(cmd==="server_status"){const s=running?"running":"stopped";return {observed:{mysql:svc("mysql",3307,s),auth:svc("auth",3724,s),world:svc("world",8085,s),secondary_world:simultaneous?svc("world-secondary",8086,s):null,reborn_world:withReborn?svc("world-reborn",8087,s):null},busy:false,path_exists:true};}
if(cmd==="start_server"){await new Promise((r: any)=>setTimeout(r,1500));running=true;return {ok:true,exit_code:0,code:null,human:null,output:""};}
if(cmd==="stop_server"){await new Promise((r: any)=>setTimeout(r,1500));running=false;return {ok:true,exit_code:0,code:null,human:null,output:""};}
if(cmd.startsWith("plugin:dialog")) return "C:\\games\\CoA-Repack";
@@ -90,7 +92,7 @@ export {};
}
if(cmd==="module_save_settings") { moduleEdits[args.module] = {...moduleEdits[args.module], ...args.changes}; return Object.keys(args.changes); }
if(cmd==="report_context") return {manager_version:"0.3.1",windows:"Windows 11 (build 26200)",install_kind:"new",server_version:"0.261001.10",suggested_target:"companions",bots_version:"0.2.1 · 1a2b3c4d"};
if(cmd==="report_targets") return [{id:"manager",repo:"Corfirean/coa-server-manager",ours:true},{id:"companions",repo:"Corfirean/mod-coa-playerbots",ours:true},{id:"squid",repo:"Zyth45/mod-playerbots",ours:false}];
if(cmd==="report_targets") return [{id:"manager",repo:"Corfirean/coa-server-manager",ours:true},{id:"companions",repo:"Corfirean/mod-coa-playerbots",ours:true},{id:"squid",repo:"Zyth45/mod-playerbots",ours:false},{id:"custom-races",repo:"ilusixn/azerothcore-wotlk-coa",ours:false},{id:"content-scaling",repo:"Corfirean/mod-coa-content-scaling",ours:true}];
if(cmd==="open_link"){(window as any).__lastLink=args.url;return null;}
if(cmd==="export_diagnostics") return "C:\\Users\\you\\Desktop\\CoA-Diagnostics-20261001-140000.zip";
if(cmd==="list_crashes") return [];
+3
View File
@@ -721,6 +721,8 @@ const de: Partial<Record<keyof typeof en, string>> = {
"rep.target.manager": "CoA Server Manager, der Server oder andere Module",
"rep.target.companions": "CoA Companions (Bots und das CoABotUI-Addon)",
"rep.target.squid": "SQUID Playerbots",
"rep.target.content-scaling": "Content Scaling (Schwierigkeits- und Stufenskalierung)",
"rep.target.custom-races": "Custom Races (Völker und Client-Patches)",
"rep.targetPublic": "Der Bericht wird öffentlich auf GitHub in {repo} veröffentlicht.",
"rep.botsVersion": "Bot-Version",
"rep.withDiag": "Diagnose für mich sammeln (empfohlen)",
@@ -993,6 +995,7 @@ const de: Partial<Record<keyof typeof en, string>> = {
"fr.tab.servers": "Öffentliche Server",
"fr.tab.lan": "LAN und Direktverbindung",
"access.allowPortable": "Portable Charaktere auf diesem Realm erlauben",
"access.allowPortableHint": "Stoppe den Server vor dem ersten Aktivieren. Beim Speichern werden portable Sitzungen für den nächsten Start eingerichtet. Das Sperren neuer Zugriffe unterbricht laufende Sitzungen nicht.",
"access.relay": "Relay",
"access.relayUp": "Spiel-Relay verbunden",
"access.relayDown": "Spiel-Relay nicht verbunden",
+11 -3
View File
@@ -19,11 +19,16 @@ const en = {
"realm.profileLabel": "Realm",
"realm.startupTitle": "Realm startup",
"realm.secondWorld": "Second world",
"realm.simultaneous": "Start CoA and Wildcard together",
"realm.simultaneousHint": "Stop the server before changing this option. Start runs both worlds with separate characters, settings and ports, sharing accounts. Two worlds need more memory. The first setup creates Wildcard if needed.",
"realm.simultaneous": "Start Wildcard together with CoA",
"realm.withReborn": "Start Warcraft Reborn together with CoA",
"realm.rebornPort": "Warcraft Reborn world port: {port}",
"realm.rebornWorld": "Warcraft Reborn world",
"realm.rebornNeedsCoa": "Warcraft Reborn can start together with Conquest of Azeroth only. Select Conquest of Azeroth on Overview first.",
"realm.allThree": "Both options are on: Conquest of Azeroth, Wildcard and Warcraft Reborn start together.",
"realm.simultaneousHint": "Stop the server before changing these options. Start runs every chosen world with separate characters, settings and ports, sharing accounts. Each extra world needs more memory. The first setup creates the realm if needed.",
"realm.secondPort": "Second world port: {port}",
"realm.preparing": "Preparing realm databases…",
"realm.bothRunning": "Both worlds start together. Each realm keeps its own characters, progress and module settings.",
"realm.bothRunning": "These worlds start together. Each realm keeps its own characters, progress and module settings.",
"repair.title": "Check and repair server",
"repair.hint": "Stop both realms and update to the latest server package before repair. Repair backs up databases and replaced files, restores official program files and applies pending SQL. Your characters and existing settings are preserved.",
"repair.check": "Check files and database",
@@ -777,6 +782,8 @@ const en = {
"rep.target.manager": "CoA Server Manager, the server or other modules",
"rep.target.companions": "CoA Companions (bots and the CoABotUI addon)",
"rep.target.squid": "SQUID Playerbots",
"rep.target.content-scaling": "Content Scaling (difficulty and level scaling)",
"rep.target.custom-races": "Custom Races (races and client patches)",
"rep.targetPublic": "The report will be public on GitHub in {repo}.",
"rep.botsVersion": "Bot release",
"rep.withDiag": "Collect the diagnostics for me (recommended)",
@@ -1204,6 +1211,7 @@ const en = {
"crash.copied": "Copied!",
"access.allowPortable": "Allow portable characters on this realm",
"access.allowPortableHint": "Stop the server before enabling this for the first time. Saving prepares portable sessions for its next start; disabling access leaves ongoing sessions intact.",
"access.relay": "Relay",
"access.relayUp": "Game relay connected",
"access.relayDown": "Game relay disconnected",
+3
View File
@@ -721,6 +721,8 @@ const es: Partial<Record<keyof typeof en, string>> = {
"rep.target.manager": "CoA Server Manager, el servidor u otros módulos",
"rep.target.companions": "CoA Companions (bots y el addon CoABotUI)",
"rep.target.squid": "SQUID Playerbots",
"rep.target.content-scaling": "Content Scaling (ajuste de dificultad y niveles)",
"rep.target.custom-races": "Custom Races (razas y parches del cliente)",
"rep.targetPublic": "El informe será público en GitHub, en {repo}.",
"rep.botsVersion": "Versión de los bots",
"rep.withDiag": "Reunir el diagnóstico por mí (recomendado)",
@@ -993,6 +995,7 @@ const es: Partial<Record<keyof typeof en, string>> = {
"fr.tab.servers": "Servidores públicos",
"fr.tab.lan": "LAN y conexión directa",
"access.allowPortable": "Permitir personajes portátiles en este reino",
"access.allowPortableHint": "Detén el servidor antes de activar esta opción por primera vez. Al guardar se preparan las sesiones portátiles para el próximo inicio. Bloquear nuevos accesos no interrumpe las sesiones actuales.",
"access.relay": "Relay",
"access.relayUp": "Relay del juego conectado",
"access.relayDown": "Relay del juego desconectado",
+3
View File
@@ -721,6 +721,8 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"rep.target.manager": "CoA Server Manager, le serveur ou d’autres modules",
"rep.target.companions": "CoA Companions (bots et addon CoABotUI)",
"rep.target.squid": "SQUID Playerbots",
"rep.target.content-scaling": "Content Scaling (ajustement de la difficulté et des niveaux)",
"rep.target.custom-races": "Custom Races (races et correctifs client)",
"rep.targetPublic": "Le rapport sera public sur GitHub dans {repo}.",
"rep.botsVersion": "Version des bots",
"rep.withDiag": "Rassembler le diagnostic pour moi (recommandé)",
@@ -993,6 +995,7 @@ const fr: Partial<Record<keyof typeof en, string>> = {
"fr.tab.servers": "Serveurs publics",
"fr.tab.lan": "Réseau local et connexion directe",
"access.allowPortable": "Autoriser les personnages portables sur ce royaume",
"access.allowPortableHint": "Arrêtez le serveur avant la première activation. L’enregistrement prépare les sessions portables pour le prochain démarrage. Bloquer les nouveaux accès ne coupe pas les sessions en cours.",
"access.relay": "Relay",
"access.relayUp": "Relais de jeu connecté",
"access.relayDown": "Relais de jeu déconnecté",
+11 -3
View File
@@ -22,11 +22,16 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"realm.profileLabel": "Реалм",
"realm.startupTitle": "Запуск реалмов",
"realm.secondWorld": "Второй мир",
"realm.simultaneous": "Запускать CoA и Wildcard одновременно",
"realm.simultaneousHint": "Остановите сервер перед изменением настройки. Запуск поднимет оба мира с отдельными персонажами, настройками и портами, но общими аккаунтами. Два мира требуют больше памяти. При первом включении Wildcard будет создан, если его ещё нет.",
"realm.simultaneous": "Запускать Wildcard вместе с CoA",
"realm.withReborn": "Запускать Warcraft Reborn вместе с CoA",
"realm.rebornPort": "Порт мира Warcraft Reborn: {port}",
"realm.rebornWorld": "Мир Warcraft Reborn",
"realm.rebornNeedsCoa": "Warcraft Reborn запускается только вместе с Conquest of Azeroth. Сначала выберите Conquest of Azeroth на главной.",
"realm.allThree": "Включены обе настройки: Conquest of Azeroth, Wildcard и Warcraft Reborn запускаются вместе.",
"realm.simultaneousHint": "Остановите сервер перед изменением настроек. Запуск поднимет каждый выбранный мир с отдельными персонажами, настройками и портами, но общими аккаунтами. Каждый дополнительный мир требует больше памяти. При первом включении реалм будет создан, если его ещё нет.",
"realm.secondPort": "Порт второго мира: {port}",
"realm.preparing": "Подготовка баз реалма…",
"realm.bothRunning": "Оба мира запускаются одновременно. У каждого свои персонажи, прогресс и настройки модулей.",
"realm.bothRunning": "Эти миры запускаются одновременно. У каждого свои персонажи, прогресс и настройки модулей.",
"repair.title": "Проверка и восстановление сервера",
"repair.hint": "Перед восстановлением остановите оба реалма и обновите сервер до последнего пакета. Repair сохранит резервную копию БД и заменяемых файлов, восстановит файлы программы и применит недостающие SQL. Персонажи и существующие настройки сохраняются.",
"repair.check": "Проверить файлы и БД",
@@ -760,6 +765,8 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"rep.target.manager": "CoA Server Manager, сервер или другие модули",
"rep.target.companions": "CoA Companions (боты и аддон CoABotUI)",
"rep.target.squid": "SQUID Playerbots",
"rep.target.content-scaling": "Content Scaling (масштабирование сложности и уровней)",
"rep.target.custom-races": "Custom Races (расы и клиентские патчи)",
"rep.targetPublic": "Репорт будет публичным на GitHub в {repo}.",
"rep.botsVersion": "Версия ботов",
"rep.withDiag": "Собрать диагностику за меня (рекомендуется)",
@@ -1186,6 +1193,7 @@ const ru: Partial<Record<keyof typeof en, string>> = {
"crash.copied": "Скопировано!",
"access.allowPortable": "Разрешить переносимых персонажей на этом реалме",
"access.allowPortableHint": "Перед первым включением остановите сервер. При сохранении Менеджер настроит портативные сессии для следующего запуска. Запрет доступа не прерывает текущие сессии.",
"access.relay": "Relay",
"access.relayUp": "Игровой relay подключён",
"access.relayDown": "Игровой relay не подключён",
+3
View File
@@ -736,6 +736,8 @@ const zh = {
"rep.target.manager": "CoA Server Manager、服务器或其他模块",
"rep.target.companions": "CoA Companions(机器人与 CoABotUI 插件)",
"rep.target.squid": "SQUID Playerbots",
"rep.target.content-scaling": "Content Scaling(难度与等级缩放)",
"rep.target.custom-races": "Custom Races(种族与客户端补丁)",
"rep.targetPublic": "该报告将公开发布在 GitHub 的 {repo}。",
"rep.botsVersion": "机器人版本",
"rep.withDiag": "替我收集诊断信息(推荐)",
@@ -995,6 +997,7 @@ const zh = {
"fr.tab.servers": "公开服务器",
"fr.tab.lan": "局域网与直连",
"access.allowPortable": "允许便携角色进入此服务器",
"access.allowPortableHint": "首次启用前请先停止服务器。保存时会为下次启动配置便携角色会话;关闭准入不会中断正在进行的会话。",
"access.relay": "Relay",
"access.relayUp": "游戏中继已连接",
"access.relayDown": "游戏中继未连接",
+5
View File
@@ -31,6 +31,11 @@
"copper": "Kupfer"
},
"settings": {
"SkillChance.Prospecting": {"t": "Fertigkeitszuwachs beim Sondieren", "d": "Sondieren darf die Berufsfertigkeit erhöhen."},
"SkillChance.Milling": {"t": "Fertigkeitszuwachs beim Mahlen", "d": "Mahlen darf die Berufsfertigkeit erhöhen."},
"SkillGain.Crafting": {"t": "Fertigkeitszuwachs beim Herstellen", "d": "Fertigkeitspunkte pro erfolgreicher Steigerung beim Herstellen."},
"SkillGain.Defense": {"t": "Zuwachs der Verteidigungsfertigkeit", "d": "Fertigkeitspunkte pro erfolgreicher Steigerung der Verteidigung."},
"SkillGain.Gathering": {"t": "Fertigkeitszuwachs beim Sammeln", "d": "Fertigkeitspunkte pro erfolgreicher Steigerung beim Sammeln."},
"CoaBots.RandomSpawn.DefaultCount": {
"t": "Bots pro Erstellungsbefehl",
"d": "Wie viele Bots der Erstellungsbefehl anlegt, wenn du keine Zahl angibst."
+5
View File
@@ -31,6 +31,11 @@
"copper": "cobre"
},
"settings": {
"SkillChance.Prospecting": {"t": "Mejora de habilidad al prospectar", "d": "Permitir que prospectar aumente la habilidad de profesión."},
"SkillChance.Milling": {"t": "Mejora de habilidad al moler", "d": "Permitir que moler aumente la habilidad de profesión."},
"SkillGain.Crafting": {"t": "Puntos de habilidad al fabricar", "d": "Puntos otorgados por una mejora de habilidad al fabricar."},
"SkillGain.Defense": {"t": "Puntos de habilidad de defensa", "d": "Puntos otorgados por una mejora de habilidad de defensa."},
"SkillGain.Gathering": {"t": "Puntos de habilidad al recolectar", "d": "Puntos otorgados por una mejora de habilidad al recolectar."},
"CoaBots.RandomSpawn.DefaultCount": {
"t": "Bots creados por comando",
"d": "Cuántos bots crea el comando de creación cuando no indicas un número."
+5
View File
@@ -31,6 +31,11 @@
"copper": "cuivre"
},
"settings": {
"SkillChance.Prospecting": {"t": "Progression avec la prospection", "d": "Permettre à la prospection d’améliorer la compétence de métier."},
"SkillChance.Milling": {"t": "Progression avec la mouture", "d": "Permettre à la mouture d’améliorer la compétence de métier."},
"SkillGain.Crafting": {"t": "Gain de compétence en fabrication", "d": "Points accordés lors d’une progression réussie en fabrication."},
"SkillGain.Defense": {"t": "Gain de compétence en défense", "d": "Points accordés lors d’une progression réussie en défense."},
"SkillGain.Gathering": {"t": "Gain de compétence en récolte", "d": "Points accordés lors d’une progression réussie en récolte."},
"CoaBots.RandomSpawn.DefaultCount": {
"t": "Bots créés par commande",
"d": "Nombre de bots que la commande de création crée quand vous n’indiquez pas de nombre."
+5
View File
@@ -31,6 +31,11 @@
"copper": "меди"
},
"settings": {
"SkillChance.Prospecting": {"t": "Рост навыка при просеивании", "d": "Разрешить повышение навыка профессии при просеивании."},
"SkillChance.Milling": {"t": "Рост навыка при измельчении", "d": "Разрешить повышение навыка профессии при измельчении."},
"SkillGain.Crafting": {"t": "Прирост ремесленного навыка", "d": "Число очков за успешное повышение ремесленного навыка."},
"SkillGain.Defense": {"t": "Прирост навыка защиты", "d": "Число очков за успешное повышение навыка защиты."},
"SkillGain.Gathering": {"t": "Прирост навыка сбора", "d": "Число очков за успешное повышение навыка сбора."},
"CoaBots.RandomSpawn.DefaultCount": {
"t": "Ботов за одну команду создания",
"d": "Сколько ботов создаёт команда создания, если вы не указали число."
+5
View File
@@ -31,6 +31,11 @@
"copper": "铜币"
},
"settings": {
"SkillChance.Prospecting": {"t": "选矿技能提升", "d": "允许通过选矿提升专业技能。"},
"SkillChance.Milling": {"t": "研磨技能提升", "d": "允许通过研磨提升专业技能。"},
"SkillGain.Crafting": {"t": "制造技能提升点数", "d": "制造成功触发技能提升时获得的点数。"},
"SkillGain.Defense": {"t": "防御技能提升点数", "d": "防御成功触发技能提升时获得的点数。"},
"SkillGain.Gathering": {"t": "采集技能提升点数", "d": "采集成功触发技能提升时获得的点数。"},
"CoaBots.RandomSpawn.DefaultCount": {
"t": "单次生成命令创建数量",
"d": "当生成命令未指定数量时,默认创建的机器人数量。"
+5 -3
View File
@@ -48,13 +48,13 @@ export interface ServiceStatus {
}
export interface StatusView {
observed: { mysql: ServiceStatus; auth: ServiceStatus; world: ServiceStatus; secondary_world?: ServiceStatus | null };
observed: { mysql: ServiceStatus; auth: ServiceStatus; world: ServiceStatus; secondary_world?: ServiceStatus | null; reborn_world?: ServiceStatus | null };
busy: boolean;
path_exists: boolean;
}
export type RealmMode = "coa" | "wildcard" | "reborn";
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 }
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 DatabaseCheck {
realm: RealmMode;
migrations: { id: string; db: string; status: "applied" | "pending" | "failed"; error: string | null }[];
@@ -257,7 +257,7 @@ export interface ReportContext {
bots_version: string | null;
}
export type ReportTargetId = "manager" | "companions" | "squid";
export type ReportTargetId = "manager" | "companions" | "squid" | "custom-races" | "content-scaling";
/** A place a problem report can go: its GitHub repository as `owner/name`. */
export interface ReportTarget {
@@ -429,6 +429,7 @@ export interface FriendsStatus {
auth_port: number;
world_port: number;
secondary_world_port?: number | null;
reborn_world_port?: number | null;
}
export interface InternetCheck {
@@ -472,6 +473,7 @@ export const api = {
realmProfiles: (id: string) => invoke<RealmProfiles>("realm_profiles", { id }),
realmSelect: (id: string, mode: RealmMode, restart: boolean) => invoke<RealmProfiles>("realm_select", { id, mode, restart }),
realmSimultaneous: (id: string, enabled: boolean) => invoke<RealmProfiles>("realm_simultaneous", { id, enabled }),
realmWithReborn: (id: string, enabled: boolean) => invoke<RealmProfiles>("realm_with_reborn", { id, enabled }),
checkDatabase: (id: string) => invoke<DatabaseCheck[]>("check_database", { id }),
repairServer: (id: string) => invoke<RepairReport>("repair_server", { id }),
defaultInstallDir: () => invoke<string>("default_install_dir"),
+3 -1
View File
@@ -31,7 +31,9 @@ export function reportBody(r: ReportInput): string {
`**Windows version:** ${r.windows || "unknown"} `,
`**Fresh install or imported server:** ${r.installKind === "new" ? "Fresh install" : "Imported server"} `,
...(r.serverVersion ? [`**Server version:** ${r.serverVersion} `] : []),
...(r.target !== "manager" ? [`**Bot system:** ${r.target === "squid" ? "SQUID Playerbots" : "CoA Companions"}${r.botsVersion ? ` ${r.botsVersion}` : ""} `] : []),
...(r.target === "squid" || r.target === "companions" ? [`**Bot system:** ${r.target === "squid" ? "SQUID Playerbots" : "CoA Companions"}${r.botsVersion ? ` ${r.botsVersion}` : ""} `] : []),
...(r.target === "custom-races" ? ["**Component:** Custom Races "] : []),
...(r.target === "content-scaling" ? ["**Component:** Content Scaling "] : []),
"",
"**What happened?** ",
text(r.what, "Describe the problem."),
+1
View File
@@ -176,6 +176,7 @@ export function FriendsPage({ serverId }: { serverId: string }) {
</Line>
</ul>
{st.secondary_world_port && <p className="mt-3 text-sm text-muted">{t("realm.secondPort", { port: st.secondary_world_port })}</p>}
{st.reborn_world_port && <p className="mt-3 text-sm text-muted">{t("realm.rebornPort", { port: st.reborn_world_port })}</p>}
</Card>
<div className="mt-6 grid gap-3">
+27 -5
View File
@@ -72,15 +72,15 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
const human = useHuman();
const [status, setStatus] = useState<StatusView | null>(null);
// With both worlds started together, each realm gets its own card; the first realm owns the database and auth.
const [realms, setRealms] = useState<{ first: string; second: string } | null>(null);
const bothWorlds = !!status?.observed.secondary_world;
const [realms, setRealms] = useState<{ first: string; second: string; reborn: string } | null>(null);
const bothWorlds = !!status?.observed.secondary_world || !!status?.observed.reborn_world;
useEffect(() => {
if (!bothWorlds) { setRealms(null); return; }
let alive = true;
void api.realmProfiles(server.id).then((r) => {
if (!alive) return;
const name = (m: "coa" | "wildcard" | "reborn") => (m === "coa" ? "Conquest of Azeroth" : m === "reborn" ? "Warcraft Reborn" : "Wildcard");
setRealms({ first: name(r.active), second: name(r.active === "coa" ? "wildcard" : "coa") });
setRealms({ first: name(r.active), second: name(r.active === "coa" ? "wildcard" : "coa"), reborn: name("reborn") });
}).catch(() => { if (alive) setRealms(null); });
return () => { alive = false; };
}, [bothWorlds, server.id]);
@@ -292,8 +292,8 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
);
}
const { mysql, auth, world, secondary_world } = status.observed;
const all = [mysql, auth, world, ...(secondary_world ? [secondary_world] : [])];
const { mysql, auth, world, secondary_world, reborn_world } = status.observed;
const all = [mysql, auth, world, ...(secondary_world ? [secondary_world] : []), ...(reborn_world ? [reborn_world] : [])];
const running = all.every((s) => s.state === "running");
const anyUp = all.some((s) => s.state !== "stopped");
const transitioning = action !== null || status.busy || realmBusy;
@@ -585,6 +585,28 @@ export function Overview({ server, companions = true, onForget, onOpenUpdates, o
</Card>
)}
{reborn_world && (
<Card className="mt-4 p-7">
<div className="mb-1 text-xs font-medium uppercase tracking-[0.14em] text-muted">{realms ? `${realms.reborn} · ${t("overview.server")}` : t("realm.rebornWorld")}</div>
<div
className={cn("flex items-center gap-3 text-3xl font-semibold", reborn_world.state === "running" ? "text-ok" : reborn_world.state === "starting" || transitioning ? "text-warn" : "text-muted")}
role="status"
aria-live="polite"
>
<span aria-hidden className={cn("h-3 w-3 rounded-full", reborn_world.state === "running" ? "bg-ok" : reborn_world.state === "starting" || transitioning ? "bg-warn" : "bg-muted/50")} />
{reborn_world.state === "running" ? t("status.online") : reborn_world.state === "starting" ? t("status.starting") : t("status.offline")}
</div>
<div className="mt-5 divide-y divide-line border-y border-line">
<Row label={t("overview.world")} s={reborn_world} />
</div>
<dl className="mt-4 text-sm">
<dt className="text-muted">{t("overview.uptime")}</dt>
<dd className="mt-0.5 text-lg">{reborn_world.state === "running" ? formatUptime(reborn_world.uptime_secs) : "—"}</dd>
</dl>
<p className="mt-3 text-xs text-muted">{t("realm.bothRunning")}</p>
</Card>
)}
{conflict && !anyUp && (
<Card className="mt-4 border-warn/40 p-4" role="alert">
<p className="font-medium text-warn">{t("overview.portTitle")}</p>
+37 -15
View File
@@ -4,16 +4,38 @@ import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
import { cn } from "@/lib/utils";
import { useT, type Key } from "@/i18n";
import { asUiError } from "@/lib/api";
import { api, asUiError, type RealmMode } from "@/lib/api";
import { realmRegistry, useRegistryStatus } from "@/lib/registry";
import { asControlError, control, type ControlStatus } from "@/lib/control";
const LANGUAGES = ["en", "ru", "de", "fr", "es", "zh", "pt", "pl", "uk"];
/** Publishing this server's realm to the central Registry: a name, a description, a language. Nothing else leaves this machine. */
const REALM_LABEL: Record<RealmMode, string> = { coa: "Conquest of Azeroth", wildcard: "Wildcard", reborn: "Warcraft Reborn" };
/** The realms this server runs: the main one keeps the plain id it was published under, each realm that starts next to it has its own. */
export function PublishCard({ serverId, serverName }: { serverId: string; serverName: string }) {
const [realms, setRealms] = useState<{ localId: string; mode: RealmMode }[] | null>(null);
useEffect(() => {
let alive = true;
void api.realmProfiles(serverId).then((r) => {
if (!alive) return;
const extra: RealmMode[] = [];
if (r.simultaneous) extra.push(r.active === "coa" ? "wildcard" : "coa");
if (r.with_reborn) extra.push("reborn");
setRealms([{ localId: `srv-${serverId}`, mode: r.active }, ...extra.map((mode) => ({ localId: `srv-${serverId}:${mode}`, mode }))]);
}).catch(() => { if (alive) setRealms([{ localId: `srv-${serverId}`, mode: "coa" }]); });
return () => { alive = false; };
}, [serverId]);
if (!realms) return null;
const several = realms.length > 1;
return <>{realms.map((r) => (
<RealmPublish key={r.localId} localId={r.localId} serverName={several && r.mode !== realms[0].mode ? `${serverName} · ${REALM_LABEL[r.mode]}` : serverName} realmLabel={several ? REALM_LABEL[r.mode] : null} />
))}</>;
}
/** Publishing one realm to the central Registry: a name, a description, a language. Nothing else leaves this machine. */
function RealmPublish({ localId, serverName, realmLabel }: { localId: string; serverName: string; realmLabel: string | null }) {
const t = useT();
const localId = `srv-${serverId}`;
const { status, refresh } = useRegistryStatus();
const mine = status?.realms.find((r) => r.local_id === localId);
const published = !!mine?.enabled;
@@ -58,22 +80,22 @@ export function PublishCard({ serverId, serverName }: { serverId: string; server
return (
<Card className="mt-6 p-6">
<h2 className="font-semibold">{t("registry.title")}</h2>
<h2 className="font-semibold">{t("registry.title")}{realmLabel ? ` · ${realmLabel}` : ""}</h2>
<p className="mt-1 text-sm text-muted">{t("registry.text")}</p>
{!published && <>
<label htmlFor="registry-name" className="mt-4 block text-sm font-medium">{t("registry.name")}</label>
<input id="registry-name" value={name} maxLength={80} onChange={(e) => setName(e.target.value)} className="mt-1 w-full rounded-md border border-line bg-card px-3 py-2" />
<label htmlFor="registry-description" className="mt-3 block text-sm font-medium">{t("registry.description")}</label>
<textarea id="registry-description" value={description} rows={3} onChange={(e) => setDescription(e.target.value)} className="mt-1 w-full rounded-md border border-line bg-card px-3 py-2" />
<label htmlFor={`registry-name-${localId}`} className="mt-4 block text-sm font-medium">{t("registry.name")}</label>
<input id={`registry-name-${localId}`} value={name} maxLength={80} onChange={(e) => setName(e.target.value)} className="mt-1 w-full rounded-md border border-line bg-card px-3 py-2" />
<label htmlFor={`registry-description-${localId}`} className="mt-3 block text-sm font-medium">{t("registry.description")}</label>
<textarea id={`registry-description-${localId}`} value={description} rows={3} onChange={(e) => setDescription(e.target.value)} className="mt-1 w-full rounded-md border border-line bg-card px-3 py-2" />
<p className="mt-1 text-xs text-muted">{t("registry.descriptionHint")}</p>
<label htmlFor="registry-language" className="mt-3 block text-sm font-medium">{t("registry.language")}</label>
<select id="registry-language" value={language} onChange={(e) => setLanguage(e.target.value)} className="mt-1 rounded-md border border-line bg-card px-3 py-2">
<label htmlFor={`registry-language-${localId}`} className="mt-3 block text-sm font-medium">{t("registry.language")}</label>
<select id={`registry-language-${localId}`} value={language} onChange={(e) => setLanguage(e.target.value)} className="mt-1 rounded-md border border-line bg-card px-3 py-2">
{LANGUAGES.map((l) => <option key={l} value={l}>{l}</option>)}
</select>
<label htmlFor="registry-region" className="mt-3 block text-sm font-medium">{t("registry.region")}</label>
<input id="registry-region" value={region} maxLength={16} placeholder="EU" onChange={(e) => setRegion(e.target.value)} className="mt-1 w-32 rounded-md border border-line bg-card px-3 py-2" />
<label htmlFor={`registry-region-${localId}`} className="mt-3 block text-sm font-medium">{t("registry.region")}</label>
<input id={`registry-region-${localId}`} value={region} maxLength={16} placeholder="EU" onChange={(e) => setRegion(e.target.value)} className="mt-1 w-32 rounded-md border border-line bg-card px-3 py-2" />
<div className="mt-4">
<Button variant="primary" disabled={busy || !status?.url || name.trim() === ""} onClick={() => void run(() => realmRegistry.publish(localId, name, description, language, region.trim() === "" ? null : region.trim()))}>
{busy && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}{t("registry.publish")}
@@ -96,9 +118,9 @@ export function PublishCard({ serverId, serverName }: { serverId: string; server
<p className="font-medium">{t("access.title")}</p>
<p className="mt-1 text-xs text-muted">{t("access.text")}</p>
<label className="mt-3 flex items-start gap-2"><input type="checkbox" checked={existingOnly} onChange={(e) => setExistingOnly(e.target.checked)} className="mt-1" data-testid="existing-only" /><span>{t("access.existingOnly")}<span className="block text-xs text-muted">{t("access.existingOnlyHint")}</span></span></label>
<label className="mt-3 flex items-start gap-2"><input type="checkbox" checked={allowPortable} onChange={(e) => setAllowPortable(e.target.checked)} className="mt-1" data-testid="allow-portable" /><span>{t("access.allowPortable")}</span></label>
<label htmlFor="access-route" className="mt-3 block font-medium">{t("access.route")}</label>
<input id="access-route" value={route} placeholder="play.example.org:3724" onChange={(e) => setRoute(e.target.value)} className="mt-1 w-full rounded-md border border-line bg-card px-3 py-2" data-testid="access-route" />
<label className="mt-3 flex items-start gap-2"><input type="checkbox" checked={allowPortable} onChange={(e) => setAllowPortable(e.target.checked)} className="mt-1" data-testid="allow-portable" /><span>{t("access.allowPortable")}<span className="block text-xs text-muted">{t("access.allowPortableHint")}</span></span></label>
<label htmlFor={`access-route-${localId}`} className="mt-3 block font-medium">{t("access.route")}</label>
<input id={`access-route-${localId}`} value={route} placeholder="play.example.org:3724" onChange={(e) => setRoute(e.target.value)} className="mt-1 w-full rounded-md border border-line bg-card px-3 py-2" data-testid={`access-route-${localId}`} />
<p className="mt-1 text-xs text-muted">{t("access.routeHint")}</p>
<div className="mt-3 flex items-center gap-3">
<Button size="sm" disabled={busy} onClick={() => void saveAccess()}>{t("access.save")}</Button>
+6 -4
View File
@@ -13,6 +13,8 @@ export function RealmPicker({ serverId, running, disabled, onChanged, onBusy }:
const [selected, setSelected] = useState<RealmMode>("coa");
const [busy, setBusy] = useState(false);
const [error, setError] = useState<string | null>(null);
// More than one world starts together: the main realm cannot be switched then.
const together = !!view && (view.simultaneous || view.with_reborn);
useEffect(() => {
let alive = true;
void api.realmProfiles(serverId).then(v => { if (alive) { setView(v); setSelected(v.active); } }).catch(e => { if (alive) setError(asUiError(e).technical); });
@@ -34,18 +36,18 @@ export function RealmPicker({ serverId, running, disabled, onChanged, onBusy }:
<div className="flex flex-wrap items-center gap-3">
<Layers className="h-5 w-5 text-gold" aria-hidden />
<label htmlFor="realm-profile" className="font-medium">{t("realm.profileLabel")}</label>
{view?.simultaneous ? <span className="text-sm text-muted">Conquest of Azeroth + Wildcard</span> : <select id="realm-profile" value={selected} disabled={!view || disabled || busy} onChange={e => setSelected(e.target.value as RealmMode)} className="min-w-52 rounded-md border border-line bg-card-2 px-3 py-2 text-ink">
{together ? <span className="text-sm text-muted">{[view.active, ...(view.simultaneous ? [view.active === "coa" ? "wildcard" : "coa"] : []), ...(view.with_reborn ? ["reborn"] : [])].map(m => m === "coa" ? "Conquest of Azeroth" : m === "reborn" ? "Warcraft Reborn" : "Wildcard").join(" + ")}</span> : <select id="realm-profile" value={selected} disabled={!view || disabled || busy} onChange={e => setSelected(e.target.value as RealmMode)} className="min-w-52 rounded-md border border-line bg-card-2 px-3 py-2 text-ink">
<option value="coa">Conquest of Azeroth</option>
<option value="wildcard" disabled={!view?.supported && !view?.wildcard_created}>Wildcard · Darkmoon</option>
<option value="reborn" disabled={!view?.reborn_supported && !view?.reborn_created}>Warcraft Reborn</option>
</select>}
{view && !view.simultaneous && (selected !== view.active || view.recovery_pending) && <Button size="sm" disabled={disabled || busy} onClick={() => void select()}>
{view && !together && (selected !== view.active || view.recovery_pending) && <Button size="sm" disabled={disabled || busy} onClick={() => void select()}>
{busy && <Loader2 className="h-4 w-4 animate-spin" aria-hidden />}
{busy ? t("realm.switching") : selected === "wildcard" && !view.wildcard_created ? t("realm.create") : selected === "reborn" && !view.reborn_created ? t("realm.rebornCreate") : running ? t("realm.restart") : t("realm.select")}
</Button>}
{view && !view.simultaneous && <span className="ml-auto text-xs text-muted">{t("realm.active", { name: view.active === "coa" ? "CoA" : view.active === "reborn" ? "Warcraft Reborn" : "Wildcard" })}</span>}
{view && !together && <span className="ml-auto text-xs text-muted">{t("realm.active", { name: view.active === "coa" ? "CoA" : view.active === "reborn" ? "Warcraft Reborn" : "Wildcard" })}</span>}
</div>
<p className="mt-3 text-sm text-muted">{t(view?.simultaneous ? "realm.bothRunning" : "realm.separate")}</p>
<p className="mt-3 text-sm text-muted">{t(together ? "realm.bothRunning" : "realm.separate")}</p>
{selected === "reborn" && <p className="mt-2 text-sm text-warn">{t("realm.rebornModules")}</p>}
{view && selected === "reborn" && !view.reborn_supported && <p className="mt-2 text-sm text-warn">{t("realm.rebornUpdate")}</p>}
{selected === "wildcard" && <p className="mt-2 text-sm text-warn">{t("realm.modules")}</p>}
+12 -5
View File
@@ -13,20 +13,27 @@ export function RealmStartupSettings({ serverId }: { serverId: string }) {
void api.realmProfiles(serverId).then(v => { if (alive) setView(v); }).catch(e => { if (alive) setError(asUiError(e).technical); });
return () => { alive = false; };
}, [serverId]);
async function change(enabled: boolean) {
async function change(realm: "wildcard" | "reborn", enabled: boolean) {
setBusy(true); setError(null);
try { setView(await api.realmSimultaneous(serverId, enabled)); }
try { setView(await (realm === "wildcard" ? api.realmSimultaneous : api.realmWithReborn)(serverId, enabled)); }
catch (e) { setError(asUiError(e).technical); }
finally { setBusy(false); }
}
return <Card className="mt-6 p-6" aria-busy={busy}>
<h2 className="font-semibold">{t("realm.startupTitle")}</h2>
<label className="mt-3 flex items-center gap-3">
<input type="checkbox" checked={view?.simultaneous ?? false} disabled={!view || busy || !view.supported || view.active === "reborn"} onChange={e => void change(e.target.checked)} />
<input type="checkbox" checked={view?.simultaneous ?? false} disabled={!view || busy || !view.supported || view.active === "reborn"} onChange={e => void change("wildcard", e.target.checked)} />
<span>{t("realm.simultaneous")}</span>
</label>
<p className="mt-2 text-sm text-muted">{t("realm.simultaneousHint")}</p>
{view?.simultaneous && <p className="mt-2 text-sm text-muted">{t("realm.secondPort", { port: view.secondary_world_port ?? "—" })}</p>}
{view?.simultaneous && <p className="mt-1 text-sm text-muted">{t("realm.secondPort", { port: view.secondary_world_port ?? "—" })}</p>}
<label className="mt-3 flex items-center gap-3">
<input type="checkbox" checked={view?.with_reborn ?? false} disabled={!view || busy || !view.reborn_supported || view.active !== "coa"} onChange={e => void change("reborn", e.target.checked)} />
<span>{t("realm.withReborn")}</span>
</label>
{view?.with_reborn && <p className="mt-1 text-sm text-muted">{t("realm.rebornPort", { port: view.reborn_world_port ?? "—" })}</p>}
{view && view.active !== "coa" && !view.with_reborn && <p className="mt-1 text-sm text-warn">{t("realm.rebornNeedsCoa")}</p>}
{view?.simultaneous && view.with_reborn && <p className="mt-3 text-sm">{t("realm.allThree")}</p>}
<p className="mt-3 text-sm text-muted">{t("realm.simultaneousHint")}</p>
{busy && <p className="mt-2 text-sm" role="status">{t("realm.preparing")}</p>}
{error && <p className="mt-3 text-sm text-bad" role="alert">{error}</p>}
</Card>;
+1 -1
View File
@@ -15,7 +15,7 @@ export function RemoveServerCard({ serverId, path, onForget }: { serverId: strin
let active = true;
void api.status(serverId).then((s) => {
if (!active) return;
const all = [s.observed.mysql, s.observed.auth, s.observed.world, ...(s.observed.secondary_world ? [s.observed.secondary_world] : [])];
const all = [s.observed.mysql, s.observed.auth, s.observed.world, ...(s.observed.secondary_world ? [s.observed.secondary_world] : []), ...(s.observed.reborn_world ? [s.observed.reborn_world] : [])];
setRunning(all.some((x) => x.state === "running" || x.state === "starting" || x.state === "stopping"));
}).catch(() => { /* an unreadable status must not hide the button */ });
return () => { active = false; };
+2
View File
@@ -12,6 +12,8 @@ const TARGET_LABEL: Record<ReportTargetId, Key> = {
manager: "rep.target.manager",
companions: "rep.target.companions",
squid: "rep.target.squid",
"custom-races": "rep.target.custom-races",
"content-scaling": "rep.target.content-scaling",
};
const FALLBACK: ReportTarget = { id: "manager", repo: "Corfirean/coa-server-manager", ours: true };