mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
fix(DB/Creature): Fix ZA bosses not despawning on evade (#20900)
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "CreatureGroups.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
@@ -144,6 +145,9 @@ struct boss_zuljin : public BossAI
|
||||
me->SetCombatMovement(true);
|
||||
me->m_Events.KillAllEvents(false);
|
||||
_nextPhase = 0;
|
||||
|
||||
if (CreatureGroup* formation = me->GetFormation())
|
||||
formation->RespawnFormation(true);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
@@ -239,6 +243,21 @@ struct boss_zuljin : public BossAI
|
||||
});
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason /*why*/) override
|
||||
{
|
||||
if (CreatureGroup* formation = me->GetFormation())
|
||||
{
|
||||
for (auto const& itr : formation->GetMembers())
|
||||
{
|
||||
if (itr.first && itr.first != me)
|
||||
itr.first->DespawnOnEvade(2min);
|
||||
}
|
||||
}
|
||||
|
||||
me->DespawnOnEvade(2min);
|
||||
_EnterEvadeMode();
|
||||
}
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->Id == SPELL_CLAW_RAGE_CHARGE && target != me)
|
||||
|
||||
Reference in New Issue
Block a user