mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 13:46:24 +00:00
fix(Scripts/ZulAman): make sure Malacrass timer is delayed only when it should be triggered during channel of Spirit Bolts (#21089)
This commit is contained in:
@@ -124,9 +124,9 @@ bool TaskScheduler::IsGroupScheduled(group_t const group)
|
||||
return _task_holder.IsGroupQueued(group);
|
||||
}
|
||||
|
||||
Milliseconds TaskScheduler::GetNextGroupOcurrence(group_t const group) const
|
||||
Milliseconds TaskScheduler::GetNextGroupOccurrence(group_t const group) const
|
||||
{
|
||||
return std::chrono::duration_cast<std::chrono::milliseconds>(_task_holder.GetNextGroupOcurrence(group) - clock_t::now());
|
||||
return std::chrono::duration_cast<std::chrono::milliseconds>(_task_holder.GetNextGroupOccurrence(group) - clock_t::now());
|
||||
}
|
||||
|
||||
void TaskScheduler::TaskQueue::Push(TaskContainer&& task)
|
||||
@@ -194,15 +194,12 @@ bool TaskScheduler::TaskQueue::IsGroupQueued(group_t const group)
|
||||
return false;
|
||||
}
|
||||
|
||||
TaskScheduler::timepoint_t TaskScheduler::TaskQueue::GetNextGroupOcurrence(group_t const group) const
|
||||
TaskScheduler::timepoint_t TaskScheduler::TaskQueue::GetNextGroupOccurrence(group_t const group) const
|
||||
{
|
||||
TaskScheduler::timepoint_t next = TaskScheduler::timepoint_t::max();
|
||||
for (auto const& task : container)
|
||||
{
|
||||
if (task->IsInGroup(group) && task->_end < next)
|
||||
next = task->_end;
|
||||
}
|
||||
|
||||
return next;
|
||||
}
|
||||
|
||||
@@ -248,7 +245,7 @@ TaskScheduler::repeated_t TaskContext::GetRepeatCounter() const
|
||||
return _task->_repeated;
|
||||
}
|
||||
|
||||
TaskScheduler::timepoint_t TaskContext::GetNextOcurrence() const
|
||||
TaskScheduler::timepoint_t TaskContext::GetNextOccurrence() const
|
||||
{
|
||||
return _task->_end;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ class TaskScheduler
|
||||
bool IsGroupQueued(group_t const group);
|
||||
|
||||
// Returns the next group occurrence.
|
||||
TaskScheduler::timepoint_t GetNextGroupOcurrence(group_t const group) const;
|
||||
TaskScheduler::timepoint_t GetNextGroupOccurrence(group_t const group) const;
|
||||
|
||||
bool IsEmpty() const;
|
||||
};
|
||||
@@ -377,7 +377,7 @@ public:
|
||||
}
|
||||
|
||||
// Returns the next group occurrence.
|
||||
Milliseconds GetNextGroupOcurrence(group_t const group) const;
|
||||
Milliseconds GetNextGroupOccurrence(group_t const group) const;
|
||||
|
||||
private:
|
||||
/// Insert a new task to the enqueued tasks.
|
||||
@@ -483,7 +483,7 @@ public:
|
||||
/// Returns the repeat counter which increases every time the task is repeated.
|
||||
TaskScheduler::repeated_t GetRepeatCounter() const;
|
||||
|
||||
TaskScheduler::timepoint_t GetNextOcurrence() const;
|
||||
TaskScheduler::timepoint_t GetNextOccurrence() const;
|
||||
|
||||
/// Repeats the event and sets a new duration.
|
||||
/// std::chrono::seconds(5) for example.
|
||||
|
||||
Reference in New Issue
Block a user