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.1 by root, Fri Feb 3 07:11:32 2006 UTC vs.
Revision 1.2 by root, Fri Feb 3 07:25:25 2006 UTC

1/* 1/*
2 * static char *rcsid_living_c = 2 * static char *rcsid_living_c =
3 * "$Id: living.c,v 1.1 2006/02/03 07:11:32 root Exp $"; 3 * "$Id: living.c,v 1.2 2006/02/03 07:25:25 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
1824 sint64 loss_3l; /* 3 level experience loss */ 1824 sint64 loss_3l; /* 3 level experience loss */
1825 1825
1826 for(tmp=op->inv;tmp;tmp=tmp->below) 1826 for(tmp=op->inv;tmp;tmp=tmp->below)
1827 if(tmp->type==SKILL && tmp->stats.exp) { 1827 if(tmp->type==SKILL && tmp->stats.exp) {
1828 1828
1829 loss_20p = tmp->stats.exp * 0.20; 1829 loss_20p = tmp->stats.exp * 0.05;
1830 loss_3l = tmp->stats.exp - levels[MAX(0,tmp->level -3)]; 1830 loss_3l = tmp->stats.exp - levels[MAX(0,tmp->level -3)];
1831 1831
1832 /* With the revised exp system, you can get cases where 1832 /* With the revised exp system, you can get cases where
1833 * losing 3 levels would still require that you have more 1833 * losing 3 levels would still require that you have more
1834 * exp than you current have - this is true if the levels 1834 * exp than you current have - this is true if the levels
1840 1840
1841 tmp->stats.exp -= loss; 1841 tmp->stats.exp -= loss;
1842 player_lvl_adj(op,tmp); 1842 player_lvl_adj(op,tmp);
1843 } 1843 }
1844 1844
1845 loss_20p = op->stats.exp * 0.20; 1845 loss_20p = op->stats.exp * 0.05;
1846 loss_3l = op->stats.exp - levels[MAX(0,op->level -3)]; 1846 loss_3l = op->stats.exp - levels[MAX(0,op->level -3)];
1847 if (loss_3l < 0) loss_3l = 0; 1847 if (loss_3l < 0) loss_3l = 0;
1848 loss = check_exp_loss(op, MIN(loss_3l, loss_20p)); 1848 loss = check_exp_loss(op, MIN(loss_3l, loss_20p));
1849 1849
1850 op->stats.exp -= loss; 1850 op->stats.exp -= loss;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines