mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
feat(Core/Scripts): Allow scheduling multiple hp checks at once for i… (#15897)
feat(Core/Scripts): Allow scheduling multiple hp checks at once for identical phases
This commit is contained in:
@@ -691,6 +691,14 @@ void BossAI::ScheduleHealthCheckEvent(uint32 healthPct, std::function<void()> ex
|
||||
_healthCheckEvents.push_back(HealthCheckEventData(healthPct, exec));
|
||||
};
|
||||
|
||||
void BossAI::ScheduleHealthCheckEvent(std::initializer_list<uint8> healthPct, std::function<void()> exec)
|
||||
{
|
||||
for (auto const& checks : healthPct)
|
||||
{
|
||||
_healthCheckEvents.push_back(HealthCheckEventData(checks, exec));
|
||||
}
|
||||
}
|
||||
|
||||
bool BossAI::_ProccessHealthCheckEvent(uint8 healthPct, uint32 damage, std::function<void()> exec) const
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(healthPct, damage))
|
||||
|
||||
Reference in New Issue
Block a user