Difference for server/apply.c from version 1.158 to 1.159


version 1.158 version 1.159
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_apply_c =   * static char *rcsid_apply_c =
  *   "$Id: apply.c,v 1.158 2006/01/15 16:50:32 ryo_saeba Exp $";   *   "$Id: apply.c,v 1.159 2006/02/05 05:51:11 mwedel Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 2356
 
Line 2356
  *   *
  * Return value:   * Return value:
  *   0: player or monster can't apply objects of that type   *   0: player or monster can't apply objects of that type
  *   2: objects of that type can't be applied if not in inventory  
  *   1: has been applied, or there was an error applying the object   *   1: has been applied, or there was an error applying the object
    *   2: objects of that type can't be applied if not in inventory
  *   *
  * op is the object that is causing object to be applied, tmp is the object   * op is the object that is causing object to be applied, tmp is the object
  * being applied.   * being applied.
Line 2379
 
Line 2379
     }      }
   }    }
   
   /* monsters mustn't apply random chests, nor magic_mouths with a counter */  
   if (op->type != PLAYER && tmp->type == TREASURE)  
     return 0;  
   
     /* Lauwenmark: Handle for plugin apply event */      /* Lauwenmark: Handle for plugin apply event */
     if (execute_event(tmp, EVENT_APPLY,op,NULL,NULL,SCRIPT_FIX_ALL)!=0)      if (execute_event(tmp, EVENT_APPLY,op,NULL,NULL,SCRIPT_FIX_ALL)!=0)
         return 1;          return 1;
   switch (tmp->type)  
   {      switch (tmp->type) {
   
   case CF_HANDLE:    case CF_HANDLE:
     new_draw_info(NDI_UNIQUE, 0,op,"You turn the handle.");      new_draw_info(NDI_UNIQUE, 0,op,"You turn the handle.");
     play_sound_map(op->map, op->x, op->y, SOUND_TURN_HANDLE);      play_sound_map(op->map, op->x, op->y, SOUND_TURN_HANDLE);
Line 2471
 
Line 2469
     return 1;      return 1;
   
   case TREASURE:    case TREASURE:
        if (op->type == PLAYER) {
     apply_treasure (op, tmp);      apply_treasure (op, tmp);
     return 1;      return 1;
        } else {
    return 0;
        }
   
   case WEAPON:    case WEAPON:
   case ARMOUR:    case ARMOUR:
Line 2568
 
Line 2570
   case ITEM_TRANSFORMER:    case ITEM_TRANSFORMER:
     apply_item_transformer( op, tmp );      apply_item_transformer( op, tmp );
     return 1;      return 1;
   
   default:    default:
     return 0;      return 0;
   }    }


Legend:
line(s) removed in v.1.158 
line(s) changed
 line(s) added in v.1.159

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