 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
36 (*existing) = (*update);
76 while (!
step->conditions.empty()) {
78 step->conditions.pop_back();
88 while (!quest->
steps.empty()) {
90 quest->
steps.pop_back();
101 int condition_parsed = 0;
106 char namedquest[500];
107 namedquest[0] =
'\0';
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)
sstring quest_code
The quest that triggers the condition.
quest_step_definition * quest_create_step(void)
Allocate a quest_step_definition, will call fatal() if out of memory.
int maxstep
The latest step that triggers the condition, to match, the stages must be between minstep and maxstep...
void quest_write_condition(char *buf, size_t len, const quest_condition *cond)
Write a step condition to a buffer.
virtual void replace(quest_definition *existing, quest_definition *update) override
Replace an asset by an updated version.
sstring quest_description
Quest longer description.
void quest_clear(quest_definition *quest)
bool quest_is_system
If set then the quest isn't counted or listed.
Plugin animator file specs[Config] name
void asset_destroy(quest_definition *quest)
sstring quest_title
Quest title for player.
sstring quest_comment
Quest comment, not visible to players.
sstring add_string(const char *str)
This will add 'str' to the hash table.
sstring quest_code
Quest internal code.
quest_definition * asset_create(const std::string &name)
How to Install a Crossfire Server on you must install a python script engine on your computer Python is the default script engine of Crossfire You can find the python engine you have only to install them The VisualC Crossfire settings are for but you habe then to change the pathes in the VC settings Go in Settings C and Settings Link and change the optional include and libs path to the new python installation path o step
void quest_destroy_condition(quest_condition *condition)
uint32_t client_code
The code used to communicate with the client, merely a unique index.
void fatal(enum fatal_error err)
fatal() is meant to be called whenever a fatal signal is intercepted.
void free_string(sstring str)
This will reduce the refcount, and if it has reached 0, str will be freed.
int minstep
The earliest step in the quest that triggers the condition, -1 means finished, 0 means not started.
One condition to automatically move to a quest step.
Definition of an in-game quest.
void quest_destroy(quest_definition *quest)
if you malloc the data for the buffer
virtual void added(quest_definition *quest) override
An asset was either referenced (but undefined) or defined.
std::unordered_map< std::string, quest_definition * > m_assets
Known 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)
Parse a single step condition.
quest_condition * quest_create_condition(void)
Allocate a quest_condition, will call fatal() if out of memory.
std::vector< quest_step_definition * > steps
Quest steps.