Decompile fn_17233 (UIWindowMgr::Shutdown)

Batch #12983 by Yommy: 0 byte-identical, 1 confirmed by peer review.

- fn_17233 UIWindowMgr::Shutdown: logic confirmed by peer review

Peer-reviewed-by: aDw, cremane, codeplay
Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
ragnarok-clanker 2026-11-06 03:53:44 +00:00
commit e9aec0c0ef

View file

@ -932,11 +932,12 @@ void UIWindowMgr::Shutdown() {
}
for (UIWindow*& window : this->rendered) {
if (!this->modalWindows.empty() && this->modalWindows.back() && this->persistentWindows.find(window) != this->persistentWindows.end()) {
if (this->HasModalWindow() && this->persistentWindows.find(window) != this->persistentWindows.end()) {
this->retainedPersistentWindow = true;
} else if (this->modalWindows.empty() || !this->modalWindows.back() ||
std::find(this->modalWindows.begin(), this->modalWindows.end(), window) == this->modalWindows.end()) {
this->persistentWindows.erase(window);
} else if (!this->HasModalWindow() || std::find(this->modalWindows.begin(), this->modalWindows.end(), window) == this->modalWindows.end()) {
if (this->persistentWindows.find(window) != this->persistentWindows.end()) {
this->persistentWindows.erase(window);
}
window->Slot11();
delete window;
window = nullptr;
@ -959,7 +960,7 @@ void UIWindowMgr::Shutdown() {
}
this->rendered.clear();
this->retired.clear();
this->snapRectangles.clear();
this->snapRectangles.erase(this->snapRectangles.begin(), this->snapRectangles.end());
this->messageBoxes.clear();
this->ResetWindows();