[2.0.3] Fail-back logic for closing containers in bad queries is wrong
kristofbolyai opened this issue ยท 0 comments
Found an issue while reading code to try to fix #1728.
if (currentStep == null && lastStep != null) {
// We're in a possibly bad state. We have failed a previous call, but
// we might still get the menu opened (perhaps after a lag spike).
if (lastStep.verifyContainer(e.getTitle(), e.getMenuType())) {
// This was the container we were supposed to be looking for
WynntilsMod.warn("Closing container '" + e.getTitle().getString()
+ "' due to previously aborted container query");
e.setCanceled(true);
} else {
// This is some other container. Ignore it.
}
// Now say we're completely finished with the last query
lastStep = null;
return;
}
This code does not do what it was meant to. e.setCanceled(true);
will NOT close the container, rather, it will not display it, but make the server think we are in it.