version 1.20 | | version 1.21 |
---|
| | |
/* | | /* |
* static char *rcsid_gods_c = | | * static char *rcsid_gods_c = |
* "$Id: gods.c,v 1.20 2001/05/29 04:41:53 mwedel Exp $"; | | * "$Id: gods.c,v 1.21 2001/06/13 10:51:37 michtoen Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
| | |
void pray_at_altar(object *pl, object *altar) { | | void pray_at_altar(object *pl, object *altar) { |
object *pl_god=find_god(determine_god(pl)); | | object *pl_god=find_god(determine_god(pl)); |
| | int return_pray_script; /* GROS : This is for return value of script */ |
| | |
| | /* GROS: We trigger a script-apply event for the altar each time you pray on it */ |
| | if (altar->script_apply != NULL) |
| | { |
| | return_pray_script = guile_call_event(pl, altar, NULL, 0, NULL,0,0,altar->script_apply,SCRIPT_FIX_ALL); |
| | if (return_pray_script) return; |
| | } |
| | else |
| | { |
| | if (altar->script_str_apply != NULL) |
| | { |
| | return_pray_script = guile_call_event_str(pl, altar, NULL, 0, NULL,0,0,altar->script_str_apply,SCRIPT_FIX_ALL); |
| | if (return_pray_script) return; |
| | }; |
| | }; |
| | |
/* If non consecrate altar, don't do anything */ | | /* If non consecrate altar, don't do anything */ |
if (!altar->other_arch) return; | | if (!altar->other_arch) return; |
| | |
*/ | | */ |
| | |
void update_priest_flag (object *god, object *exp_ob, uint32 flag) { | | void update_priest_flag (object *god, object *exp_ob, uint32 flag) { |
| | /* GROS - Corrected here the 'god flowers' bug. */ |
if(QUERY_FLAG(god,flag)&&!QUERY_FLAG(exp_ob,flag)) | | if(QUERY_FLAG(god,flag)&&!QUERY_FLAG(exp_ob,flag)) |
SET_FLAG(exp_ob,flag); | | SET_FLAG(exp_ob,flag); |
else if(QUERY_FLAG(exp_ob,flag)&&!QUERY_FLAG(god,flag)) | | else if(QUERY_FLAG(exp_ob,flag)&&!QUERY_FLAG(god,flag)) |
| | { |
| | if (!(QUERY_FLAG(&(exp_ob->arch->clone),flag))) |
CLEAR_FLAG(exp_ob,flag); | | CLEAR_FLAG(exp_ob,flag); |
| | }; |
} | | } |
| | |
| | |
| | |
*/ | | */ |
if(op->type==PLAYER) { | | if(op->type==PLAYER) { |
object *tmp; | | object *tmp; |
| | for (tmp=op->inv; tmp!=NULL; tmp=tmp->below) |
for (tmp=op->inv; tmp!=NULL; tmp=tmp->below) { | | { |
| | if (tmp->type == SKILL) /* GROS: This is for the flower's bug */ |
| | { |
if (tmp->exp_obj && tmp->exp_obj->title) | | if (tmp->exp_obj && tmp->exp_obj->title) |
return tmp->exp_obj->title; | | return tmp->exp_obj->title; |
} | | } |
} | | } |
| | |
| | } |
| | |
return ("none"); | | return ("none"); |
} | | } |
| | |