mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
fix: show buy/sell vendor failures in UIError overlay
SMSG_BUY_FAILED ("Not enough money", "Sold out", etc.) and
SMSG_SELL_ITEM non-zero results now call addUIError() so the error
appears on screen alongside the chat message.
This commit is contained in:
parent
fba6aba80d
commit
495dfb7aae
1 changed files with 2 additions and 0 deletions
|
|
@ -4582,6 +4582,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
"Unknown error", "Only empty bag"
|
||||
};
|
||||
const char* msg = (result < 7) ? sellErrors[result] : "Unknown sell error";
|
||||
addUIError(std::string("Sell failed: ") + msg);
|
||||
addSystemChatMessage(std::string("Sell failed: ") + msg);
|
||||
if (auto* renderer = core::Application::getInstance().getRenderer()) {
|
||||
if (auto* sfx = renderer->getUiSoundManager())
|
||||
|
|
@ -4744,6 +4745,7 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
case 6: msg = "You can't carry any more items."; break;
|
||||
default: break;
|
||||
}
|
||||
addUIError(msg);
|
||||
addSystemChatMessage(msg);
|
||||
if (auto* renderer = core::Application::getInstance().getRenderer()) {
|
||||
if (auto* sfx = renderer->getUiSoundManager())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue