version 1.5 | | version 1.6 |
---|
| | |
/* | | /* |
* static char *rcsid_quest_c = | | * static char *rcsid_quest_c = |
* "$Id: quest.c,v 1.5 2005/10/13 07:22:43 mwedel Exp $"; | | * "$Id: quest.c,v 1.6 2006/02/09 00:48:36 akirschbaum Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
} | | } |
#endif | | #endif |
| | |
int quest_is_quest_marker( object* marker, int task ) | | int quest_is_quest_marker( const object* marker, int task ) |
{ | | { |
if ( marker->type != QUEST ) | | if ( marker->type != QUEST ) |
return 0; | | return 0; |
| | |
return 1; | | return 1; |
} | | } |
| | |
int quest_is_in_progress( object* marker, int task ) | | int quest_is_in_progress( const object* marker, int task ) |
{ | | { |
if ( marker->subtype != QUEST_IN_PROGRESS ) | | if ( marker->subtype != QUEST_IN_PROGRESS ) |
return 0; | | return 0; |
return 1; | | return 1; |
} | | } |
| | |
int quest_is_completed( object* marker, int task ) | | int quest_is_completed( const object* marker, int task ) |
{ | | { |
if ( marker->type != QUEST ) | | if ( marker->type != QUEST ) |
return 0; | | return 0; |
| | |
} | | } |
#endif | | #endif |
| | |
const char* quest_get_name( object* marker ) | | const char* quest_get_name( const object* marker ) |
{ | | { |
if ( marker->type != QUEST ) | | if ( marker->type != QUEST ) |
return NULL; | | return NULL; |
| | |
return QUEST_NAME(marker); | | return QUEST_NAME(marker); |
} | | } |
| | |
object* quest_get_player_quest( object* pl, const char* name, const char* name_pl ) | | object* quest_get_player_quest( const object* pl, const char* name, const char* name_pl ) |
{ | | { |
object* quest; | | object* quest; |
for ( quest = pl->inv; quest; quest = quest->below ) | | for ( quest = pl->inv; quest; quest = quest->below ) |
| | |
return NULL; | | return NULL; |
} | | } |
| | |
object* quest_get_override( object* ob, object* pl ) | | object* quest_get_override( const object* ob, const object* pl ) |
{ | | { |
object *in_ob, *in_pl; | | object *in_ob, *in_pl; |
if ( !ob->inv ) | | if ( !ob->inv ) |
| | |
return NULL; | | return NULL; |
} | | } |
| | |
const char* quest_get_override_slaying( object* ob, object* pl ) | | const char* quest_get_override_slaying( const object* ob, const object* pl ) |
{ | | { |
object* quest; | | object* quest; |
quest = quest_get_override( ob, pl ); | | quest = quest_get_override( ob, pl ); |
| | |
return ob->slaying; | | return ob->slaying; |
} | | } |
| | |
const char* quest_get_override_msg( object* ob, object* pl ) | | const char* quest_get_override_msg( const object* ob, const object* pl ) |
{ | | { |
object* quest; | | object* quest; |
quest = quest_get_override( ob, pl ); | | quest = quest_get_override( ob, pl ); |
| | |
#define QCT_QSD 7 | | #define QCT_QSD 7 |
#define QCT_QD 8 | | #define QCT_QD 8 |
| | |
int quest_is_override_compatible(object *marker, object* pl) | | int quest_is_override_compatible(const object *marker, const object* pl) |
{ | | { |
object* test; | | object* test; |
if ( marker->type != QUEST || marker->subtype != QUEST_OVERRIDE ) | | if ( marker->type != QUEST || marker->subtype != QUEST_OVERRIDE ) |