version 1.62 | | version 1.63 |
---|
| | |
/* | | /* |
* static char *rcsid_living_c = | | * static char *rcsid_living_c = |
* "$Id: living.c,v 1.62 2004/04/06 07:05:06 mwedel Exp $"; | | * "$Id: living.c,v 1.63 2004/04/10 07:27:56 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
*/ | | */ |
if (exp == 0) return; | | if (exp == 0) return; |
| | |
| | /* Monsters are easy - we just adjust their exp - we |
| | * don't adjust level, since in most cases it is unrelated to |
| | * the exp they have - the monsters exp represents what its |
| | * worth. |
| | */ |
| | if(op->type != PLAYER) { |
| | /* Sanity check */ |
| | if (!QUERY_FLAG(op, FLAG_ALIVE)) return; |
| | |
/* reset exp to max allowed value. We subtract from | | /* reset exp to max allowed value. We subtract from |
* MAX_EXPERIENCE to prevent overflows. If the player somehow has | | * MAX_EXPERIENCE to prevent overflows. If the player somehow has |
* more than max exp, just return. | | * more than max exp, just return. |
| | |
if (exp < 0) return; | | if (exp < 0) return; |
} | | } |
| | |
/* Monsters are easy - we just adjust their exp - we | | |
* don't adjust level, since in most cases it is unrelated to | | |
* the exp they have - the monsters exp represents what its | | |
* worth. | | |
*/ | | |
if(op->type != PLAYER) { | | |
/* Sanity check */ | | |
if (!QUERY_FLAG(op, FLAG_ALIVE)) return; | | |
op->stats.exp += exp; | | op->stats.exp += exp; |
} | | } |
else { /* Players only */ | | else { /* Players only */ |