|
| EventMap () |
|
|
Removes all scheduled events and resets time and phase.
|
void | Reset () |
|
|
Updates the timer of the event map.
- Parameters
-
time | Value in ms to be added to time. |
|
void | Update (uint32 time) |
|
|
- Returns
- Current timer in ms value.
|
uint32 | GetTimer () const |
|
|
- Returns
- Active phases as mask.
|
uint8 | GetPhaseMask () const |
|
|
- Returns
- True, if there are no events scheduled.
|
bool | Empty () const |
|
|
Sets the phase of the map (absolute).
- Parameters
-
phase | Phase which should be set. Values: 1 - 8. 0 resets phase. |
|
void | SetPhase (uint8 phase) |
|
|
Activates the given phase (bitwise).
- Parameters
-
phase | Phase which should be activated. Values: 1 - 8 |
|
void | AddPhase (uint8 phase) |
|
|
Deactivates the given phase (bitwise).
- Parameters
-
phase | Phase which should be deactivated. Values: 1 - 8. |
|
void | RemovePhase (uint8 phase) |
|
|
Creates new event entry in map.
- Parameters
-
eventId | The id of the new event. |
time | The time in milliseconds until the event occurs. |
group | The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group. |
phase | The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases. |
|
void | ScheduleEvent (uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0) |
|
void | ScheduleEvent (uint32 eventId, uint32 time, uint32 group=0, uint8 phase=0) |
|
|
Cancels the given event and reschedules it.
- Parameters
-
eventId | The id of the event. |
time | The time in milliseconds until the event occurs. |
group | The group which the event is associated to. Has to be between 1 and 8. 0 means it has no group. |
phase | The phase in which the event can occur. Has to be between 1 and 8. 0 means it can occur in all phases. |
|
void | RescheduleEvent (uint32 eventId, Milliseconds const &time, uint32 group=0, uint8 phase=0) |
|
void | RescheduleEvent (uint32 eventId, uint32 time, uint32 group=0, uint8 phase=0) |
|
|
Repeats the mostly recently executed event, Equivalent to Repeat(urand(minTime, maxTime).
- Parameters
-
minTime | Minimum time until the event occurs. |
maxTime | Maximum time until the event occurs. |
|
void | Repeat (Milliseconds const &time) |
|
void | Repeat (uint32 time) |
|
void | Repeat (Milliseconds const &minTime, Milliseconds const &maxTime) |
|
void | Repeat (uint32 minTime, uint32 maxTime) |
|
|
Returns the next event to execute and removes it from map.
- Returns
- Id of the event to execute.
|
uint32 | ExecuteEvent () |
|
|
Delay all events of the same group.
- Parameters
-
delay | Amount of delay. |
group | Group of the events. |
|
void | DelayEvents (Milliseconds const &delay) |
|
void | DelayEvents (uint32 delay) |
|
void | DelayEvents (Milliseconds const &delay, uint32 group) |
|
void | DelayEvents (uint32 delay, uint32 group) |
|
|
Cancels all events of the specified id.
- Parameters
-
eventId | Event id to cancel. |
|
void | CancelEvent (uint32 eventId) |
|
|
Cancel events belonging to specified group.
- Parameters
-
|
void | CancelEventGroup (uint32 group) |
|
|
- Returns
- Time of next event.
|
uint32 | GetNextEventTime (uint32 eventId) const |
|
uint32 | GetNextEventTime () const |
|
|
Returns whether event map is in specified phase or not.
- Parameters
-
- Returns
- True, if phase of event map contains specified phase.
|
bool | IsInPhase (uint8 phase) const |
|
|
Returns time in milliseconds until next event.
- Parameters
-
- Returns
- Time of next event.
|
uint32 | GetTimeUntilEvent (uint32 eventId) const |
|