Difference for server/c_misc.c from version 1.59 to 1.60


version 1.59 version 1.60
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_c_misc_c =   * static char *rcsid_c_misc_c =
  *   "$Id: c_misc.c,v 1.59 2005/05/29 17:35:54 tchize Exp $";   *   "$Id: c_misc.c,v 1.60 2005/07/14 16:21:33 ryo_saeba Exp $";
  */   */
   
 /*  /*
Line 1547
 
Line 1547
     new_draw_info(NDI_UNIQUE, 0, op, "Your pets have been killed.");      new_draw_info(NDI_UNIQUE, 0, op, "Your pets have been killed.");
     return 0;      return 0;
 }  }
   
   /**
    * Displays all non start/end tags for specified quest.
    **/
   static void display_quest_details( object* pl, object* quest )
       {
       object* item;
   
       new_draw_info_format( NDI_WHITE, 0, pl, "Quest: %s\n%s\n",
           quest_get_name( quest ),
           quest->lore ? quest->lore : "(no description available)" );
   
       for ( item = pl->inv; item; item = item->below )
           {
           if ( ( item != quest )
               && ( quest_is_quest_marker( item ) )
               && ( quest_is_same_quest( quest->slaying, item->slaying ) )
               && ( item->lore ) )
               {
               new_draw_info( NDI_WHITE, 0, pl, item->lore );
               new_draw_info( NDI_WHITE, 0, pl, "------\n" );
               }
           }
       }
   
   /**
    * Displays quest informations to player.
    * Acceptable parameters:
    *  * finished => finished quests only
    *  * <name> => only this particular quest, finished or not, with details
    *  * nothing => all current quests
    *
    * For current quests, will display either the lore of the non start tags,
    *  or the lore of start tag if no other tag.
    **/
   int command_quests( object *pl, char *params )
       {
       object* item;
   
       if ( params && !strcmp( params, "finished" ) )
           {
           new_draw_info( NDI_WHITE, 0, pl, "Completed quests:\n" );
           for ( item = pl->inv; item; item = item->below )
               {
               if ( quest_is_quest_marker( item ) && quest_is_end( item->slaying ) )
                   {
                   new_draw_info( NDI_WHITE, 0, pl, quest_get_name( item ) );
                   new_draw_info( NDI_WHITE, 0, pl, "\n" );
                   }
               }
           return 1;
           }
   
       if ( params )
           {
           for ( item = pl->inv; item; item = item->below )
               {
               if ( quest_is_quest_marker( item )
                   && strstr( quest_get_name( item ), params ) )
                   {
                   display_quest_details( pl, item );
                   }
               }
           return 1;
           }
   
       /* Display current quests */
       new_draw_info( NDI_WHITE, 0, pl, "Current quests:\n" );
       for ( item = pl->inv; item; item = item->below )
           {
           if ( quest_is_quest_marker( item )
               && quest_is_start( item->slaying ) )
               {
               new_draw_info( NDI_WHITE, 0, pl, quest_get_name( item ) );
               new_draw_info( NDI_WHITE, 0, pl, "\n" );
               }
           }
   
       return 1;
       }


Legend:
line(s) removed in v.1.59 
line(s) changed
 line(s) added in v.1.60

File made using version 1.98 of cvs2html by leaf at 2011-07-21 17:26