Creature type flags (#2195)

fix(Core/Creature): refactoring creature type flags and adding CREATURE_TYPE_FLAG_CAN_COLLIDE_WITH_MISSILES - closes #1984
This commit is contained in:
mik1893
2019-08-16 12:15:14 +01:00
committed by GitHub
parent 5815808faa
commit 7954a2a07e
9 changed files with 61 additions and 53 deletions

View File

@@ -2881,11 +2881,11 @@ Creature* Player::GetNPCIfCanInteractWith(uint64 guid, uint32 npcflagmask)
return NULL;
// Deathstate checks
if (!IsAlive() && !(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_GHOST))
if (!IsAlive() && !(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_GHOST_VISIBLE))
return NULL;
// alive or spirit healer
if (!creature->IsAlive() && !(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPEFLAGS_DEAD_INTERACT))
if (!creature->IsAlive() && !(creature->GetCreatureTemplate()->type_flags & CREATURE_TYPE_FLAG_CAN_INTERACT_WHILE_DEAD))
return NULL;
// appropriate npc type