mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Add level-up ding animation with cheer emote and test button
- Trigger ding when UNIT_FIELD_LEVEL increases for player: plays LevelUp sound, cheer emote animation, and shows screen overlay - renderDingEffect(): 3 expanding golden rings + "LEVEL X!" / "DING!" text drawn via ImDrawList foreground (3s duration, fades out last 0.8s) - triggerDing() wires sound (UiSoundManager::playLevelUp) + emote + overlay - LevelUpCallback in GameHandler fires on genuine level increase (newLevel > oldLevel) - "Test: Level Up" button in escape menu triggers ding at current player level
This commit is contained in:
parent
eebc0007a6
commit
897867bf7b
5 changed files with 121 additions and 0 deletions
|
|
@ -706,6 +706,10 @@ public:
|
|||
}
|
||||
const std::unordered_map<uint64_t, QuestGiverStatus>& getNpcQuestStatuses() const { return npcQuestStatus_; }
|
||||
|
||||
// Level-up callback — fires when the player gains a level (newLevel > 1)
|
||||
using LevelUpCallback = std::function<void(uint32_t newLevel)>;
|
||||
void setLevelUpCallback(LevelUpCallback cb) { levelUpCallback_ = std::move(cb); }
|
||||
|
||||
// Mount state
|
||||
using MountCallback = std::function<void(uint32_t mountDisplayId)>; // 0 = dismount
|
||||
void setMountCallback(MountCallback cb) { mountCallback_ = std::move(cb); }
|
||||
|
|
@ -1558,6 +1562,7 @@ private:
|
|||
NpcGreetingCallback npcGreetingCallback_;
|
||||
NpcFarewellCallback npcFarewellCallback_;
|
||||
NpcVendorCallback npcVendorCallback_;
|
||||
LevelUpCallback levelUpCallback_;
|
||||
MountCallback mountCallback_;
|
||||
TaxiPrecacheCallback taxiPrecacheCallback_;
|
||||
TaxiOrientationCallback taxiOrientationCallback_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue