feat(Core/Creature): Create & use CREATURE_FLAG_EXTRA_IGNORE_FEIGN_DEATH (#5360)

Co-Authored-By: offl <11556157+offl@users.noreply.github.com>

Co-authored-by: offl <11556157+offl@users.noreply.github.com>
This commit is contained in:
Kitzunu
2021-04-30 14:01:36 +02:00
committed by GitHub
parent 633105cf48
commit e29acf44d0
3 changed files with 406 additions and 4 deletions

View File

@@ -2236,8 +2236,8 @@ bool Creature::_IsTargetAcceptable(const Unit* target) const
if (target->HasUnitState(UNIT_STATE_DIED))
{
// guards can detect fake death
if (IsGuard() && target->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH))
// some creatures can detect fake death
if (CanIgnoreFeignDeath() && target->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH))
return true;
else
return false;