237 |
delete (*q).second; |
delete (*q).second; |
238 |
} |
} |
239 |
|
|
240 |
// check wether a given quest (step) is in progress |
// check wether a given quest (step) has been started |
241 |
bool quest::is_started (const std::string & id) |
bool quest::is_started (const std::string & id) |
242 |
{ |
{ |
243 |
const quest_part *part = get_part (id); |
const quest_part *part = get_part (id); |
245 |
return false; |
return false; |
246 |
} |
} |
247 |
|
|
248 |
// check wether a given quest (step) is in progress |
// check wether a given quest (step) has been completed |
249 |
bool quest::is_completed (const std::string & id) |
bool quest::is_completed (const std::string & id) |
250 |
{ |
{ |
251 |
const quest_part *part = get_part (id); |
const quest_part *part = get_part (id); |
354 |
if ((q = Quests.find (*i)) != Quests.end ()) |
if ((q = Quests.find (*i)) != Quests.end ()) |
355 |
part = (*q).second; |
part = (*q).second; |
356 |
else |
else |
357 |
fprintf (stderr, "*** quest::set_completed: quest '%s' no found!\n", (*i).c_str ()); |
fprintf (stderr, "*** quest::get_part: quest '%s' no found!\n", (*i).c_str ()); |
358 |
|
|
359 |
for (i = i++; i != result.end () && part != NULL; i++) |
for (i = i++; i != result.end () && part != NULL; i++) |
360 |
part = part->child (*i); |
part = part->child (*i); |