mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
Implement NPC greeting voice lines
Added NPC voice manager that plays greeting sounds when clicking on NPCs: Features: - Voice line library with multiple race/gender voice types (Human, Dwarf, Night Elf, etc.) - 3D positional audio - voice comes from NPC location - Cooldown system prevents spam clicking same NPC - Randomized pitch/volume for variety - Loads greeting sounds from character voice files in MPQ - Generic fallback voices for NPCs without specific voice types Voice lines trigger automatically when gossip window opens (SMSG_GOSSIP_MESSAGE). Uses same audio system as other sound effects with ma_sound_set_position.
This commit is contained in:
parent
71c4fb3ae6
commit
eb288d2064
7 changed files with 37 additions and 1 deletions
|
|
@ -357,6 +357,10 @@ public:
|
|||
using NpcSwingCallback = std::function<void(uint64_t guid)>;
|
||||
void setNpcSwingCallback(NpcSwingCallback cb) { npcSwingCallback_ = std::move(cb); }
|
||||
|
||||
// NPC greeting callback (plays voice line when NPC is clicked)
|
||||
using NpcGreetingCallback = std::function<void(uint64_t guid, const glm::vec3& position)>;
|
||||
void setNpcGreetingCallback(NpcGreetingCallback cb) { npcGreetingCallback_ = std::move(cb); }
|
||||
|
||||
// XP tracking
|
||||
uint32_t getPlayerXp() const { return playerXp_; }
|
||||
uint32_t getPlayerNextLevelXp() const { return playerNextLevelXp_; }
|
||||
|
|
@ -1030,6 +1034,7 @@ private:
|
|||
NpcRespawnCallback npcRespawnCallback_;
|
||||
MeleeSwingCallback meleeSwingCallback_;
|
||||
NpcSwingCallback npcSwingCallback_;
|
||||
NpcGreetingCallback npcGreetingCallback_;
|
||||
MountCallback mountCallback_;
|
||||
TaxiPrecacheCallback taxiPrecacheCallback_;
|
||||
TaxiOrientationCallback taxiOrientationCallback_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue