Difference for server/attack.c from version 1.111 to 1.112


version 1.111 version 1.112
Line 1
 
Line 1
 /*  /*
  * static char *rcsid_attack_c =   * static char *rcsid_attack_c =
  *   "$Id: attack.c,v 1.111 2005/09/13 06:46:35 mwedel Exp $";   *   "$Id: attack.c,v 1.112 2005/09/24 09:28:05 ryo_saeba Exp $";
  */   */
 /*  /*
     CrossFire, A Multiplayer game for X-windows      CrossFire, A Multiplayer game for X-windows
Line 1579
 
Line 1579
  */   */
  if (battleg) exp = 0;   if (battleg) exp = 0;
   
  if(owner->type!=PLAYER || owner->contr->party_number<=0) {   if(owner->type!=PLAYER || owner->contr->party==NULL) {
      change_exp(owner,exp, skill, 0);       change_exp(owner,exp, skill, 0);
  }   }
  else {   else {
Line 1587
 
Line 1587
   
      player *pl;       player *pl;
   
      int no=owner->contr->party_number;       int no=owner->contr->party->partyid;
 #ifdef PARTY_KILL_LOG  #ifdef PARTY_KILL_LOG
      add_kill_to_party(no,query_name(owner),query_name(op),exp);       add_kill_to_party(no,query_name(owner),query_name(op),exp);
 #endif  #endif
      for(pl=first_player;pl!=NULL;pl=pl->next) {       for(pl=first_player;pl!=NULL;pl=pl->next) {
  if(pl->ob->contr->party_number==no && on_same_map(pl->ob, owner)) {   if(pl->ob->contr->party->partyid==no && on_same_map(pl->ob, owner)) {
      count++;       count++;
      shares+=(pl->ob->level+4);       shares+=(pl->ob->level+4);
  }   }
Line 1602
 
Line 1602
      else {       else {
  int share=exp/shares,given=0,nexp;   int share=exp/shares,given=0,nexp;
  for(pl=first_player;pl!=NULL;pl=pl->next) {   for(pl=first_player;pl!=NULL;pl=pl->next) {
      if(pl->ob->contr->party_number==no && on_same_map(pl->ob, owner)) {       if(pl->ob->contr->party->partyid==no && on_same_map(pl->ob, owner)) {
  nexp=(pl->ob->level+4)*share;   nexp=(pl->ob->level+4)*share;
  change_exp(pl->ob,nexp, skill, SK_EXP_TOTAL);   change_exp(pl->ob,nexp, skill, SK_EXP_TOTAL);
  given+=nexp;   given+=nexp;


Legend:
line(s) removed in v.1.111 
line(s) changed
 line(s) added in v.1.112

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