version 1.111 | | version 1.112 |
---|
| | |
/* | | /* |
* 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 |
| | |
*/ | | */ |
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 { |
| | |
| | |
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); |
} | | } |
| | |
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; |