mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +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
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue