From a65e4681cd29db1d0936523cc8ff5646dc7dca5b Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 22 Dec 2006 14:19:39 +0000 Subject: - Added support for the new "make new char" packet that has the rename button data. Thanks to Sara-chan for the format change update. - Fixed itemdb.c sql compilation - Now when you specify a max level beyond what the exp table has, the last entry of the exp table will be duplicated to fill in the remaining levels. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9558 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 5fdb19378..9aefa3f08 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7314,7 +7314,12 @@ int pc_readdb(void) max_level[job][type]--; if (max_level[job][type] < max) { ShowWarning("pc_readdb: Specified max %d for job %d, but that job's exp table only goes up to level %d.\n", max, job, max_level[job][type]); - ShowNotice("(You may still reach lv %d through scripts/gm-commands)\n", max); + ShowInfo("Filling the missing values with the last exp entry.\n"); + //Fill the requested values with the last entry. + i = max_level[job][type]-2; + if (i < 0) i = 0; + for (; i < max-2; i++) + exp_table[job][type][i] = exp_table[job][type][i-1]; max_level[job][type] = max; } // ShowDebug("%s - Class %d: %d\n", type?"Job":"Base", job, max_level[job][type]); -- cgit v1.2.3-70-g09d2