mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8688] proper implementation of creatures ghost-flags
this reverts 8676 (9c50d9e70314b0cd9eb0fe3bac8040d64a9965a5) the new flag is from wdb-files so your database should be already alright also i've dropped the function Player::CanInteractWithNPCs cause it was used only in one place and didn't seem to make anything easier NOTE for this flag: it just means that the creature can be seen by ghost-players too.. so they are still visible for alive players.. unless a special aura or ther unitflag (spiritguide/healer) disables this.. (see next commit for it)
This commit is contained in:
parent
58139610eb
commit
e990d5c509
12 changed files with 24 additions and 36 deletions
|
|
@ -19,6 +19,7 @@
|
|||
#include "AggressorAI.h"
|
||||
#include "Errors.h"
|
||||
#include "Creature.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "VMapFactory.h"
|
||||
#include "World.h"
|
||||
|
|
@ -46,7 +47,7 @@ AggressorAI::MoveInLineOfSight(Unit *u)
|
|||
if( !m_creature->canFly() && m_creature->GetDistanceZ(u) > CREATURE_Z_ATTACK_RANGE )
|
||||
return;
|
||||
|
||||
if( !(m_creature->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_GHOST) && !m_creature->hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_DIED) && u->isTargetableForAttack() &&
|
||||
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) )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue