mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-27 12:22:39 +01:00
Core/AI Prevent bosses respawn when BossState is set to DONE (#17616)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user