/[adonthell]/adonthell/src/rpg/quest.cc
ViewVC logotype

Diff of /adonthell/src/rpg/quest.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by ksterker, Mon Oct 18 07:40:23 2004 UTC revision 1.4 by ksterker, Mon Nov 15 08:54:33 2004 UTC
# Line 237  void quest::cleanup () Line 237  void quest::cleanup ()
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);
# Line 245  bool quest::is_started (const std::strin Line 245  bool quest::is_started (const std::strin
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);
# Line 354  const quest_part* quest::get_part (const Line 354  const quest_part* quest::get_part (const
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);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26