Core/AI Prevent bosses respawn when BossState is set to DONE (#17616)

This commit is contained in:
Gustavo
2016-07-18 07:35:11 -03:00
committed by Aokromes
parent faa310252f
commit c31be4100e
2 changed files with 9 additions and 0 deletions

View File

@@ -507,6 +507,14 @@ void BossAI::_EnterCombat()
ScheduleTasks();
}
bool BossAI::CanRespawn()
{
if (instance && instance->GetBossState(_bossId) == DONE)
return false;
return true;
}
void BossAI::TeleportCheaters()
{
float x, y, z;

View File

@@ -361,6 +361,7 @@ class BossAI : public ScriptedAI
void JustReachedHome() override { _JustReachedHome(); }
bool CanAIAttack(Unit const* target) const override { return CheckBoundary(target); }
bool CanRespawn() override;
protected:
void _Reset();