Trim customization to essentials
Release MPQ / package (push) Successful in 7s

Shrink the customization patch to only touch what's needed for the
autologin + character-reorder features, so upstream refreshes don't
conflict on areas we've been unnecessarily rewriting.

Reverted to upstream in AccountLogin.lua/.xml:
- Side-button stack (Cinematics + Turtle URL buttons) instead of our
  TOS/Credits/Community/ManageAccount replacements.
- Turtle URL helper functions (AccountLogin_Turtle_Website and siblings).
- turtlewow_expansion_logo texture (was swapped for Glues-WoW-Logo).
- AcceptTOS()/AcceptEULA() in OnShow instead of the full TOSFrame +
  four scroll-frames + EULA/Scanning/Contest dispatcher.
- VirtualKeypad layout, PIN display, random positioning, PIN
  remap-to-key-position logic.
- SurveyNotificationFrame at original location (TOSFrame block removed).

Reverted to upstream in CharacterSelect.lua/.xml:
- AutologinSaveCharacterButton checkbox (dead UI) and its two shim
  functions (Autologin_OnCharactersLoad, Autologin_EnterWorld).
- CharacterDelete/RenameButton1 text=CONFIRM (was OKAY).
- Dialog background text offsets.
- CharSelectEnterWorldButton NormalText block.
- Stylistic churn (_G[...] <-> getglobal, TEXT() wrapping,
  trailing whitespace, unused gender 0/1 -> MALE/FEMALE conversion).

