mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
fix(Core/Unit): Implement GetDisplayRace() (#17609)
This commit is contained in:
@@ -21145,6 +21145,18 @@ void Unit::setRace(uint8 race)
|
||||
m_race = race;
|
||||
}
|
||||
|
||||
DisplayRace Unit::GetDisplayRaceFromModelId(uint32 modelId) const
|
||||
{
|
||||
if (CreatureDisplayInfoEntry const* display = sCreatureDisplayInfoStore.LookupEntry(modelId))
|
||||
{
|
||||
if (CreatureDisplayInfoExtraEntry const* displayExtra = sCreatureDisplayInfoExtraStore.LookupEntry(display->ExtendedDisplayInfoID))
|
||||
{
|
||||
return DisplayRace(displayExtra->DisplayRaceID);
|
||||
}
|
||||
}
|
||||
return DisplayRace::None;
|
||||
}
|
||||
|
||||
// Check if unit in combat with specific unit
|
||||
bool Unit::IsInCombatWith(Unit const* who) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user