fix(Core/Creature): Fix grace period for can attack check. (#19763)
Init.
This commit is contained in:
@@ -2629,7 +2629,7 @@ bool Creature::CanCreatureAttack(Unit const* victim, bool skipDistCheck) const
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// cannot attack if is during 5 second grace period, unless being attacked
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user