[DiscordArchive] does anyone understand how charactercreate.xml is assigning race to the CharacterCreateRaceButton ?
[DiscordArchive] does anyone understand how charactercreate.xml is assigning race to the CharacterCreateRaceButton ?
Archived author: Kazgrim • Posted: 2022-07-27T02:40:29.393000+00:00
Original source
does anyone understand how charactercreate.xml is assigning race to the CharacterCreateRaceButton ?
Archived author: Kazgrim • Posted: 2022-07-27T02:40:56.891000+00:00
Original source
i wld think from chrraces but in chrraces.dbc race 2 is orc whereas charactercreateracebutton2 is dwarf
Archived author: Kazgrim • Posted: 2022-07-27T02:41:00.518000+00:00
Original source
so im confused X_X
Archived author: Kazgrim • Posted: 2022-07-27T02:57:06.429000+00:00
Original source
maybe it has to do with this?
`function CharacterCreateEnumerateRaces(...)
CharacterCreate.numRaces = arg.n/2;
if ( arg.n/2 > MAX_RACES ) then
message("Too many races! Update MAX_RACES");
return;
end
local coords;
local index = 1;
local button;
local gender;
if ( GetSelectedSex() == 1 ) then
gender = "MALE";
else
gender = "FEMALE";
end
for i=1, arg.n, 2 do
coords = RACE_ICON_TCOORDS[strupper(arg[i+1].."_"..gender)];
getglobal("CharacterCreateRaceButton"..index.."NormalTexture"):SetTexCoord(coords[1], coords[2], coords[3], coords[4]);
button = getglobal("CharacterCreateRaceButton"..index);
button:Show();
button.tooltip = arg[i];
index = index + 1;
end
for i=arg.n/2 + 1, MAX_RACES, 1 do
getglobal("CharacterCreateRaceButton"..i):Hide();
end
end`
Archived author: Kazgrim • Posted: 2022-07-27T02:57:21.262000+00:00
Original source
its indexing the races a certain way