ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/living.c
(Generate patch)

Comparing deliantra/server/common/living.c (file contents):
Revision 1.6 by elmex, Wed Mar 15 15:35:46 2006 UTC vs.
Revision 1.7 by root, Tue Mar 21 05:36:56 2006 UTC

1/* 1/*
2 * static char *rcsid_living_c = 2 * static char *rcsid_living_c =
3 * "$Id: living.c,v 1.6 2006/03/15 15:35:46 elmex Exp $"; 3 * "$Id: living.c,v 1.7 2006/03/21 05:36:56 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
1541 1541
1542 if (op != NULL && op == who && op->stats.exp > 1 && is_dragon_pl(who)) 1542 if (op != NULL && op == who && op->stats.exp > 1 && is_dragon_pl(who))
1543 dragon_level_gain(who); 1543 dragon_level_gain(who);
1544 1544
1545 /* Only roll these if it is the player (who) that gained the level */ 1545 /* Only roll these if it is the player (who) that gained the level */
1546 if(who && op==who && (who->level < 11) && who->type==PLAYER) { 1546 if(op==who && (who->level < 11) && who->type==PLAYER) {
1547 who->contr->levhp[who->level] = die_roll(2, 4, who, PREFER_HIGH)+1; 1547 who->contr->levhp[who->level] = die_roll(2, 4, who, PREFER_HIGH)+1;
1548 who->contr->levsp[who->level] = die_roll(2, 3, who, PREFER_HIGH); 1548 who->contr->levsp[who->level] = die_roll(2, 3, who, PREFER_HIGH);
1549 who->contr->levgrace[who->level]=die_roll(2, 2, who, PREFER_HIGH)-1; 1549 who->contr->levgrace[who->level]=die_roll(2, 2, who, PREFER_HIGH)-1;
1550 } 1550 }
1551 1551
1552 if(who) fix_player(who); 1552 fix_player(who);
1553 if(op->level>1) { 1553 if(op->level>1) {
1554 if (op->type!=PLAYER) 1554 if (op->type!=PLAYER)
1555 sprintf(buf,"You are now level %d in the %s skill.",op->level,op->name); 1555 sprintf(buf,"You are now level %d in the %s skill.",op->level,op->name);
1556 else 1556 else
1557 sprintf(buf,"You are now level %d.",op->level); 1557 sprintf(buf,"You are now level %d.",op->level);
1558 if(who) new_draw_info(NDI_UNIQUE|NDI_RED, 0, who,buf); 1558 if(who) new_draw_info(NDI_UNIQUE|NDI_RED, 0, who,buf);
1559 } 1559 }
1560 player_lvl_adj(who,op); /* To increase more levels */ 1560 player_lvl_adj(who,op); /* To increase more levels */
1561 } else if (op->level>1 && op->stats.exp<level_exp(op->level,who->expmul)) { 1561 } else if (op->level>1 && op->stats.exp<level_exp(op->level,who->expmul)) {
1562 op->level--; 1562 op->level--;
1563 if(who) fix_player(who); 1563 fix_player(who);
1564 if(op->type!=PLAYER) { 1564 if(op->type!=PLAYER) {
1565 sprintf(buf,"You are now level %d in the %s skill.",op->level,op->name); 1565 sprintf(buf,"You are now level %d in the %s skill.",op->level,op->name);
1566 if(who) new_draw_info(NDI_UNIQUE|NDI_RED, 0, who,buf); 1566 new_draw_info(NDI_UNIQUE|NDI_RED, 0, who,buf);
1567 } 1567 }
1568 player_lvl_adj(who,op); /* To decrease more levels */ 1568 player_lvl_adj(who,op); /* To decrease more levels */
1569 } 1569 }
1570 /* check if the spell data has changed */ 1570 /* check if the spell data has changed */
1571 esrv_update_spells(who->contr); 1571 esrv_update_spells(who->contr);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines