[10381] Implement generic system for racial model selection

Table creature_model_info store creature entry to use model from (or explicit model). The selection is based on a base modelId and racemask.

Hacks for shapeshift models removed (data included in SQL update)
Dropped no longer needed creature_model_info.modelid_other_team, as creature_model_info can and should be used instead (sorry, this is what happen when author doesn't do full research :) )

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-08-19 16:57:48 +02:00
parent 22b515718f
commit d0df25fd8c
13 changed files with 243 additions and 82 deletions

View file

@ -247,14 +247,7 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
SetNativeDisplayId(display_id);
// special case for totems (model for team==HORDE is stored in creature_template as the default)
if (team == ALLIANCE && cinfo->type == CREATURE_TYPE_TOTEM)
{
uint32 modelid_tmp = sObjectMgr.GetCreatureModelOtherTeamModel(display_id);
display_id = modelid_tmp ? modelid_tmp : display_id;
}
// normally the same as native, see above for the exeption
// normally the same as native, but some has exceptions (Spell::DoSummonTotem)
SetDisplayId(display_id);
SetByteValue(UNIT_FIELD_BYTES_0, 2, minfo->gender);