mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 16:10:14 +00:00
Detect server disconnect during character loading and show error
GameHandler::update() now detects when the socket closes mid-session (e.g. Warden rejection) and transitions to DISCONNECTED state. Character screen shows a disconnect message instead of hanging on "Loading characters..." forever. Reverted SHA1(seed+module) fallback to SHA1(seed) since neither is correct without module execution.
This commit is contained in:
parent
0ef4af9c99
commit
f4f23eab7a
2 changed files with 24 additions and 6 deletions
|
|
@ -59,6 +59,18 @@ void CharacterScreen::render(game::GameHandler& gameHandler) {
|
|||
// Get character list
|
||||
const auto& characters = gameHandler.getCharacters();
|
||||
|
||||
// Handle disconnected state (e.g. Warden kicked us)
|
||||
if (gameHandler.getState() == game::WorldState::DISCONNECTED ||
|
||||
gameHandler.getState() == game::WorldState::FAILED) {
|
||||
ImGui::TextColored(ImVec4(1.0f, 0.4f, 0.4f, 1.0f), "Disconnected from server.");
|
||||
ImGui::TextWrapped("The server closed the connection. This may be caused by "
|
||||
"anti-cheat (Warden) verification failure.");
|
||||
ImGui::Spacing();
|
||||
if (ImGui::Button("Back", ImVec2(120, 36))) { if (onBack) onBack(); }
|
||||
ImGui::End();
|
||||
return;
|
||||
}
|
||||
|
||||
// Request character list if not available.
|
||||
// Also show a loading state while CHAR_LIST_REQUESTED is in-flight (characters may be cleared to avoid stale UI).
|
||||
if (characters.empty() &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue