diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-06-22 23:28:47 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-06-22 23:28:47 +0300 |
commit | 76886a84c8c197a1f46f711e15569b6991e5555a (patch) | |
tree | daaa2beaa5da04282405e9d0a4d0eb064a18c535 /src/gui | |
parent | 218e1b2d09ba7be306cce3b4e2ef92a257466ef2 (diff) | |
download | manaverse-76886a84c8c197a1f46f711e15569b6991e5555a.tar.gz manaverse-76886a84c8c197a1f46f711e15569b6991e5555a.tar.bz2 manaverse-76886a84c8c197a1f46f711e15569b6991e5555a.tar.xz manaverse-76886a84c8c197a1f46f711e15569b6991e5555a.zip |
improve function for splitting string to ints.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/questswindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/questswindow.cpp b/src/gui/questswindow.cpp index 42042e58f..d863e3dbd 100644 --- a/src/gui/questswindow.cpp +++ b/src/gui/questswindow.cpp @@ -259,8 +259,8 @@ void QuestsWindow::loadQuest(const int var, const XmlNodePtr node) delete quest; return; } - quest->incomplete = splitToIntSet(incompleteStr, ','); - quest->complete = splitToIntSet(completeStr, ','); + splitToIntSet(quest->incomplete, incompleteStr, ','); + splitToIntSet(quest->complete, completeStr, ','); if (quest->incomplete.empty() && quest->complete.empty()) { logger->log("complete flags incorrect"); @@ -297,7 +297,7 @@ void QuestsWindow::loadEffect(const int var, const XmlNodePtr node) effect->id = XML::getProperty(node, "npc", -1); effect->effectId = XML::getProperty(node, "effect", -1); const std::string values = XML::getProperty(node, "value", ""); - effect->values = splitToIntSet(values, ','); + splitToIntSet(effect->values, values, ','); if (effect->map.empty() || effect->id == -1 || effect->effectId == -1 || values.empty()) |