mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
feat: add PvP honor credit toast on honorable kill
SMSG_PVP_CREDIT previously only wrote a system chat message. Now it also fires a new PvpHonorCallback, which game_screen.cpp uses to push a compact dark-red toast at the top-right of the screen showing "⚔ +N Honor" with a 3.5 s lifetime and smooth fade in/out.
This commit is contained in:
parent
59fc7cebaf
commit
129fa84fe3
4 changed files with 97 additions and 0 deletions
|
|
@ -1882,6 +1882,9 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
std::dec, " rank=", rank);
|
||||
std::string msg = "You gain " + std::to_string(honor) + " honor points.";
|
||||
addSystemChatMessage(msg);
|
||||
if (pvpHonorCallback_) {
|
||||
pvpHonorCallback_(honor, victimGuid, rank);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue