Где ломать - найдено, а вот как - большой и долгий вопрос, учитывая глубину моих сишных познаний)))
./src/game/Totem.cpp
Код:
// select totem model in dependent from owner team
CreatureInfo const *cinfo = GetCreatureInfo();
if(owner->GetTypeId() == TYPEID_PLAYER && cinfo)
{
uint32 display_id = sObjectMgr.ChooseDisplayId(((Player*)owner)->GetTeam(), cinfo);
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
if (minfo)
display_id = minfo->modelid;
SetDisplayId(display_id);
}
И сама функция в ./src/game/ObjectMgr.cpp
Код:
uint32 ObjectMgr::ChooseDisplayId(uint32 team, const CreatureInfo *cinfo, const CreatureData *data /*= NULL*/)
{
// Load creature model (display id)
if (data && data->displayid)
return data->displayid;
// use defaults from the template
uint32 display_id;
// DisplayID_A is used if no team is given
if (team == HORDE)
{
if(cinfo->DisplayID_H[0])
display_id = cinfo->DisplayID_H[1] ? cinfo->DisplayID_H[urand(0,1)] : cinfo->DisplayID_H[0];
else
display_id = cinfo->DisplayID_H[1];
if(!display_id)
display_id = cinfo->DisplayID_A[0] ? cinfo->DisplayID_A[0] : cinfo->DisplayID_A[1];
}
else
{
if(cinfo->DisplayID_A[0])
display_id = cinfo->DisplayID_A[1] ? cinfo->DisplayID_A[urand(0,1)] : cinfo->DisplayID_A[0];
else
display_id = cinfo->DisplayID_A[1];
if(!display_id)
display_id = cinfo->DisplayID_H[0] ? cinfo->DisplayID_H[0] : cinfo->DisplayID_H[1];
}
return display_id;
}
Предположительно, нужно GetTeam() махнуть на GetRace(), и в функции уже переписать на расы. Вопрос в том, кто ещё юзает ChooseDisplayId(), так что раскопки продолжаются.