version 1.67 | | version 1.68 |
---|
| | |
/* | | /* |
* static char *rcsid_living_c = | | * static char *rcsid_living_c = |
* "$Id: living.c,v 1.67 2005/03/22 21:44:43 akirschbaum Exp $"; | | * "$Id: living.c,v 1.68 2005/05/03 18:31:05 ryo_saeba Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
* We return the skill - this makes it easier for calling functions that | | * We return the skill - this makes it easier for calling functions that |
* want to do something with it immediately. | | * want to do something with it immediately. |
*/ | | */ |
object *give_skill_by_name(object *op, char *skill_name) | | object *give_skill_by_name(object *op, const char *skill_name) |
{ | | { |
object *skill_obj; | | object *skill_obj; |
| | |
| | |
* flag is what to do if the player doesn't have the skill: | | * flag is what to do if the player doesn't have the skill: |
*/ | | */ |
| | |
static void add_player_exp(object *op, sint64 exp, char *skill_name, int flag) | | static void add_player_exp(object *op, sint64 exp, const char *skill_name, int flag) |
{ | | { |
object *skill_obj=NULL; | | object *skill_obj=NULL; |
sint64 limit, exp_to_add; | | sint64 limit, exp_to_add; |
| | |
* exp is the amount of exp to subtract - thus, it should be | | * exp is the amount of exp to subtract - thus, it should be |
* a postive number. | | * a postive number. |
*/ | | */ |
static void subtract_player_exp(object *op, sint64 exp, char *skill, int flag) | | static void subtract_player_exp(object *op, sint64 exp, const char *skill, int flag) |
{ | | { |
float fraction = (float) exp/(float) op->stats.exp; | | float fraction = (float) exp/(float) op->stats.exp; |
object *tmp; | | object *tmp; |
| | |
* these last two values are only used for players. | | * these last two values are only used for players. |
*/ | | */ |
| | |
void change_exp(object *op, sint64 exp, char *skill_name, int flag) { | | void change_exp(object *op, sint64 exp, const char *skill_name, int flag) { |
| | |
#ifdef EXP_DEBUG | | #ifdef EXP_DEBUG |
#ifndef WIN32 | | #ifndef WIN32 |