version 1.6 | | version 1.7 |
---|
| | |
/* | | /* |
* static char *rcsid_quest_c = | | * static char *rcsid_quest_c = |
* "$Id: quest.c,v 1.6 2006/02/09 00:48:36 akirschbaum Exp $"; | | * "$Id: quest.c,v 1.7 2006/04/06 21:18:34 tchize Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
case QUEST_START_QUEST: | | case QUEST_START_QUEST: |
if ( quest_get_player_quest( pl->ob, QUEST_NAME(item), NULL ) ) | | if ( quest_get_player_quest( pl->ob, QUEST_NAME(item), NULL ) ) |
return; | | return; |
qm = get_archetype("quest_in_progress"); | | qm = create_archetype("quest_in_progress"); |
FREE_AND_COPY(QUEST_NAME(qm), QUEST_NAME(item)); | | FREE_AND_COPY(QUEST_NAME(qm), QUEST_NAME(item)); |
if ( item->lore ) | | if ( item->lore ) |
{ | | { |
| | |
case QUEST_END_QUEST: | | case QUEST_END_QUEST: |
if ( !quest_get_player_quest( pl->ob, QUEST_NAME(item), NULL ) ) | | if ( !quest_get_player_quest( pl->ob, QUEST_NAME(item), NULL ) ) |
return; | | return; |
qm = get_archetype("quest_done_quest"); | | qm = create_archetype("quest_done_quest"); |
FREE_AND_COPY(QUEST_NAME(qm), QUEST_NAME(item)); | | FREE_AND_COPY(QUEST_NAME(qm), QUEST_NAME(item)); |
if ( item->lore ) | | if ( item->lore ) |
{ | | { |
| | |
case QUEST_START_TASK: | | case QUEST_START_TASK: |
if ( quest_get_player_quest( pl->ob, QUEST_NAME(item), TASK_NAME(item) ) ) | | if ( quest_get_player_quest( pl->ob, QUEST_NAME(item), TASK_NAME(item) ) ) |
return; | | return; |
qm = get_archetype("quest_in_progress"); | | qm = create_archetype("quest_in_progress"); |
FREE_AND_COPY(QUEST_NAME(qm), QUEST_NAME(item)); | | FREE_AND_COPY(QUEST_NAME(qm), QUEST_NAME(item)); |
FREE_AND_COPY(TASK_NAME(qm), TASK_NAME(item)); | | FREE_AND_COPY(TASK_NAME(qm), TASK_NAME(item)); |
if ( item->lore ) | | if ( item->lore ) |
| | |
case QUEST_END_TASK: | | case QUEST_END_TASK: |
if ( !quest_get_player_quest( pl->ob, QUEST_NAME(item), TASK_NAME(item) ) ) | | if ( !quest_get_player_quest( pl->ob, QUEST_NAME(item), TASK_NAME(item) ) ) |
return; | | return; |
qm = get_archetype("quest_done_task"); | | qm = create_archetype("quest_done_task"); |
FREE_AND_COPY(QUEST_NAME(qm), QUEST_NAME(item)); | | FREE_AND_COPY(QUEST_NAME(qm), QUEST_NAME(item)); |
FREE_AND_COPY(TASK_NAME(qm), TASK_NAME(item)); | | FREE_AND_COPY(TASK_NAME(qm), TASK_NAME(item)); |
if ( item->lore ) | | if ( item->lore ) |