mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8676] implemented dead-visible creature flags_extra
with this flag you can specify a creature to be only visible for dead players - this removes all hacks from spiritguides/spirithealers from code and allows some other special creatures i decided to not implement an extra deathstate cause actualy those creatures are almost equal to living ones
This commit is contained in:
parent
aa87b7007c
commit
a2ff999fd3
13 changed files with 24 additions and 31 deletions
|
|
@ -46,7 +46,7 @@ AggressorAI::MoveInLineOfSight(Unit *u)
|
|||
if( !m_creature->canFly() && m_creature->GetDistanceZ(u) > CREATURE_Z_ATTACK_RANGE )
|
||||
return;
|
||||
|
||||
if( !m_creature->hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_DIED) && u->isTargetableForAttack() &&
|
||||
if( !(m_creature->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_GHOST) && !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) )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue