|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <CreatureAIImpl.h>
Public Member Functions | |||||||||
| EventMap () | |||||||||
Reset | |||||||||
Removes all scheduled events and resets time and phase. | |||||||||
| void | Reset () | ||||||||
Update | |||||||||
Updates the timer of the event map.
| |||||||||
| void | Update (uint32 time) | ||||||||
GetTimer | |||||||||
| |||||||||
| uint32 | GetTimer () const | ||||||||
GetPhaseMask | |||||||||
| |||||||||
| uint8 | GetPhaseMask () const | ||||||||
Empty | |||||||||
| |||||||||
| bool | Empty () const | ||||||||
SetPhase | |||||||||
Sets the phase of the map (absolute).
| |||||||||
| void | SetPhase (uint8 phase) | ||||||||
AddPhase | |||||||||
Activates the given phase (bitwise).
| |||||||||
| void | AddPhase (uint8 phase) | ||||||||
RemovePhase | |||||||||
Deactivates the given phase (bitwise).
| |||||||||
| void | RemovePhase (uint8 phase) | ||||||||
ScheduleEvent | |||||||||
Creates new event entry in map.
| |||||||||
| void | ScheduleEvent (uint32 eventId, uint32 time, uint32 group=0, uint8 phase=0) | ||||||||
RescheduleEvent | |||||||||
Cancels the given event and reschedules it.
| |||||||||
| void | RescheduleEvent (uint32 eventId, uint32 time, uint32 group=0, uint8 phase=0) | ||||||||
RepeatEvent | |||||||||
Cancels the closest event and reschedules it.
| |||||||||
| void | RepeatEvent (uint32 time) | ||||||||
PopEvent | |||||||||
Remove the first event in the map. | |||||||||
| void | PopEvent () | ||||||||
ExecuteEvent | |||||||||
Returns the next event to execute and removes it from map.
| |||||||||
| uint32 | ExecuteEvent () | ||||||||
GetEvent | |||||||||
Returns the next event to execute.
| |||||||||
| uint32 | GetEvent () | ||||||||
DelayEvents | |||||||||
Delay all events of the same group.
| |||||||||
| void | DelayEvents (uint32 delay) | ||||||||
| void | DelayEvents (uint32 delay, uint32 group) | ||||||||
CancelEvent | |||||||||
Cancels all events of the specified id.
| |||||||||
| void | CancelEvent (uint32 eventId) | ||||||||
CancelEventGroup | |||||||||
Cancel events belonging to specified group.
| |||||||||
| void | CancelEventGroup (uint32 group) | ||||||||
GetNextEventTime | |||||||||
| |||||||||
| uint32 | GetNextEventTime (uint32 eventId) const | ||||||||
| uint32 | GetNextEventTime () const | ||||||||
IsInPhase | |||||||||
Returns wether event map is in specified phase or not.
| |||||||||
| bool | IsInPhase (uint8 phase) const | ||||||||
Private Types | |
| typedef std::multimap< uint32, uint32 > | EventStore |
Private Attributes | |
_time | |
Internal timer. This does not represent the real date/time value. It's more like a stopwatch: It can run, it can be stopped, it can be resetted and so on. Events occur when this timer has reached their time value. Its value is changed in the Update method. | |
| uint32 | _time |
_phase | |
Phase mask of the event map. Contains the phases the event map is in. Multiple phases from 1 to 8 can be set with SetPhase or AddPhase. RemovePhase deactives a phase. | |
| uint8 | _phase |
_eventMap | |
Internal event storage map. Contains the scheduled events. See typedef at the beginning of the class for more details. | |
| EventStore | _eventMap |
Definition at line 303 of file CreatureAIImpl.h.
|
private |
|
inline |
Definition at line 319 of file CreatureAIImpl.h.
|
inline |
Definition at line 387 of file CreatureAIImpl.h.
References _phase.
|
inline |
Definition at line 552 of file CreatureAIImpl.h.
References _eventMap, and Empty().
Referenced by RescheduleEvent().
|
inline |
Definition at line 571 of file CreatureAIImpl.h.
|
inline |
Definition at line 515 of file CreatureAIImpl.h.
References _time.
Definition at line 526 of file CreatureAIImpl.h.
|
inline |
Definition at line 364 of file CreatureAIImpl.h.
References _eventMap.
Referenced by CancelEvent(), CancelEventGroup(), DelayEvents(), ExecuteEvent(), GetEvent(), GetNextEventTime(), GetNextEventTime(), PopEvent(), and RepeatEvent().
|
inline |
|
inline |
|
inline |
Definition at line 607 of file CreatureAIImpl.h.
Definition at line 591 of file CreatureAIImpl.h.
|
inline |
Definition at line 355 of file CreatureAIImpl.h.
References _phase.
|
inline |
Definition at line 346 of file CreatureAIImpl.h.
References _time.
|
inline |
Definition at line 618 of file CreatureAIImpl.h.
References _phase.
|
inline |
Definition at line 456 of file CreatureAIImpl.h.
|
inline |
Definition at line 398 of file CreatureAIImpl.h.
References _phase.
|
inline |
Definition at line 442 of file CreatureAIImpl.h.
References _eventMap, Empty(), and ScheduleEvent().
|
inline |
Definition at line 431 of file CreatureAIImpl.h.
References CancelEvent(), and ScheduleEvent().
|
inline |
Definition at line 325 of file CreatureAIImpl.h.
|
inline |
Definition at line 412 of file CreatureAIImpl.h.
References _eventMap, and _time.
Referenced by RepeatEvent(), and RescheduleEvent().
|
inline |
Definition at line 374 of file CreatureAIImpl.h.
References _phase.
|
inline |
Definition at line 337 of file CreatureAIImpl.h.
References _time.
|
private |
Definition at line 653 of file CreatureAIImpl.h.
Referenced by CancelEvent(), CancelEventGroup(), DelayEvents(), Empty(), ExecuteEvent(), GetEvent(), GetNextEventTime(), GetNextEventTime(), PopEvent(), RepeatEvent(), Reset(), and ScheduleEvent().
|
private |
Definition at line 644 of file CreatureAIImpl.h.
Referenced by AddPhase(), EventMap(), ExecuteEvent(), GetEvent(), GetPhaseMask(), IsInPhase(), RemovePhase(), Reset(), and SetPhase().
|
private |
Definition at line 634 of file CreatureAIImpl.h.
Referenced by DelayEvents(), EventMap(), ExecuteEvent(), GetEvent(), GetTimer(), Reset(), ScheduleEvent(), and Update().