mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 08:17:56 +00:00
fix(Script/Hyjal): Fix encounter states not reseting if bosses are de… (#19000)
* fix(Script/Hyjal): Fix encounter states not reseting if bosses are despawned while in combat * Update instance_hyjal.cpp
This commit is contained in:
@@ -419,6 +419,9 @@ public:
|
|||||||
if (Creature* creature = instance->GetCreature(guid))
|
if (Creature* creature = instance->GetCreature(guid))
|
||||||
creature->DespawnOrUnsummon();
|
creature->DespawnOrUnsummon();
|
||||||
|
|
||||||
|
if (_bossWave && (GetBossState(_bossWave) != DONE))
|
||||||
|
SetBossState(_bossWave, NOT_STARTED);
|
||||||
|
|
||||||
_scheduler.Schedule(300s, [this](TaskContext)
|
_scheduler.Schedule(300s, [this](TaskContext)
|
||||||
{
|
{
|
||||||
for (ObjectGuid const& guid : _baseAlliance)
|
for (ObjectGuid const& guid : _baseAlliance)
|
||||||
@@ -442,6 +445,9 @@ public:
|
|||||||
if (Creature* creature = instance->GetCreature(guid))
|
if (Creature* creature = instance->GetCreature(guid))
|
||||||
creature->DespawnOrUnsummon();
|
creature->DespawnOrUnsummon();
|
||||||
|
|
||||||
|
if (_bossWave && (GetBossState(_bossWave) != DONE))
|
||||||
|
SetBossState(_bossWave, NOT_STARTED);
|
||||||
|
|
||||||
_scheduler.Schedule(300s, [this](TaskContext)
|
_scheduler.Schedule(300s, [this](TaskContext)
|
||||||
{
|
{
|
||||||
for (ObjectGuid const& guid : _baseHorde)
|
for (ObjectGuid const& guid : _baseHorde)
|
||||||
|
|||||||
Reference in New Issue
Block a user