31 |
|
|
32 |
#include <vector> |
#include <vector> |
33 |
#include "event/event.h" |
#include "event/event.h" |
34 |
|
#include "rpg/quest.h" |
35 |
|
|
36 |
namespace rpg |
namespace rpg |
37 |
{ |
{ |
75 |
* |
* |
76 |
* '*' will match one level in the path to the quest node, while '>' |
* '*' will match one level in the path to the quest node, while '>' |
77 |
* will match all nodes with a common prefix. |
* will match all nodes with a common prefix. |
78 |
|
* @param part @quest part that just changed its state. |
79 |
*/ |
*/ |
80 |
quest_event (const string & pattern); |
quest_event (const string & pattern, quest_part * part = NULL); |
81 |
|
|
82 |
#ifndef SWIG |
#ifndef SWIG |
83 |
/** |
/** |
92 |
*/ |
*/ |
93 |
//@{ |
//@{ |
94 |
/** |
/** |
95 |
* Compare two time events for equality. |
* Compare two %quest events for equality. |
96 |
* |
* |
97 |
* @param e The time event to compare this to. |
* @param e The %quest %event to compare this to. |
98 |
* @return <b>True</b> if the two events equal, <b>false</b> otherwise. |
* @return <b>True</b> if the two events equal, <b>false</b> otherwise. |
99 |
*/ |
*/ |
100 |
bool equals (const events::event * e); |
bool equals (const events::event * e); |
101 |
|
|
102 |
|
/** |
103 |
|
* Return %quest part that triggered this event. |
104 |
|
* @return %quest part that triggered this event. |
105 |
|
*/ |
106 |
|
quest_part *part () |
107 |
|
{ |
108 |
|
return Part; |
109 |
|
} |
110 |
|
|
111 |
#ifndef SWIG |
#ifndef SWIG |
112 |
/** |
/** |
113 |
* Get name of %event. |
* Get name of %event. |
179 |
#endif |
#endif |
180 |
|
|
181 |
private: |
private: |
182 |
|
/** |
183 |
|
* Set the pattern for the triggering events. |
184 |
|
* @param pattern path of quest that will trigger events. It may |
185 |
|
* contain the wildcards '*' and '>'. |
186 |
|
*/ |
187 |
|
void quest_event::set_pattern (const std::string & pattern); |
188 |
|
|
189 |
/// pattern that will trigger event |
/// pattern that will trigger event |
190 |
std::vector<std::string> Pattern; |
std::vector<std::string> Pattern; |
191 |
|
/// %quest part that triggered the event |
192 |
|
quest_part *Part; |
193 |
}; |
}; |
194 |
} |
} |
195 |
|
|