[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:
balrok 2009-10-18 21:01:55 +02:00
parent aa87b7007c
commit a2ff999fd3
13 changed files with 24 additions and 31 deletions

View file

@ -2098,15 +2098,14 @@ Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
return NULL;
// player check
if(!CanInteractWithNPCs(!unit->isSpiritService()))
if(!CanInteractWithNPCs(!(unit->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_GHOST)))
return NULL;
// appropriate npc type
if(npcflagmask && !unit->HasFlag( UNIT_NPC_FLAGS, npcflagmask ))
return NULL;
// alive or spirit healer
if(!unit->isAlive() && (!unit->isSpiritService() || isAlive() ))
if (isAlive() && !unit->isAlive())
return NULL;
// not allow interaction under control, but allow with own pets