Difference for server/skills.c from version 1.39 to 1.40


version 1.39 version 1.40
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_skills_c =   * static char *rcsid_skills_c =
  *   "$Id: skills.c,v 1.39 2003/03/07 07:33:14 mwedel Exp $";   *   "$Id: skills.c,v 1.40 2003/06/26 11:27:43 gros Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 1122
 
Line 1122
 int write_note(object *pl, object *item, char *msg) {  int write_note(object *pl, object *item, char *msg) {
   char buf[BOOK_BUF];     char buf[BOOK_BUF];
   object *newBook = NULL;    object *newBook = NULL;
     event *evt;
   
   /* a pair of sanity checks */    /* a pair of sanity checks */
   if(!item||item->type!=BOOK) return 0;    if(!item||item->type!=BOOK) return 0;
Line 1137
 
Line 1138
  return 0;   return 0;
   }    }
   /* GROS: Handle for plugin book writing (trigger) event */    /* GROS: Handle for plugin book writing (trigger) event */
   if(item->event_hook[EVENT_TRIGGER] != NULL)    if ((evt = find_event(item, EVENT_TRIGGER)) != NULL)
   {    {
     CFParm CFP;      CFParm CFP;
     int k, l, m;      int k, l, m;
Line 1153
 
Line 1154
     CFP.Value[6] = &m;      CFP.Value[6] = &m;
     CFP.Value[7] = &m;      CFP.Value[7] = &m;
     CFP.Value[8] = &l;      CFP.Value[8] = &l;
     CFP.Value[9] = item->event_hook[k];      CFP.Value[9] = evt->hook;
     CFP.Value[10]= item->event_options[k];      CFP.Value[10]= evt->options;
     if (findPlugin(item->event_plugin[k])>=0)      if (findPlugin(evt->plugin)>=0)
     {      {
         ((PlugList[findPlugin(item->event_plugin[k])].eventfunc) (&CFP));          ((PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP));
         return strlen(msg);          return strlen(msg);
     }      }
    }     }
Line 1463
 
Line 1464
     tag_t left_tag;      tag_t left_tag;
     int eff_str = 0,maxc,str=op->stats.Str,dam=0;      int eff_str = 0,maxc,str=op->stats.Str,dam=0;
     int pause_f,weight_f=0;      int pause_f,weight_f=0;
       event *evt;
     float str_factor=1.0,load_factor=1.0,item_factor=1.0;      float str_factor=1.0,load_factor=1.0,item_factor=1.0;
   
     if(throw_ob==NULL) {      if(throw_ob==NULL) {
Line 1686
 
Line 1688
     play_sound_map(op->map, op->x, op->y, SOUND_THROW_OBJ);      play_sound_map(op->map, op->x, op->y, SOUND_THROW_OBJ);
 #endif  #endif
 /* GROS - Now we can call the associated script_throw event (if any) */  /* GROS - Now we can call the associated script_throw event (if any) */
     if(throw_ob->event_hook[EVENT_THROW] != NULL)      if ((evt = find_event(throw_ob, EVENT_THROW)) != NULL)
     {      {
         CFParm CFP;          CFParm CFP;
         int k, l, m;          int k, l, m;
Line 1702
 
Line 1704
         CFP.Value[6] = &m;          CFP.Value[6] = &m;
         CFP.Value[7] = &m;          CFP.Value[7] = &m;
         CFP.Value[8] = &l;          CFP.Value[8] = &l;
         CFP.Value[9] = throw_ob->event_hook[k];          CFP.Value[9] = evt->hook;
         CFP.Value[10]= throw_ob->event_options[k];          CFP.Value[10]= evt->options;
         if (findPlugin(throw_ob->event_plugin[k])>=0)          if (findPlugin(evt->plugin)>=0)
             ((PlugList[findPlugin(throw_ob->event_plugin[k])].eventfunc) (&CFP));              ((PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP));
     }      }
 #ifdef DEBUG_THROW  #ifdef DEBUG_THROW
     LOG(llevDebug," pause_f=%d \n",pause_f);      LOG(llevDebug," pause_f=%d \n",pause_f);


Legend:
line(s) removed in v.1.39 
line(s) changed
 line(s) added in v.1.40

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