SimulationCraft
SimulationCraft is a tool to explore combat mechanics in the popular MMO RPG World of Warcraft (tm).
|
Public Member Functions | |
ground_aoe_event_t (player_t *p, const ground_aoe_params_t ¶m, bool immediate_pulse=false) | |
void | set_current_pulse (unsigned v) |
timespan_t | remaining_time () const |
bool | may_pulse () const |
virtual timespan_t | pulse_time (bool clamp=true) const |
virtual void | schedule_event () |
const char * | name () const override |
void | execute () override |
void | handle_expiration () |
Public Member Functions inherited from player_event_t | |
player_event_t (player_t &p, timespan_t delta_time) | |
player_t * | p () |
const player_t * | p () const |
player_t * | player () |
const player_t * | player () const |
const char * | name () const override |
Public Member Functions inherited from event_t | |
event_t (sim_t &s, actor_t *a=nullptr) | |
event_t (actor_t &a) | |
event_t (sim_t &s, timespan_t delta_time) | |
event_t (actor_t &a, timespan_t delta_time) | |
timespan_t | occurs () const |
timespan_t | remains () const |
void | schedule (timespan_t delta_time) |
Schedule event on the event manager. | |
void | reschedule (timespan_t delta_time) |
sim_t & | sim () |
const sim_t & | sim () const |
rng::rng_t & | rng () |
Static Public Member Functions | |
static timespan_t | _time_left (const ground_aoe_params_t *params, const player_t *p) |
static timespan_t | _pulse_time (const ground_aoe_params_t *params, const player_t *p, bool clamp=true) |
Static Public Member Functions inherited from event_t | |
template<class T > | |
static void | cancel (T &e) |
static void | cancel (event_t *&e) |
Public Attributes | |
const ground_aoe_params_t * | params |
action_state_t * | pulse_state |
unsigned | current_pulse |
Public Attributes inherited from player_event_t | |
player_t * | _player |
Public Attributes inherited from event_t | |
sim_t & | _sim |
event_t * | next |
timespan_t | time |
timespan_t | reschedule_time |
unsigned | id |
bool | canceled |
bool | recycled |
bool | scheduled |
Protected Member Functions | |
ground_aoe_event_t (player_t *p, const ground_aoe_params_t *param, action_state_t *ps, bool immediate_pulse=false) | |
Friends | |
template<typename Event , typename... Args> | |
Event * | make_event (sim_t &sim, Args &&... args) |
Creates a event. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from event_t | |
static void * | operator new (std::size_t size, sim_t &sim) |
Placement-new operator for creating events. Do not use in user-code. | |
static void | operator delete (void *, sim_t &) |
static void | operator delete (void *) |
static void * | operator new (std::size_t)=delete |
|
friend |
Creates a event.
This function should be used as the one and only way to create new events. It is used to hide internal placement-new mechanism for efficient event allocation, and also makes sure that any event created is properly added to the event manager (scheduled).