mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
fix(Scripts/BlackTemple): Implement emotes when opening Najentus and … (#19946)
* fix(Scripts/BlackTemple): Implement emotes when opening Najentus and Den of Mortal Delights * only check if state is done
This commit is contained in:
@@ -761,6 +761,24 @@ void InstanceScript::LoadInstanceSavedGameobjectStateData()
|
||||
}
|
||||
}
|
||||
|
||||
bool InstanceScript::AllBossesDone() const
|
||||
{
|
||||
for (auto const& boss : bosses)
|
||||
if (boss.state != DONE)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool InstanceScript::AllBossesDone(std::initializer_list<uint32> bossIds) const
|
||||
{
|
||||
for (auto const& bossId : bossIds)
|
||||
if (!IsBossDone(bossId))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string InstanceScript::GetBossStateName(uint8 state)
|
||||
{
|
||||
// See enum EncounterState in InstanceScript.h
|
||||
|
||||
@@ -275,6 +275,10 @@ public:
|
||||
|
||||
void LoadInstanceSavedGameobjectStateData();
|
||||
|
||||
[[nodiscard]] bool IsBossDone(uint32 bossId) const { return GetBossState(bossId) == DONE; };
|
||||
[[nodiscard]] bool AllBossesDone() const;
|
||||
[[nodiscard]] bool AllBossesDone(std::initializer_list<uint32> bossIds) const;
|
||||
|
||||
TaskScheduler scheduler;
|
||||
protected:
|
||||
void SetHeaders(std::string const& dataHeaders);
|
||||
|
||||
Reference in New Issue
Block a user