mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8689] implement function Unit::isInvisibleForAlive
with that i've implemented all known auras which makes units invisible for alive.. but that's currently quite hacky i think best would be if we could set a unit-flag after those auras getting applied
This commit is contained in:
parent
e990d5c509
commit
46389e4e1c
9 changed files with 31 additions and 12 deletions
|
|
@ -49,7 +49,7 @@ AggressorAI::MoveInLineOfSight(Unit *u)
|
|||
|
||||
if (!m_creature->hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_DIED) && u->isTargetableForAttack() &&
|
||||
( m_creature->IsHostileTo( u ) /*|| u->getVictim() && m_creature->IsFriendlyTo( u->getVictim() )*/ ) &&
|
||||
u->isInAccessablePlaceFor(m_creature) )
|
||||
u->isInAccessablePlaceFor(m_creature) && !u->isInvisibleForAlive())
|
||||
{
|
||||
float attackRadius = m_creature->GetAttackDistance(u);
|
||||
if(m_creature->IsWithinDistInMap(u, attackRadius) && m_creature->IsWithinLOSInMap(u) )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue