mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-15 17:03:50 +00:00
fix: send GAMEOBJ_USE+LOOT together for chests, reset off-screen bag pos
Chest-type GOs now send CMSG_GAMEOBJ_USE immediately followed by CMSG_LOOT in the same frame. The USE handler opens the chest, then the LOOT handler reads the contents — both processed sequentially by the server. Previously only CMSG_LOOT was sent (no USE), which failed on AzerothCore because the chest wasn't activated first. Reset the Bags window position to bottom-right if the saved position is outside the current screen resolution (e.g. after a resolution change or moving between monitors).
This commit is contained in:
parent
8a617e842b
commit
b10c8b7aea
2 changed files with 14 additions and 6 deletions
|
|
@ -941,6 +941,14 @@ void InventoryScreen::renderAggregateBags(game::Inventory& inventory, uint64_t m
|
|||
return;
|
||||
}
|
||||
|
||||
// Reset to bottom-right if the window ended up outside the screen (resolution change)
|
||||
ImVec2 winPos = ImGui::GetWindowPos();
|
||||
ImVec2 winSize = ImGui::GetWindowSize();
|
||||
if (winPos.x > screenW || winPos.y > screenH ||
|
||||
winPos.x + winSize.x < 0 || winPos.y + winSize.y < 0) {
|
||||
ImGui::SetWindowPos(ImVec2(posX, posY));
|
||||
}
|
||||
|
||||
renderBackpackPanel(inventory, compactBags_);
|
||||
|
||||
ImGui::Spacing();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue