-
Notifications
You must be signed in to change notification settings - Fork 719
/
Copy pathsequence.hpp
58 lines (46 loc) · 1.48 KB
/
sequence.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
// ==========================================================================
// Dedmonwakeen's Raid DPS/TPS Simulator.
// Send questions to [email protected]
// ==========================================================================
#pragma once
#include "config.hpp"
#include "action/action.hpp"
#include "util/timespan.hpp"
#include <vector>
#include <string>
struct action_t;
struct action_state_t;
struct player_t;
// Sequence =================================================================
struct sequence_t : public action_t
{
bool waiting;
int sequence_wait_on_ready;
std::vector<action_t*> sub_actions;
int current_action;
bool restarted;
timespan_t last_restart;
bool has_option;
sequence_t(player_t*, util::string_view sub_action_str);
void schedule_execute(action_state_t* execute_state = nullptr) override;
void reset() override;
bool ready() override;
void init_finished() override;
void restart();
bool can_restart();
};
struct strict_sequence_t : public action_t
{
size_t current_action;
std::vector<action_t*> sub_actions;
std::string seq_name_str;
// Allow strict sequence sub-actions to be skipped if they are not ready. Default = false.
bool allow_skip;
strict_sequence_t( player_t*, util::string_view options );
bool ready() override;
void reset() override;
void cancel() override;
void interrupt_action() override;
void schedule_execute(action_state_t* execute_state = nullptr) override;
void init_finished() override;
};