mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[8690] added unit auraFlag variable
this can be used for faster checking if an unit has a specific aura applied.. also implemented the alive-invisible auras now with this way
This commit is contained in:
parent
46389e4e1c
commit
20e8982075
4 changed files with 21 additions and 4 deletions
|
|
@ -104,6 +104,7 @@ Unit::Unit()
|
|||
//m_AurasCheck = 2000;
|
||||
//m_removeAuraTimer = 4;
|
||||
m_AurasUpdateIterator = m_Auras.end();
|
||||
m_AuraFlags = 0;
|
||||
|
||||
m_Visibility = VISIBILITY_ON;
|
||||
|
||||
|
|
@ -10627,9 +10628,7 @@ bool Unit::isVisibleForInState( Player const* u, WorldObject const* viewPoint, b
|
|||
/// returns true if creature can't be seen by alive units
|
||||
bool Unit::isInvisibleForAlive() const
|
||||
{
|
||||
// TODO: more generic check for those auras
|
||||
// TODO: maybe we also don't need an isAlive() check for visibilty.. but only those auras
|
||||
if (HasAura(10848) || HasAura(36978) || HasAura(40131) || HasAura(27978) || HasAura(33900))
|
||||
if (m_AuraFlags & UNIT_AURAFLAG_ALIVE_INVISIBLE)
|
||||
return true;
|
||||
// TODO: maybe spiritservices also have just an aura
|
||||
return isSpiritService();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue