mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[8015] More dislpay id selection fixes...
* Allow have only A2 or H2 display ids for less strincted DB field data. * Check model data existance for all provided display ids atserver startup. * Avoid explicit access to creature info display fields but use display selection functions. * Rename GetTaxiMount to more clear for returned value GetTaxiMountDisplayId. * Check display ids in `creature_model_info` at server load.
This commit is contained in:
parent
a1b941b059
commit
08fe4933c5
14 changed files with 169 additions and 122 deletions
|
|
@ -62,10 +62,11 @@ void Totem::Summon(Unit* owner)
|
|||
CreatureInfo const *cinfo = GetCreatureInfo();
|
||||
if(owner->GetTypeId()==TYPEID_PLAYER && cinfo)
|
||||
{
|
||||
if(((Player*)owner)->GetTeam()==HORDE)
|
||||
SetDisplayId(cinfo->DisplayID_H);
|
||||
else
|
||||
SetDisplayId(cinfo->DisplayID_A);
|
||||
uint32 display_id = objmgr.ChooseDisplayId(((Player*)owner)->GetTeam(),cinfo);
|
||||
CreatureModelInfo const *minfo = objmgr.GetCreatureModelRandomGender(display_id);
|
||||
if (minfo)
|
||||
display_id = minfo->modelid;
|
||||
SetDisplayId(display_id);
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_GAMEOBJECT_SPAWN_ANIM_OBSOLETE, 8);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue