mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
refactor(Core): Clean-up after FD (#8586)
This commit is contained in:
@@ -2351,13 +2351,6 @@ bool Creature::_IsTargetAcceptable(const Unit* target) const
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Creature::_CanDetectFeignDeathOf(const Unit* target) const
|
||||
{
|
||||
if (target->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH))
|
||||
return IsGuard();
|
||||
return true;
|
||||
}
|
||||
|
||||
void Creature::UpdateMoveInLineOfSightState()
|
||||
{
|
||||
// xinef: pets, guardians and units with scripts / smartAI should be skipped
|
||||
@@ -2423,6 +2416,12 @@ bool Creature::CanCreatureAttack(Unit const* victim, bool skipDistCheck) const
|
||||
return false;
|
||||
}
|
||||
|
||||
// if victim is in FD and we can't see that
|
||||
if (victim->HasFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH) && !CanIgnoreFeignDeath())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!GetCharmerOrOwnerGUID().IsPlayer())
|
||||
{
|
||||
if (GetMap()->IsDungeon())
|
||||
|
||||
Reference in New Issue
Block a user