mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 19:37:03 +00:00
[12017] Add support for getRace() of creatures. Thanks to vladimir for input
This commit is contained in:
parent
dfa35dafab
commit
fb3a990b13
6 changed files with 16 additions and 9 deletions
|
|
@ -2168,6 +2168,11 @@ bool Creature::HasSpellCooldown(uint32 spell_id) const
|
|||
return (itr != m_CreatureSpellCooldowns.end() && itr->second > time(NULL)) || HasCategoryCooldown(spell_id);
|
||||
}
|
||||
|
||||
uint8 Creature::getRace() const
|
||||
{
|
||||
return Unit::getRace() ? Unit::getRace() : GetCreatureModelRace(GetNativeDisplayId());
|
||||
}
|
||||
|
||||
bool Creature::IsInEvadeMode() const
|
||||
{
|
||||
return !i_motionMaster.empty() && i_motionMaster.GetCurrentMovementGeneratorType() == HOME_MOTION_TYPE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue