feat(Core): add OnDisplayId hook (#12320)

This commit is contained in:
Axel Cocat
2022-07-11 14:11:26 +02:00
committed by GitHub
parent 4d888f9431
commit aa89f6c3a6
3 changed files with 13 additions and 0 deletions

View File

@@ -16359,6 +16359,8 @@ void Unit::SetDisplayId(uint32 modelId)
// Set Gender by modelId
if (CreatureModelInfo const* minfo = sObjectMgr->GetCreatureModelInfo(modelId))
SetByteValue(UNIT_FIELD_BYTES_0, 2, minfo->gender);
sScriptMgr->OnDisplayIdChange(this, modelId);
}
void Unit::RestoreDisplayId()