It was done with replacing lines in CharacterFacialStyles.dbc and CharHairTextures.dbc. These files are for facial features and scalps. Both files are in patch-enXX-X.mpq, but direction may be slightly different, depends from game version.
And i used windows notepad to edit .CSV files.
First of all, you need to know id number for race:
1 - Human
2 - Orc
3 - Dwarf
4 - Night Elf
5 - Scourge
6 - Tauren
7 - Gnome
8 - Troll
9 - Goblin
10 - Blood Elf
11 - Draenei
12 - Fel Orc
13 - Naga
14 - Broken
15 - Skeleton
And gender:
0 - Male
1 - Female
Basic structure for files, in notepad (an example):
In CharHairTextures.dbc entries are written in this way:
20,3,0,0,788,0,2,2,
21,3,0,0,192,0,1,1,
First number makes id for hair.
Second number is id for race.
Third number is id for gender.
( hair id,race id,gender id,0,0,192,0,1,1,)
In CharacterFacialStyles.dbc entries looks like that:
3,0,1,2010404113,132302,2445512,3,3,3,
3,0,2,2010404113,132302,2445512,4,4,4,
Where first number makes id for race, and second for gender.
(race id,gender id,2,2010404113,132302,2445512,4,4,4,)
Now all you need to do, is replace every single line for old race, to line for new model. Amount of lines should be equal with race and gender, who has more lines.
I.e.: if you change yours character from race with 10 lines in CharHairTextures.dbc to race with 5 lines, you should delete some lines. Or, if your desirable race has more lines than old, just repeat some lines .(i.e. 5 female and 6 male lines should be replaced wit 5 female and 6 male).
Details about editing:
CharacterFacialStyles:
3,0,1,2010404113,132302,2445512,3,3,3,
3,1,2,2010404113,132302,2445512,4,4,4,
These are example lines for dwarf. Upper are for male, lower for female. If someone wants to change model for dwarf , he should replace line for his old race with lines for dwarf ("female" lines instead of"female", and "male" for "male"), and change race id for his old race id (i.e, when you change model from orc to dwarf, race id in edited line should be 2 - because for WoW your character is still an orc, and you only change model).
CharHairTextures.dbc:
20,3,0,0,788,0,2,2,
21,3,1,0,192,0,1,1,
Again, just replace lines, but DON`T CHANGE first number (hair id), only second and third.
Gender id shouldn`t be changed, unless you want to change character gender.