43 std::map<int, STD_VECTOR<QuestItem*> >
mQuests;
50 logger->
log1(
"Initializing quest database...");
67 if (incompleteStr.empty() && completeStr.empty())
86 if (!xmlTypeEqual(dataNode, XML_ELEMENT_NODE))
88 XmlChar *
const data =
reinterpret_cast<XmlChar*
>(
89 XmlNodeGetContent(dataNode));
95 for (
int f = 1; f < 100; f ++)
97 const std::string key =
strprintf(
"text%d", f);
103 const std::string param =
strprintf(
"{@@%d}", f);
107 if (xmlNameEqual(dataNode,
"text"))
114 else if (xmlNameEqual(dataNode,
"name"))
121 else if (xmlNameEqual(dataNode,
"reward"))
128 else if (xmlNameEqual(dataNode,
"questgiver") ||
129 xmlNameEqual(dataNode,
"giver"))
136 else if (xmlNameEqual(dataNode,
"coordinates"))
139 dataNode,
"x", 0, 1, 1000));
141 dataNode,
"y", 0, 1, 1000));
147 else if (xmlNameEqual(dataNode,
"npc"))
160 XmlNodeConstPtr node)
185 XmlNodeConstPtrConst root = doc.
rootNode();
191 if (xmlNameEqual(varNode,
"include"))
198 else if (xmlNameEqual(varNode,
"var"))
206 if (xmlNameEqual(questNode,
"quest"))
208 else if (xmlNameEqual(questNode,
"effect"))
219 for (std::map<
int, STD_VECTOR<QuestItem*> >::iterator it
222 STD_VECTOR<QuestItem*> &quests = (*it).second;
223 for (STD_VECTOR<QuestItem*>::iterator it2 = quests.begin(),
224 it2_end = quests.end(); it2 != it2_end; ++ it2)
251 std::map<int, STD_VECTOR<QuestItem*> >::const_iterator it =
258 const STD_VECTOR<QuestItem*> &items = (*it).second;
264 return items[0]->name;
static void loadXmlFile(const std::string &file, const std::string &name, BadgesInfos &arr, const SkipError skipError)
#define loadXmlDir(name, function)
const BeingTypeId BeingTypeId_negOne
std::string getStringValue(const std::string &key) const
void log(const char *const log_text,...)
void log1(const char *const log_text)
const std::string getStr(const std::string &str)
void delete_all(Container &c)
#define fromInt(val, name)
#define for_each_xml_child_node(var, parent)
CompositeGenerator< T > values(T val1, T val2)
std::string toString(T const &value)
converts any type to a string
NpcQuestVarMap * getVars()
std::string getName(const int id)
void loadXmlFile(const std::string &fileName, const SkipError skipError)
std::map< int, std::vector< QuestItem * > > * getQuests()
std::vector< QuestEffect * > * getAllEffects()
std::string langProperty(const xmlNodePtr node, const char *const name, const std::string &def)
int getProperty(const xmlNodePtr node, const char *const name, int def)
int getIntProperty(const xmlNodePtr node, const char *const name, int def, const int min, const int max)
std::map< int, std::vector< QuestItem * > > mQuests
std::vector< QuestEffect * > mAllEffects
static void loadQuest(const int var, const xmlNodePtr node)
static void loadEffect(const int var, const xmlNodePtr node)
std::map< int, QuestVar > NpcQuestVarMap
const bool SkipError_false
const bool SkipError_true
std::string & replaceAll(std::string &context, const std::string &from, const std::string &to)
std::string strprintf(const char *const format,...)
void splitToIntSet(std::set< int > &tokens, const std::string &text, const char separator)
void replaceItemLinks(std::string &msg)
std::vector< QuestItemText > texts
std::set< int > incomplete
const bool UseVirtFs_true