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


version 1.59 version 1.60
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_gods_c =   * static char *rcsid_gods_c =
  *   "$Id: gods.c,v 1.59 2006/04/06 21:18:35 tchize Exp $";   *   "$Id: gods.c,v 1.60 2006/05/05 09:26:35 ryo_saeba Exp $";
  */   */
   
 /*  /*
Line 42
 
Line 42
 #include <sproto.h>  #include <sproto.h>
 #endif  #endif
   
   static int worship_forbids_use(object *op, object *exp_obj, uint32 flag, const char *string);
   static void stop_using_item(object *op, int type, int number);
   static void update_priest_flag (object *god, object *exp_ob, uint32 flag);
   static void god_intervention(object *op, object *god, object *skill);
   static int god_examines_priest (object *op, object *god);
   static int god_examines_item(object *god, object *item);
   static const char *get_god_for_race(const char *race);
   
 /**  /**
  * Returns the id of specified god.   * Returns the id of specified god.
  */   */
 int lookup_god_by_name(const char *name) {  static int lookup_god_by_name(const char *name) {
     int godnr=-1;      int godnr=-1;
     size_t nmlen = strlen(name);      size_t nmlen = strlen(name);
    
Line 552
 
Line 560
  * string is the string to print out.   * string is the string to print out.
  */   */
   
 int worship_forbids_use (object *op, object *exp_obj, uint32 flag, const char *string) {  static int worship_forbids_use (object *op, object *exp_obj, uint32 flag, const char *string) {
   
   if(QUERY_FLAG(&op->arch->clone,flag))    if(QUERY_FLAG(&op->arch->clone,flag))
     if(QUERY_FLAG(op,flag)!=QUERY_FLAG(exp_obj,flag)) {      if(QUERY_FLAG(op,flag)!=QUERY_FLAG(exp_obj,flag)) {
Line 570
 
Line 578
 /**  /**
  * Unapplies up to number worth of items of type   * Unapplies up to number worth of items of type
  */   */
 void stop_using_item ( object *op, int type, int number ) {  static void stop_using_item ( object *op, int type, int number ) {
   object *tmp;    object *tmp;
   
   for(tmp=op->inv;tmp&&number;tmp=tmp->below)    for(tmp=op->inv;tmp&&number;tmp=tmp->below)
Line 586
 
Line 594
  * already exist. For players only!   * already exist. For players only!
  */   */
   
 void update_priest_flag (object *god, object *exp_ob, uint32 flag) {  static void update_priest_flag (object *god, object *exp_ob, uint32 flag) {
       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))
Line 743
 
Line 751
  * called from pray_at_altar() currently.    * called from pray_at_altar() currently.
  */   */
   
 void god_intervention (object *op, object *god, object *skill)  static void god_intervention (object *op, object *god, object *skill)
 {  {
     treasure *tr;      treasure *tr;
   
Line 967
 
Line 975
  * All applied items are examined, if player is using more items of other gods,   * All applied items are examined, if player is using more items of other gods,
  * s/he loses experience in praying or general experience if no praying.   * s/he loses experience in praying or general experience if no praying.
  */   */
 int god_examines_priest (object *op, object *god) {  static int god_examines_priest (object *op, object *god) {
     int reaction=1;      int reaction=1;
     object *item=NULL, *skop;      object *item=NULL, *skop;
   
Line 1006
 
Line 1014
  * god, it can be bad...-b.t.   * god, it can be bad...-b.t.
  */   */
   
 int god_examines_item(object *god, object *item) {  static int god_examines_item(object *god, object *item) {
   char buf[MAX_BUF];    char buf[MAX_BUF];
   
   if(!god||!item) return 0;    if(!god||!item) return 0;
Line 1036
 
Line 1044
  * Straight calls lookup_god_by_name   * Straight calls lookup_god_by_name
  */   */
   
 int get_god(object *priest) {  static int get_god(object *priest) {
   int godnr=lookup_god_by_name(determine_god(priest));     int godnr=lookup_god_by_name(determine_god(priest));
   
   return godnr;    return godnr;
Line 1047
 
Line 1055
  * creature of who has race *race   * creature of who has race *race
  * if we can't find a god that is appropriate, we return NULL   * if we can't find a god that is appropriate, we return NULL
  */   */
 const char *get_god_for_race(const char *race) {  static const char *get_god_for_race(const char *race) {
     godlink *gl=first_god;      godlink *gl=first_god;
     const char *godname=NULL;      const char *godname=NULL;
   


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:32