Fix(Core/Uldaman): Door behind Archaedas can close after event. (#8024)

* Fix(Core/Uldaman): Door behind Archaedas can close after event.

Once the boss is dead, we shouldn't be able to close the doors anymore.

Closes https://github.com/azerothcore/azerothcore-wotlk/issues/7358

* removed unnecessary check to make CI happy
This commit is contained in:
patou01
2021-10-01 10:59:24 +02:00
committed by GitHub
parent cff7cc58ff
commit 77e46769fa

View File

@@ -92,6 +92,15 @@ public:
SaveToDB();
}
uint32 GetData(uint32 data) const override
{
if (data < MAX_ENCOUNTERS)
{
return _encounters[data];
}
return 0;
}
std::string GetSaveData() override
{
std::ostringstream saveStream;
@@ -227,7 +236,8 @@ public:
void HandleSendEvent(SpellEffIndex /*effIndex*/)
{
InstanceScript* instance = GetCaster()->GetInstanceScript();
if (!instance || instance->GetData(DATA_ARCHAEDAS) == IN_PROGRESS)
if (!instance || instance->GetData(DATA_ARCHAEDAS) == IN_PROGRESS || instance->GetData(DATA_ARCHAEDAS) == DONE)
return;
instance->SetData(DATA_ARCHAEDAS, IN_PROGRESS);