mirror of
https://github.com/araxiaonline/wow-dev-server-toggle.git
synced 2026-06-13 03:02:27 -04:00
23 lines
891 B
PowerShell
Executable File
23 lines
891 B
PowerShell
Executable File
$folderPath = "[Replace with your path to Wow\Data\enUS\]"
|
|
|
|
# Check if realmlist.wtf and realmlist.prod.wtf exist
|
|
$realmlistExists = Test-Path "$folderPath\realmlist.wtf"
|
|
$realmlistProdExists = Test-Path "$folderPath\realmlist.prod.wtf"
|
|
|
|
# Check if realmlist.dev.wtf exists
|
|
$realmlistDevExists = Test-Path "$folderPath\realmlist.dev.wtf"
|
|
|
|
if ($realmlistExists -and $realmlistProdExists) {
|
|
Rename-Item "$folderPath\realmlist.wtf" "realmlist.dev.wtf" -Force
|
|
Rename-Item "$folderPath\realmlist.prod.wtf" "realmlist.wtf" -Force
|
|
Write-Host "Switching to production server"
|
|
}
|
|
elseif ($realmlistExists -and $realmlistDevExists) {
|
|
Rename-Item "$folderPath\realmlist.wtf" "realmlist.prod.wtf" -Force
|
|
Rename-Item "$folderPath\realmlist.dev.wtf" "realmlist.wtf" -Force
|
|
Write-Host "Switching to local dev server"
|
|
}
|
|
else {
|
|
Write-Host "Files not found or conditions not met"
|
|
}
|