mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
Core/Scripts: Added ai method to temporarily despawn a boss when it enters evade mode (respawns after 30 seconds)
This commit is contained in:
@@ -585,6 +585,20 @@ void BossAI::UpdateAI(uint32 const diff)
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void BossAI::_DespawnAtEvade()
|
||||
{
|
||||
uint32 corpseDelay = me->GetCorpseDelay();
|
||||
uint32 respawnDelay = me->GetRespawnDelay();
|
||||
|
||||
me->SetCorpseDelay(1);
|
||||
me->SetRespawnDelay(29);
|
||||
|
||||
me->DespawnOrUnsummon();
|
||||
|
||||
me->SetCorpseDelay(corpseDelay);
|
||||
me->SetRespawnDelay(respawnDelay);
|
||||
}
|
||||
|
||||
// WorldBossAI - for non-instanced bosses
|
||||
|
||||
WorldBossAI::WorldBossAI(Creature* creature) :
|
||||
|
||||
@@ -308,6 +308,7 @@ class BossAI : public ScriptedAI
|
||||
void _EnterCombat();
|
||||
void _JustDied();
|
||||
void _JustReachedHome() { me->setActive(false); }
|
||||
void _DespawnAtEvade();
|
||||
|
||||
bool CheckInRoom()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user