fix(Core/Creature): Fix grace period for can attack check. (#19763)

Init.
This commit is contained in:
Benjamin Jackson
2024-08-28 07:13:06 -04:00
committed by GitHub
parent dccec87644
commit 5ffbfdd5d6

View File

@@ -2629,7 +2629,7 @@ bool Creature::CanCreatureAttack(Unit const* victim, bool skipDistCheck) const
return false;
// cannot attack if is during 5 second grace period, unless being attacked
if (m_respawnedTime && (GameTime::GetGameTime().count() - m_respawnedTime) < 5 && victim->getAttackers().empty())
if (m_respawnedTime && (GameTime::GetGameTime().count() - m_respawnedTime) < 5 && !GetLastDamagedTime())
{
return false;
}