From 3485b41358dd85c763f30e32ce1e0621d867a861 Mon Sep 17 00:00:00 2001 From: ultramage Date: Fri, 26 Nov 2010 16:08:09 +0000 Subject: Reverted r14504, the old value is correct due to how the equation works. Fixed an ancient off-by-one mistake in the statpoint calc equation, details are in bugreport:4575. This will affect players with levels above 99, now giving them one stat point a level later. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14508 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 27ebf2e36..6c8b94485 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7915,7 +7915,6 @@ int pc_split_atoui(char* str, unsigned int* val, char sep, int max) int pc_readdb(void) { int i,j,k; - unsigned int stat; FILE *fp; char line[24000],*p; @@ -8106,7 +8105,6 @@ int pc_readdb(void) // スキルツリ? memset(statp,0,sizeof(statp)); i=1; - stat = 48; // base points sprintf(line, "%s/statpoint.txt", db_path); fp=fopen(line,"r"); if(fp == NULL){ @@ -8115,6 +8113,7 @@ int pc_readdb(void) } else { while(fgets(line, sizeof(line), fp)) { + int stat; if(line[0]=='/' && line[1]=='/') continue; if ((stat=strtoul(line,NULL,10))<0) @@ -8128,10 +8127,9 @@ int pc_readdb(void) ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","statpoint.txt"); } // generate the remaining parts of the db if necessary - for (; i <= MAX_LEVEL; i++) { - stat += (i+15)/5; - statp[i] = stat; - } + statp[0] = 45; // seed value + for (; i <= MAX_LEVEL; i++) + statp[i] = statp[i-1] + (i-1+15)/5; return 0; } -- cgit v1.2.3-70-g09d2