From 1937bbe4b5f6109968393c52fa7d917bdc70038b Mon Sep 17 00:00:00 2001 From: celest Date: Fri, 18 Feb 2005 14:00:56 +0000 Subject: Fixed a bug with statpoint.txt reading and giving too much stat points git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1133 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-SVN.txt | 2 ++ src/map/pc.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt index 1e6b833dc..0b71a6812 100644 --- a/Changelog-SVN.txt +++ b/Changelog-SVN.txt @@ -1,6 +1,8 @@ Date Added 02/18 + * Fixed a bug with statpoint.txt reading and giving too much stat points, + thanks to Benz / eAthenaC [celest] * Fixed client errors when pecopeco Lord Knights/Paladins log in with a weapon equipped [celest] * Added bAddRace2 -- check item_bonus.txt [celest] diff --git a/src/map/pc.c b/src/map/pc.c index cd2d9bb64..eac66bb97 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7065,7 +7065,7 @@ int pc_readdb(void) // スキルツリ? memset(statp,0,sizeof(statp)); - i=0; + i=1; j=45; // base points fp=fopen("db/statpoint.txt","r"); if(fp == NULL){ @@ -7077,6 +7077,8 @@ int pc_readdb(void) continue; if ((j=atoi(line))<0) j=0; + if (i >= MAX_LEVEL) + break; statp[i]=j; i++; } -- cgit v1.2.3-70-g09d2