DB/SoundFilter

From wowdev
Jump to navigation Jump to search

Some kind of descriptive table. All entries are "Death Knight RACE GENDER". Assembled here:

≥ Wrath

.text:00463DD0 sub_463DD0      proc near       
.text:00463DD0
.text:00463DD0 CGObject_C      = dword ptr  8
.text:00463DD0 arg_4           = dword ptr  0Ch
.text:00463DD0 arg_8           = dword ptr  10h
.text:00463DD0
.text:00463DD0    push    ebp
.text:00463DD1    mov     ebp, esp
.text:00463DD3    mov     eax, [ebp+CGObject_C] 
.text:00463DD6    mov     eax, [eax+108h] ; UNIT
.text:00463DDC    movzx   ecx, byte ptr [eax+40h]
.text:00463DE0    cmp     byte ptr [eax+42h], 0
.text:00463DE4    mov     eax, offset aMale ; "Male"
.text:00463DE9    jz      short else
.text:00463DEB    mov     eax, offset aFemale ; "Female"
.text:00463DF0 else: 
.text:00463DF0    mov     ecx, RACES[ecx*4]
.text:00463DF7    mov     edx, [ebp+arg_8]
.text:00463DFA    push    eax             ; gender
.text:00463DFB    mov     eax, [ebp+arg_4]
.text:00463DFE    push    ecx             ; race
.text:00463DFF    push    offset aDeathKnightSS ; "Death Knight %s %s"
.text:00463E04    push    edx
.text:00463E05    push    eax
.text:00463E06    call    sub_6A13F0
.text:00463E0B    add     esp, 14h
.text:00463E0E    pop     ebp
.text:00463E0F    retn 
.text:00463E0F sub_463DD0      endp

Or in (bad) C:

String sub_463DD0(CGObject_C Object, void* arg1, void* arg2) {
   String Gender;
   CGUnit_C Unit = Object->m_pStorage3;
   
   if (*Unit->UNIT_GENDER == 0)
      Gender = "Male";
   else
      Gender = "Female";
   
   String ret = sub_6A13F0(arg1, arg2, "Death Knight %s %s", RACES[*Unit->UNIT_RACE], Gender);
   
   return(ret); 
}

Structure

  • ID int
  • Name string

6.0.1.18179

struct SoundFilterRec {
  uint32_t m_ID;
  stringref m_name;
};