Go to the documentation of this file.
36 (*existing) = (*update);
45 if (!
quest->quest_is_system)
88 while (!
quest->steps.empty()) {
90 quest->steps.pop_back();
101 int condition_parsed = 0;
106 char namedquest[500];
107 namedquest[0] =
'\0';
108 if (sscanf(buffer,
"%s %d-%d", namedquest, &condition->
minstep, &condition->
maxstep) != 3) {
109 if (sscanf(buffer,
"%s <=%d", namedquest, &condition->
maxstep) == 2) {
111 condition_parsed = 1;
112 }
else if (sscanf(buffer,
"%s %d", namedquest, &condition->
minstep) == 2) {
114 condition_parsed = 1;
115 }
else if (strstr(buffer,
"finished")) {
116 if (sscanf(buffer,
"%s finished", namedquest) == 1) {
118 condition_parsed = 1;
122 condition_parsed = 1;
124 if (condition_parsed)
127 return condition_parsed;
#define FREE_AND_CLEAR_STR_IF(xyz)
quest_step_definition * quest_create_step(void)
void quest_write_condition(char *buf, size_t len, const quest_condition *cond)
virtual void replace(quest_definition *existing, quest_definition *update) override
void quest_clear(quest_definition *quest)
void asset_destroy(quest_definition *quest)
sstring add_string(const char *str)
quest_definition * asset_create(const std::string &name)
void quest_destroy_condition(quest_condition *condition)
void fatal(enum fatal_error err)
void free_string(sstring str)
void quest_destroy(quest_definition *quest)
virtual void added(quest_definition *quest) override
std::vector< quest_condition * > conditions
std::unordered_map< std::string, quest_definition * > m_assets
void quest_destroy_step(quest_step_definition *step)
quest_definition * quest_create(const char *name)
int quest_condition_from_string(quest_condition *condition, const char *buffer)
quest_condition * quest_create_condition(void)