Core/Player: Correct gender by modelid and avoid saving character with wrong gender
Closes #396 Author is MitchesD, Kittnz and Shauren
This commit is contained in:
parent
445b88563f
commit
bd799ecd5b
2 changed files with 5 additions and 2 deletions
|
|
@ -15404,6 +15404,9 @@ bool Unit::IsPolymorphed() const
|
|||
void Unit::SetDisplayId(uint32 modelId)
|
||||
{
|
||||
SetUInt32Value(UNIT_FIELD_DISPLAYID, modelId);
|
||||
// Set Gender by modelId
|
||||
if (CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelInfo(modelId))
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, 2, minfo->gender);
|
||||
}
|
||||
|
||||
void Unit::RestoreDisplayId()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue