Files
wowdecomp/WoW/Source/SoundInterface/SoundInterface2VocalErrorSounds.cpp
T
SatyandClaude Opus 5.5 9243e0507a SoundInterface: port SI2 into WoW/Source/SoundInterface
232 SI2 functions (0x4C5900-0x4D2780 plus the DSP, voice chat, zone sound,
advanced kit property and internal code), in files named after the 12340
__FILE__ strings (SoundInterface2*.cpp) and best-guess splits after the
Mac SI3 files. Replaces the _Triage shells. External WoW callees are
declared only (GameTime, DBClient, Unit_C, Item_C, ObjectMgrClient,
ChatFrame, GameUI, CGWorldStateInfo, ComSatClient, SFile name overloads)
and tracked as open items.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 03:07:31 +02:00

27 lines
797 B
C++

#include <cstddef>
#include <cstdint>
#include <cstring>
#include "WoW/Source/DB/DBClient/DBClient.h"
#include "WoW/Source/SoundInterface/SoundInterface2.h"
// STATIC: 0x00DCEAF8
static int32_t s_vocalErrorSounds[68];
// VERIFY: 2b3e2ff2 manual
// OFFSET: 0x00986C90
void SI2::InitVocalErrorSounds(int32_t race, uint32_t sex) {
memset(s_vocalErrorSounds, 0, sizeof(s_vocalErrorSounds));
if (sex > 1) {
return;
}
for (int32_t i = 0; i < g_vocalUISoundsDB.m_numRecords; i++) {
VocalUISoundsRec* rec = (i < 0 || i >= g_vocalUISoundsDB.m_numRecords) ? nullptr : &g_vocalUISoundsDB.m_records[i];
if (rec && rec->m_vocalUienum < 68 && rec->m_raceID == race) {
s_vocalErrorSounds[rec->m_vocalUienum] = rec->m_normalSoundID[sex];
}
}
}