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