Codechange: introduce week/quarter triggers for TimerGameCalendar (#11189)
This simplifies code that triggers on these periods.
This commit is contained in:
@@ -215,10 +215,22 @@ void TimerManager<TimerGameCalendar>::Elapsed(TimerGameCalendar::TElapsed delta)
|
||||
timer->Elapsed(TimerGameCalendar::DAY);
|
||||
}
|
||||
|
||||
if ((TimerGameCalendar::date % 7) == 3) {
|
||||
for (auto timer : timers) {
|
||||
timer->Elapsed(TimerGameCalendar::WEEK);
|
||||
}
|
||||
}
|
||||
|
||||
if (new_month) {
|
||||
for (auto timer : timers) {
|
||||
timer->Elapsed(TimerGameCalendar::MONTH);
|
||||
}
|
||||
|
||||
if ((TimerGameCalendar::month % 3) == 0) {
|
||||
for (auto timer : timers) {
|
||||
timer->Elapsed(TimerGameCalendar::QUARTER);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (new_year) {
|
||||
|
Reference in New Issue
Block a user