mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +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
|
|
@ -43,7 +43,7 @@ void GuardAI::MoveInLineOfSight(Unit *u)
|
|||
|
||||
if (!m_creature->getVictim() && u->isTargetableForAttack() &&
|
||||
( u->IsHostileToPlayers() || 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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue