mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-20 11:25:56 +00:00
Realmlist switcher next to PLAY, and a Modules page
- Named realmlists (e.g. Solo, PTR): a drop-down by the PLAY button switches the game client by writing the chosen text into every locale's realmlist.wtf (the replaced file is saved first); add / edit / remove with a name and the realmlist text (or just an address). First use offers 'Solo' (127.0.0.1) and, if the client held another realmlist, 'Previous'. - Modules page: bundled catalog (modules/catalog.json) of the optional modules built into the server; switch each on or off (its Enable setting), open its page on GitHub, edit its configuration with the module's own documentation. Nine modules to start with. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a79c26ed49
commit
81aacdf5bb
17 files changed
+1208
-5
No files matched your search
@@ -49,6 +49,14 @@ export {};
|
||||
if(cmd==="client_download"){await run("scan",4,0);await run("download",40,41e6);w.__client="new";return {path:args.parent+"\\CoA Client",executable:"Ascension.exe",realmlists:[{path:"x",host:"127.0.0.1"}],addon:{installed:true,version:"1",up_to_date:true},other_addons:0};}
|
||||
if(cmd==="client_cancel"){w.__stop=true;return null;}
|
||||
}
|
||||
if(cmd==="realmlist_profiles"){const w=window as any;w.__rl=w.__rl??{profiles:[{id:"solo",name:"Solo",data:"set realmlist 127.0.0.1\r\n"},{id:"ptr",name:"PTR",data:"set realmlist ptr.example.org\r\n"}],active:"solo"};return w.__rl;}
|
||||
if(cmd==="realmlist_activate"){(window as any).__rl.active=args.profileId;return [];}
|
||||
if(cmd==="realmlist_save"){const w=window as any;const rl=w.__rl;if(args.profileId){const p=rl.profiles.find((x: any)=>x.id===args.profileId);p.name=args.name;p.data=args.data;return p;}if(rl.profiles.some((x: any)=>x.name.toLowerCase()===String(args.name).toLowerCase()))throw {human:{code:"unknown",title:"",message:"",actions:[]},technical:"A realmlist with that name already exists."};const p={id:String(args.name).toLowerCase().replace(/[^a-z0-9]+/g,"-"),name:args.name,data:(/\s/.test(args.data.trim())?args.data.trim():"set realmlist "+args.data.trim())+"\r\n"};rl.profiles.push(p);return p;}
|
||||
if(cmd==="realmlist_delete"){const rl=(window as any).__rl;rl.profiles=rl.profiles.filter((x: any)=>x.id!==args.profileId);return null;}
|
||||
if(cmd==="modules_list"){const w=window as any;w.__mods=w.__mods??[{id:"spellbook",name:"Spellbook",description:{en:"Restores the Books of Ascension as class trainers: right-click a book to see your class abilities by rank and train them for gold."},repo:"https://github.com/Corfirean/azerothcore-wotlk-coa/tree/coa-bots/modules/mod-spellbook",installed:true,enabled:true},{id:"war-games",name:"War Games",description:{en:"Private arena matches between two groups, arranged by Teri Glozilk in Orgrimmar and Stormwind."},repo:"https://github.com/Corfirean/azerothcore-wotlk-coa/tree/coa-bots/modules/mod-war-games",installed:true,enabled:false},{id:"coa-prestige",name:"Prestige Mode",description:{en:"Chromie's Prestige Mode."},repo:"https://github.com/Corfirean/azerothcore-wotlk-coa/tree/coa-bots/modules/mod-coa-prestige",installed:false,enabled:false}];return w.__mods;}
|
||||
if(cmd==="module_set_enabled"){const m=(window as any).__mods.find((x: any)=>x.id===args.module);m.enabled=args.enabled;return null;}
|
||||
if(cmd==="module_settings") return [{key:"WarGames.Enable",value:"1",default:"1",doc:"Turns War Games on."},{key:"WarGames.ChallengeSeconds",value:"60",default:"60",doc:"How long a challenge stays open."}];
|
||||
if(cmd==="module_save_settings") 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"};
|
||||
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";
|
||||
|
||||
Reference in new issue
Block a user