mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-01 10:03:47 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user