mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-25 00:20:16 +00:00
Handle SMSG_ACHIEVEMENT_EARNED with toast banner and chat notification
- Parse SMSG_ACHIEVEMENT_EARNED (guid + achievementId + PackedTime date) and fire AchievementEarnedCallback for self, chat notify for others - Add renderAchievementToast() to GameScreen: slides in from right, gold-bordered panel with "Achievement Earned!" title + ID, 5s duration with 0.4s slide-in/out animation and fade at end - Add triggerAchievementToast(uint32_t) public method on GameScreen - Wire AchievementEarnedCallback in application.cpp - Add playAchievementAlert() to UiSoundManager, loads Sound\Interface\AchievementSound.wav with level-up fallback - SMSG_ALL_ACHIEVEMENT_DATA silently consumed (no tracker UI yet)
This commit is contained in:
parent
200a00d4f5
commit
e4f53ce0c3
7 changed files with 159 additions and 0 deletions
|
|
@ -105,6 +105,13 @@ bool UiSoundManager::initialize(pipeline::AssetManager* assets) {
|
|||
levelUpSounds_.resize(1);
|
||||
bool levelUpLoaded = loadSound("Sound\\Interface\\LevelUp.wav", levelUpSounds_[0], assets);
|
||||
|
||||
// Load achievement sound (WotLK: Sound\Interface\AchievementSound.wav)
|
||||
achievementSounds_.resize(1);
|
||||
if (!loadSound("Sound\\Interface\\AchievementSound.wav", achievementSounds_[0], assets)) {
|
||||
// Fallback to level-up sound if achievement sound is missing
|
||||
achievementSounds_ = levelUpSounds_;
|
||||
}
|
||||
|
||||
// Load error/feedback sounds
|
||||
errorSounds_.resize(1);
|
||||
loadSound("Sound\\Interface\\Error.wav", errorSounds_[0], assets);
|
||||
|
|
@ -210,6 +217,9 @@ void UiSoundManager::playDrinking() { playSound(drinkingSounds_); }
|
|||
// Level up
|
||||
void UiSoundManager::playLevelUp() { playSound(levelUpSounds_); }
|
||||
|
||||
// Achievement
|
||||
void UiSoundManager::playAchievementAlert() { playSound(achievementSounds_); }
|
||||
|
||||
// Error/feedback
|
||||
void UiSoundManager::playError() { playSound(errorSounds_); }
|
||||
void UiSoundManager::playTargetSelect() { playSound(selectTargetSounds_); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue