![]() |
TrinityCore
|
#include <MirrorTimer.h>
Public Types | |
| enum class | UpdateResult : uint8 { Inactive , Decreased , DecreasedExpired , ExpiredTicked , Regenerated } |
Public Member Functions | |
| bool | IsActive () const |
| bool | IsRegenerating () const |
| int32 | GetValue () const |
| void | SetValue (int32 value) |
| int32 | GetMaxValue () const |
| void | SetMaxValue (int32 maxValue) |
| int32 | GetScale () const |
| void | SetScale (int32 scale) |
| int32 | GetSpellId () const |
| bool | IsPaused () const |
| void | SetPaused (bool state) |
| bool | IsChanged () const |
| bool | IsPausedChanged () const |
| void | ClearChanged () |
| void | Start (int32 maxValue, int32 spellId) |
| void | Start (int32 value, int32 maxValue, int32 spellId) |
| void | Stop () |
| UpdateResult | Update (uint32 diff) |
Private Attributes | |
| int32 | m_value = 0 |
| int32 | m_maxValue = 0 |
| int32 | m_scale = -1 |
| int32 | m_spellId = 0 |
| EnumFlag< MirrorTimerFlags > | m_flags = MirrorTimerFlags::None |
| PeriodicTimer | m_expiredTick { ExpiredTickPeriod.count(), ExpiredTickPeriod.count() } |
Static Private Attributes | |
| static constexpr Milliseconds | ExpiredTickPeriod = 1s |
Definition at line 44 of file MirrorTimer.h.
|
strong |
| Enumerator | |
|---|---|
| Inactive | |
| Decreased | |
| DecreasedExpired | |
| ExpiredTicked | |
| Regenerated | |
Definition at line 73 of file MirrorTimer.h.
|
inline |
Definition at line 66 of file MirrorTimer.h.
References Changed, m_flags, PausedChanged, and EnumFlag< T >::RemoveFlag().
Referenced by Player::UpdateMirrorTimers().
|
inline |
Definition at line 53 of file MirrorTimer.h.
References m_maxValue.
Referenced by SetMaxValue(), Update(), and Player::UpdateMirrorTimers().
|
inline |
Definition at line 56 of file MirrorTimer.h.
References m_scale.
Referenced by SetScale(), Update(), and Player::UpdateMirrorTimers().
|
inline |
Definition at line 59 of file MirrorTimer.h.
References m_spellId.
Referenced by Player::UpdateMirrorTimers().
|
inline |
Definition at line 50 of file MirrorTimer.h.
References m_value.
Referenced by SetMaxValue(), SetValue(), Update(), and Player::UpdateMirrorTimers().
|
inline |
Definition at line 47 of file MirrorTimer.h.
References m_maxValue.
Referenced by SetMaxValue(), SetPaused(), SetScale(), SetValue(), Start(), Stop(), Update(), and Player::UpdateMirrorTimers().
|
inline |
Definition at line 64 of file MirrorTimer.h.
References Changed, EnumFlag< T >::HasFlag(), and m_flags.
Referenced by Player::UpdateMirrorTimers().
|
inline |
Definition at line 61 of file MirrorTimer.h.
References EnumFlag< T >::HasFlag(), IsRegenerating(), m_flags, and Paused.
Referenced by SetPaused(), Update(), and Player::UpdateMirrorTimers().
|
inline |
Definition at line 65 of file MirrorTimer.h.
References EnumFlag< T >::HasFlag(), m_flags, and PausedChanged.
Referenced by Player::UpdateMirrorTimers().
|
inline |
| void MirrorTimer::SetMaxValue | ( | int32 | maxValue | ) |
Definition at line 28 of file MirrorTimer.cpp.
References Changed, GetMaxValue(), GetValue(), IsActive(), m_flags, m_maxValue, SetValue(), and Stop().
| void MirrorTimer::SetPaused | ( | bool | state | ) |
Definition at line 54 of file MirrorTimer.cpp.
References IsActive(), IsPaused(), m_flags, Paused, and PausedChanged.
Referenced by SetScale().
| void MirrorTimer::SetScale | ( | int32 | scale | ) |
Definition at line 43 of file MirrorTimer.cpp.
References Changed, GetScale(), IsActive(), m_flags, m_scale, and SetPaused().
| void MirrorTimer::SetValue | ( | int32 | value | ) |
Definition at line 20 of file MirrorTimer.cpp.
References Changed, GetValue(), IsActive(), m_flags, and m_value.
Referenced by SetMaxValue().
Definition at line 65 of file MirrorTimer.cpp.
References Changed, ExpiredTickPeriod, m_expiredTick, m_flags, m_maxValue, m_scale, m_spellId, m_value, PeriodicTimer::SetPeriodic(), and Stop().
Referenced by Start(), and Player::UpdateMirrorTimers().
Definition at line 79 of file MirrorTimer.cpp.
References IsActive(), m_value, and Start().
| void MirrorTimer::Stop | ( | ) |
Definition at line 87 of file MirrorTimer.cpp.
References Changed, IsActive(), m_flags, m_maxValue, and m_value.
Referenced by SetMaxValue(), Start(), Update(), and Player::UpdateMirrorTimers().
| MirrorTimer::UpdateResult MirrorTimer::Update | ( | uint32 | diff | ) |
Definition at line 97 of file MirrorTimer.cpp.
References Decreased, DecreasedExpired, ExpiredTicked, ExpiredTickPeriod, GetMaxValue(), GetScale(), GetValue(), Inactive, IsActive(), IsPaused(), m_expiredTick, m_value, Regenerated, PeriodicTimer::SetPeriodic(), Stop(), and PeriodicTimer::Update().
Referenced by Player::UpdateMirrorTimers().
|
staticconstexprprivate |
Definition at line 91 of file MirrorTimer.h.
|
private |
Definition at line 92 of file MirrorTimer.h.
|
private |
Definition at line 89 of file MirrorTimer.h.
Referenced by ClearChanged(), IsChanged(), IsPaused(), IsPausedChanged(), SetMaxValue(), SetPaused(), SetScale(), SetValue(), Start(), and Stop().
|
private |
Definition at line 86 of file MirrorTimer.h.
Referenced by GetMaxValue(), IsActive(), SetMaxValue(), Start(), and Stop().
|
private |
Definition at line 87 of file MirrorTimer.h.
Referenced by GetScale(), IsRegenerating(), SetScale(), and Start().
|
private |
Definition at line 88 of file MirrorTimer.h.
Referenced by GetSpellId(), and Start().
|
private |
Definition at line 85 of file MirrorTimer.h.
Referenced by GetValue(), SetValue(), Start(), Start(), Stop(), and Update().