uint32_t missionId;
uint32_t toId;
if(readXMLInteger(stateNode, "id", intValue))
{
missionId = intValue;
if(readXMLInteger(stateNode, "toid", intValue1))
{
toId = intValue1;
}
else
{
toId = intValue;
}
}
else
{
std::cout << "[Warning - Quests::parseQuestNode] Missing missionId for mission state" << std::endl;
stateNode = stateNode->next;
continue;
}
std::string description;
if(readXMLString(stateNode, "description", strValue))
description = strValue;
for (int i = missionId; i <= toId; i++) {
std::string newdes = description;
if(description.find("|ID|") != std::string::npos) {
std::stringstream stm;
stm << i;
replaceString(newdes, "|ID|", stm.str());
}
mission->newState(i, newdes);
}