Kept: AutologinAccountsFrame + AutologinAccountButtonTemplate + password
hide-on-known-account + Change password flow; drag-to-reorder +
translationTable + CharacterOrder persistence + pendingSelectedCharID
logout-slot fix + class-color hook (already in Turtle upstream, no
change) + drag mouse handlers on button template + delete/rename
wrapper functions.
This commit is contained in:
2026-07-17 01:01:28 -05:00
parent fe78e6141b
commit 13ea626704
4 changed files with 200 additions and 1006 deletions
+38 -59
View File
@@ -8,21 +8,6 @@ MAX_CHARACTERS_PER_REALM = 10;
AUTO_DRAG_TIME = 0.5;
-- Per-account character autoselect was removed alongside the plaintext
-- credential store; the AutologinSaveCharacterButton checkbox in
-- CharacterSelect.xml is now permanently hidden, and the two functions
-- below are no-op wrappers around `EnterWorld` to keep the existing
-- call sites working.
function Autologin_OnCharactersLoad()
if ( AutologinSaveCharacterButton ) then
AutologinSaveCharacterButton:Hide();
end
end
function Autologin_EnterWorld()
EnterWorld();
end
function CharacterSelect_OnLoad()
this:SetSequence(0);
this:SetCamera(0);
@@ -59,7 +44,7 @@ function CharacterSelect_OnLoad()
local backdropColor = DEFAULT_TOOLTIP_COLOR;
CharacterSelectCharacterFrame:SetBackdropBorderColor(backdropColor[1], backdropColor[2], backdropColor[3]);
CharacterSelectCharacterFrame:SetBackdropColor(backdropColor[4], backdropColor[5], backdropColor[6], 0.85);
end
function CharacterSelect_OnShow()
@@ -72,7 +57,7 @@ function CharacterSelect_OnShow()
local serverType = "";
if ( serverName ) then
if( not connected ) then
serverName = serverName.."\n("..TEXT(SERVER_DOWN)..")";
serverName = serverName.."\n("..SERVER_DOWN..")";
end
if ( isPVP ) then
if ( isRP ) then
@@ -104,7 +89,7 @@ function CharacterSelect_OnShow()
else
local billingTimeLeft = GetBillingTimeRemaining();
-- Set default text for the payment plan
local billingText = getglobal("BILLING_TEXT"..paymentPlan);
local billingText = _G["BILLING_TEXT"..paymentPlan];
if ( paymentPlan == 1 ) then
-- Recurring account
billingTimeLeft = ceil(billingTimeLeft/(60 * 24));
@@ -115,7 +100,7 @@ function CharacterSelect_OnShow()
-- Free account
if ( billingTimeLeft < (24 * 60) ) then
billingText = format(BILLING_FREE_TIME_EXPIRE, billingTimeLeft.." "..GetText("MINUTES_ABBR", nil, billingTimeLeft));
end
end
elseif ( paymentPlan == 3 ) then
-- Fixed but not recurring
if ( isGameRoom == 1 ) then
@@ -130,7 +115,7 @@ function CharacterSelect_OnShow()
billingText = BILLING_FIXED_LASTDAY;
else
billingText = format(billingText, MinutesToTime(billingTimeLeft));
end
end
end
elseif ( paymentPlan == 4 ) then
-- Usage plan
@@ -210,7 +195,6 @@ function CharacterSelect_OnEvent()
end
UpdateCharacterList();
CharSelectCharacterName:SetText(GetCharacterInfo(GetCharIDFromIndex(this.selectedIndex)));
Autologin_OnCharactersLoad();
elseif ( event == "UPDATE_SELECTED_CHARACTER" ) then
if ( arg1 == 0 ) then
CharSelectCharacterName:SetText("");
@@ -235,7 +219,9 @@ function CharacterSelect_OnEvent()
GlueDialog_Show("SUGGEST_REALM");
elseif ( event == "FORCE_RENAME_CHARACTER" ) then
CharacterRenameDialog:Show();
CharacterRenameText1:SetText(getglobal(arg1));
CharacterRenameBackground:SetHeight(16 + CharacterRenameText1:GetHeight() + CharacterRenameText2:GetHeight() + 23 + CharacterRenameEditBox:GetHeight() + 8 + CharacterRenameButton1:GetHeight() + 16);
CharacterRenameText1:SetText(_G[arg1]);
end
end
@@ -245,56 +231,50 @@ function CharacterSelect_UpdateModel()
end
function UpdateCharacterSelection()
-- Drag-aware: during a drag, dim every slot except the one currently
-- holding the dragged character, and override the highlight to track
-- the drag rather than the engine-side "selected" character.
local draggedIndex = CharacterSelect.draggedIndex;
local highlightIndex = draggedIndex or CharacterSelect.selectedIndex;
for i=1, MAX_CHARACTERS_DISPLAYED, 1 do
local btn = getglobal("CharSelectCharacterButton"..i);
local btn = _G["CharSelectCharacterButton"..i];
btn:UnlockHighlight();
if ( draggedIndex and i ~= draggedIndex ) then
btn:SetAlpha(0.6);
btn:SetAlpha(0.4);
else
btn:SetAlpha(1);
end
end
if ( highlightIndex and (highlightIndex > 0) and (highlightIndex <= MAX_CHARACTERS_DISPLAYED) ) then
getglobal("CharSelectCharacterButton"..highlightIndex):LockHighlight();
if ( (highlightIndex > 0) and (highlightIndex <= MAX_CHARACTERS_DISPLAYED) ) then
_G["CharSelectCharacterButton"..highlightIndex]:LockHighlight();
end
end
function UpdateCharacterList()
local numChars = GetNumCharacters();
local index = 1;
local coords;
for i=1, numChars, 1 do
local name, race, class, level, zone, fileString, gender, ghost = GetCharacterInfo(GetCharIDFromIndex(i));
if ( gender == 0 ) then
gender = "MALE";
else
gender = "FEMALE";
end
local button = getglobal("CharSelectCharacterButton"..index);
local button = _G["CharSelectCharacterButton"..index];
if ( not name ) then
button:SetText("ERROR - Tell Jeremy");
else
if ( not zone ) then
zone = "";
end
local classToken = TW_CLASS_TOKEN and TW_CLASS_TOKEN[class];
if ( classToken and CLASS_COLORS[classToken] ) then
class = CLASS_COLORS[classToken] .. class .. "|r";
local classColor
local classToken = TW_CLASS_TOKEN and TW_CLASS_TOKEN[class]
if classToken and CLASS_COLORS[classToken] then
classColor = CLASS_COLORS[classToken]
class = classColor .. class .. "|r"
end
getglobal("CharSelectCharacterButton"..index.."ButtonTextName"):SetText(name);
if( ghost ) then
getglobal("CharSelectCharacterButton"..index.."ButtonTextInfo"):SetText(format(TEXT(CHARACTER_SELECT_INFO_GHOST), level, class));
_G["CharSelectCharacterButton"..index.."ButtonTextName"]:SetText(name);
if ( ghost ) then
_G["CharSelectCharacterButton"..index.."ButtonTextInfo"]:SetText(format(CHARACTER_SELECT_INFO_GHOST, level, class));
else
getglobal("CharSelectCharacterButton"..index.."ButtonTextInfo"):SetText(format(TEXT(CHARACTER_SELECT_INFO), level, class));
_G["CharSelectCharacterButton"..index.."ButtonTextInfo"]:SetText(format(CHARACTER_SELECT_INFO, level, class));
end
getglobal("CharSelectCharacterButton"..index.."ButtonTextLocation"):SetText(zone);
_G["CharSelectCharacterButton"..index.."ButtonTextLocation"]:SetText(zone);
end
button:Show();
@@ -313,18 +293,18 @@ function UpdateCharacterList()
end
CharacterSelect.createIndex = 0;
CharSelectCreateCharacterButton:Hide();
CharSelectCreateCharacterButton:Hide();
local connected = IsConnectedToServer();
for i=index, MAX_CHARACTERS_DISPLAYED, 1 do
local button = getglobal("CharSelectCharacterButton"..index);
local button = _G["CharSelectCharacterButton"..index];
if ( (CharacterSelect.createIndex == 0) and (numChars < MAX_CHARACTERS_PER_REALM) ) then
CharacterSelect.createIndex = index;
if ( connected ) then
--If can create characters position and show the create button
CharSelectCreateCharacterButton:SetID(index);
--CharSelectCreateCharacterButton:SetPoint("TOP", button, "TOP", 0, -5);
CharSelectCreateCharacterButton:Show();
CharSelectCreateCharacterButton:Show();
end
end
button:Hide();
@@ -352,8 +332,6 @@ function CharacterSelect_OnChar()
end
function CharacterSelectButton_OnClick()
-- A drag just ended on top of this button — eat the click so the
-- drop doesn't also re-select the character at the new slot.
if ( CharacterSelect.suppressNextClick ) then
CharacterSelect.suppressNextClick = nil;
return;
@@ -377,10 +355,10 @@ function CharacterSelectButton_OnDoubleClick()
end
function CharacterSelect_TabResize()
local buttonMiddle = getglobal(this:GetName().."Middle");
local buttonMiddleDisabled = getglobal(this:GetName().."MiddleDisabled");
local buttonMiddle = _G[this:GetName().."Middle"];
local buttonMiddleDisabled = _G[this:GetName().."MiddleDisabled"];
local width = this:GetTextWidth() - 8;
local leftWidth = getglobal(this:GetName().."Left"):GetWidth();
local leftWidth = _G[this:GetName().."Left"]:GetWidth();
buttonMiddle:SetWidth(width);
buttonMiddleDisabled:SetWidth(width);
this:SetWidth(width + (2 * leftWidth));
@@ -408,14 +386,14 @@ end
function CharacterDeleteDialog_OnShow()
local name, race, class, level = GetCharacterInfo(GetCharIDFromIndex(CharacterSelect.selectedIndex));
CharacterDeleteText1:SetText(format(TEXT(CONFIRM_CHAR_DELETE), name, level, class));
CharacterDeleteText1:SetText(format(CONFIRM_CHAR_DELETE, name, level, class));
CharacterDeleteBackground:SetHeight(16 + CharacterDeleteText1:GetHeight() + CharacterDeleteText2:GetHeight() + 23 + CharacterDeleteEditBox:GetHeight() + 8 + CharacterDeleteButton1:GetHeight() + 16);
CharacterDeleteButton1:Disable();
end
function CharacterSelect_EnterWorld()
PlaySound("gsCharacterSelectionEnterWorld");
Autologin_EnterWorld();
EnterWorld();
end
function CharacterSelect_Exit()
@@ -430,7 +408,7 @@ end
function CharacterSelect_TechSupport()
PlaySound("gsCharacterSelectionAcctOptions");
LaunchURL(TEXT(TECH_SUPPORT_URL));
LaunchURL(TECH_SUPPORT_URL);
end
function CharacterSelect_Delete()
@@ -491,9 +469,10 @@ end
function CharacterSelect_ManageAccount()
PlaySound("gsCharacterSelectionAcctOptions");
LaunchURL(TEXT(AUTH_NO_TIME_URL));
LaunchURL(AUTH_NO_TIME_URL);
end
-- ---------------------------------------------------------------------------
-- Character reordering
-- ---------------------------------------------------------------------------