diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-11-26 16:08:09 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-11-26 16:08:09 +0000 |
commit | 3485b41358dd85c763f30e32ce1e0621d867a861 (patch) | |
tree | f45edfa3fa79c317b61a1c035603f946a3ae3a68 /src | |
parent | bcb429dd6c87d5069b8c0b4c4c8f18f05303380f (diff) | |
download | hercules-3485b41358dd85c763f30e32ce1e0621d867a861.tar.gz hercules-3485b41358dd85c763f30e32ce1e0621d867a861.tar.bz2 hercules-3485b41358dd85c763f30e32ce1e0621d867a861.tar.xz hercules-3485b41358dd85c763f30e32ce1e0621d867a861.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pc.c | 10 |
1 files changed, 4 insertions, 6 deletions
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; } |