Merge commit '26c583c24ab7dbbf1fecf3dcd737c1ad543c8b33' into Playerbot_1017

This commit is contained in:
Yunfan Li
2023-10-17 22:18:39 +08:00
57 changed files with 1461 additions and 879 deletions
@@ -366,6 +366,9 @@ public:
return;
}
if (m_pInstance)
m_pInstance->SetData(TYPE_ALGALON, FAIL);
ScriptedAI::EnterEvadeMode(why);
}
@@ -786,6 +786,18 @@ public:
go->SetGoState(data == IN_PROGRESS ? GO_STATE_ACTIVE : GO_STATE_READY);
go->EnableCollision(false);
}
if (data == FAIL)
{
scheduler.Schedule(5s, [this](TaskContext)
{
if (m_algalonTimer && (m_algalonTimer <= 60 || m_algalonTimer == TIMER_ALGALON_TO_SUMMON))
{
instance->SummonCreature(NPC_ALGALON, AlgalonLandPos);
}
});
}
break;
// Achievement
@@ -1109,6 +1121,8 @@ public:
void Update(uint32 diff) override
{
InstanceScript::Update(diff);
if (_events.Empty())
return;