Difference for server/monster.c from version 1.64 to 1.65


version 1.64 version 1.65
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_monster_c =   * static char *rcsid_monster_c =
  *    "$Id: monster.c,v 1.64 2003/06/19 06:52:49 mwedel Exp $";   *    "$Id: monster.c,v 1.65 2003/06/26 11:27:43 gros Exp $";
  */   */
   
 /*  /*
Line 1734
 
Line 1734
     CFParm CFP;      CFParm CFP;
     int k, l, m;      int k, l, m;
     char *cp, buf[MAX_BUF];      char *cp, buf[MAX_BUF];
       event *evt;
   
     /* Move this commone area up here - shouldn't cost much extra cpu      /* Move this commone area up here - shouldn't cost much extra cpu
      * time, and makes the function more readable */       * time, and makes the function more readable */
Line 1749
 
Line 1750
     CFP.Value[8] = &l;      CFP.Value[8] = &l;
   
     /* GROS: Handle for plugin say event */      /* GROS: Handle for plugin say event */
     if(npc->event_hook[EVENT_SAY] != NULL)      if ((evt = find_event(npc, EVENT_SAY))!=NULL)
     {      {
  CFP.Value[2] = npc;   CFP.Value[2] = npc;
  CFP.Value[3] = NULL;   CFP.Value[3] = NULL;
  CFP.Value[9] = npc->event_hook[k];   CFP.Value[9] = evt->hook;
  CFP.Value[10]= npc->event_options[k];   CFP.Value[10]= evt->options;
  if (findPlugin(npc->event_plugin[k])>=0)   if (findPlugin(evt->plugin)>=0)
  {   {
      ((PlugList[findPlugin(npc->event_plugin[k])].eventfunc) (&CFP));       ((PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP));
      return 0;       return 0;
  }   }
     }      }
Line 1765
 
Line 1766
     /* This allows the existence of "intelligent" weapons you can discuss with */      /* This allows the existence of "intelligent" weapons you can discuss with */
     for(cobj=npc->inv;cobj!=NULL; cobj = cobj->below)      for(cobj=npc->inv;cobj!=NULL; cobj = cobj->below)
     {      {
  if(cobj->event_hook[EVENT_SAY] != NULL)          if ((evt = find_event(cobj, EVENT_SAY)) != NULL)
  {   {
      CFP.Value[2] = cobj;       CFP.Value[2] = cobj;
      CFP.Value[3] = npc;       CFP.Value[3] = npc;
      CFP.Value[9] = cobj->event_hook[k];              CFP.Value[9] = evt->hook;
      CFP.Value[10]= cobj->event_options[k];              CFP.Value[10]= evt->options;
      if (findPlugin(cobj->event_plugin[k])>=0)              if (findPlugin(evt->plugin)>=0)
      {       {
  ((PlugList[findPlugin(cobj->event_plugin[k])].eventfunc) (&CFP));                  ((PlugList[findPlugin(evt->plugin)].eventfunc) (&CFP));
  return 0;   return 0;
      }       }
  }   }


Legend:
line(s) removed in v.1.64 
line(s) changed
 line(s) added in v.1.65

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