version 1.10 | | version 1.11 |
---|
| | |
/* | | /* |
* static char *rcsid_c_wiz_c = | | * static char *rcsid_c_wiz_c = |
* "$Id: c_wiz.c,v 1.10 2001/04/23 06:11:48 mwedel Exp $"; | | * "$Id: c_wiz.c,v 1.11 2001/05/29 04:41:53 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
{ | | { |
char buf[MAX_BUF]; | | char buf[MAX_BUF]; |
int i; | | int i; |
#ifdef ALLOW_SKILLS | | |
object *exp_ob,*skill; | | object *exp_ob,*skill; |
#endif | | |
player *pl; | | player *pl; |
| | |
if(params==NULL || sscanf(params, "%s %d", buf, &i)!=2) { | | if(params==NULL || sscanf(params, "%s %d", buf, &i)!=2) { |
| | |
* 2) added exp doesnt result in exp_ob->stats.exp>MAX_EXP_IN_OBJ | | * 2) added exp doesnt result in exp_ob->stats.exp>MAX_EXP_IN_OBJ |
*/ | | */ |
| | |
#ifdef ALLOW_SKILLS | | |
if((skill = pl->ob->chosen_skill) && ((exp_ob = pl->ob->chosen_skill->exp_obj) | | if((skill = pl->ob->chosen_skill) && ((exp_ob = pl->ob->chosen_skill->exp_obj) |
|| link_player_skill(pl->ob, skill))) { | | || link_player_skill(pl->ob, skill))) { |
i = check_dm_add_exp_to_obj(exp_ob,i); | | i = check_dm_add_exp_to_obj(exp_ob,i); |
| | |
new_draw_info(NDI_UNIQUE, 0,op,"Player has no associated skill readied."); | | new_draw_info(NDI_UNIQUE, 0,op,"Player has no associated skill readied."); |
return 1; | | return 1; |
} | | } |
#endif | | |
pl->ob->stats.exp += i; | | pl->ob->stats.exp += i; |
add_exp(pl->ob,0); | | add_exp(pl->ob,0); |
#ifndef REAL_WIZ | | #ifndef REAL_WIZ |