[10296] Move ChooseDisplayId to Creature class for access from script side

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-07-30 21:08:25 +02:00
parent 181428e132
commit 7bdf05901d
8 changed files with 62 additions and 60 deletions

View file

@ -2650,7 +2650,7 @@ void Aura::HandleAuraMounted(bool apply, bool Real)
if (target->GetTypeId()==TYPEID_PLAYER)
team = ((Player*)target)->GetTeam();
uint32 display_id = sObjectMgr.ChooseDisplayId(team,ci);
uint32 display_id = Creature::ChooseDisplayId(team,ci);
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
if (minfo)
display_id = minfo->modelid;
@ -3080,7 +3080,7 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
sLog.outError("Auras: unknown creature id = %d (only need its modelid) Form Spell Aura Transform in Spell ID = %d", m_modifier.m_miscvalue, GetId());
}
else
model_id = sObjectMgr.ChooseDisplayId(0,ci);// Will use the default model here
model_id = Creature::ChooseDisplayId(0,ci); // Will use the default model here
// Polymorph (sheep/penguin case)
if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_MAGE && GetSpellProto()->SpellIconID == 82)
@ -3156,7 +3156,7 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
if (target->GetTypeId() == TYPEID_PLAYER)
team = ((Player*)target)->GetTeam();
uint32 display_id = sObjectMgr.ChooseDisplayId(team, ci);
uint32 display_id = Creature::ChooseDisplayId(team, ci);
CreatureModelInfo const *minfo = sObjectMgr.GetCreatureModelRandomGender(display_id);
if (minfo)
display_id = minfo->modelid;