I'd have to guess your issues are coming when trying to set a descriptor in the CGPlayerData descriptors (ArenaFaction? i think it was called) to change the player race. and in doing so blocks the use of faction specific items.
I ran into this issue some time ago, and the solution was to modify a value in the CGUnit_C struct rather then edit the descriptor.
Code:
.text:0071D235 CGUnit_C__GetCurrentClientRace proc near
.text:0071D235 ; CODE XREF: CGPlayer_C__SendTextEmote+1AAp
.text:0071D235 ; CGUnit_C__GetDisplaySex+2Dj ...
.text:0071D235 mov eax, [ecx+184Ch]
.text:0071D23B test eax, eax
.text:0071D23D jz short loc_71D248
.text:0071D23F test byte ptr [ecx+17C8h], 40h
.text:0071D246 jz short locret_71D255
.text:0071D248
.text:0071D248 loc_71D248: ; CODE XREF: CGUnit_C__GetCurrentClientRace+8j
.text:0071D248 mov eax, [ecx+124h]
.text:0071D24E movzx eax, byte ptr [eax+0B4h]
.text:0071D255
.text:0071D255 locret_71D255: ; CODE XREF: CGUnit_C__GetCurrentClientRace+11j
.text:0071D255 retn
.text:0071D255 CGUnit_C__GetCurrentClientRace endp
Found from the Lua function Script_HasAlternateForm
It's a 1Byte value, its default value will be 0 (no transform).
Code:
enum Race : uint
{
Human = 1,
Orc = 2,
Dwarf = 3,
NightElf = 4,
Undead = 5,
Tauren = 6,
Gnome = 7,
Troll = 8,
Goblin = 9,
BloodElf = 10,
Draenei = 11,
Worgen = 22,
PandarenNeutral = 24,
PandarenAlliance = 25,
PandarenHorde = 26,
};
it is important to note that changing this will ONLY work with the original Race DisplayId's (old but likely have not changed):
Code:
enum RaceDisplayId : uint
{
HumanMale = 49,
HumanFemale = 50,
DwarfMale = 53,
DwarfFemale = 54,
NightElfMale = 55,
NightElfFemale = 56,
GnomeMale = 1563,
GnomeFemale = 1564,
DraeneiMale = 16125,
DraeneiFemale = 16126,
WorgenMale = 29422,
WorgenFemale = 29423,
OrcMale = 51,
OrcFemale = 52,
UndeadMale = 57,
UndeadFemale = 58,
TaurenMale = 59,
TaurenFemale = 60,
TrollMale = 1478,
TrollFemale = 1479,
BloodElfFemale = 15475,
BloodElfMale = 15476,
GoblinMale = 6894,
GoblinFemale = 6895,
PandarenMale = 38551,
PandarenFemale = 38552,
};
these are also the models needed if you plan on changing features (earings, tusks, hair color etc.)