Core/Player: Set correct Gender by Modelid

An example: You are a blood elf female, you use [Iron Boot Flask], you turn into a male dwarf, you use  [Orb of the Sin'dorei] and it will turn you into a blood elf male. This is the correct behavior like retail.
This commit is contained in:
Kittnz committed 2015-10-30 23:57:23 +01:00
1 parent 144c545e36
commit 3c82b498cc
1 file changed
+3
+3
View File
@@ -14652,6 +14652,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()