summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-22 14:19:39 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-22 14:19:39 +0000
commita65e4681cd29db1d0936523cc8ff5646dc7dca5b (patch)
tree11f6e3b19a7a829252caa983e62a2ad4c19baf02 /src/map
parent34f200c644ba8598448e20f4aa69a504e55d3c8f (diff)
downloadhercules-a65e4681cd29db1d0936523cc8ff5646dc7dca5b.tar.gz
hercules-a65e4681cd29db1d0936523cc8ff5646dc7dca5b.tar.bz2
hercules-a65e4681cd29db1d0936523cc8ff5646dc7dca5b.tar.xz
hercules-a65e4681cd29db1d0936523cc8ff5646dc7dca5b.zip
- 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
Diffstat (limited to 'src/map')
-rw-r--r--src/map/itemdb.c12
-rw-r--r--src/map/pc.c7
2 files changed, 12 insertions, 7 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 68a61724f..63aaa0bcf 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -954,10 +954,10 @@ static int itemdb_read_sqldb(void)
script_free_code(id->script);
if (sql_row[19] != NULL) {
if (sql_row[19][0] == '{')
- id->script = parse_script((unsigned char *) sql_row[19],item_db_name[i], 0);
+ id->script = parse_script((unsigned char *) sql_row[19],item_db_name[i], ln, 0);
else {
sprintf(script, "{%s}", sql_row[19]);
- id->script = parse_script((unsigned char *) script, item_db_name[i], 0);
+ id->script = parse_script((unsigned char *) script, item_db_name[i], ln, 0);
}
} else id->script = NULL;
@@ -965,10 +965,10 @@ static int itemdb_read_sqldb(void)
script_free_code(id->equip_script);
if (sql_row[20] != NULL) {
if (sql_row[20][0] == '{')
- id->equip_script = parse_script((unsigned char *) sql_row[20], item_db_name[i], 0);
+ id->equip_script = parse_script((unsigned char *) sql_row[20], item_db_name[i], ln, 0);
else {
sprintf(script, "{%s}", sql_row[20]);
- id->equip_script = parse_script((unsigned char *) script, item_db_name[i], 0);
+ id->equip_script = parse_script((unsigned char *) script, item_db_name[i], ln, 0);
}
} else id->equip_script = NULL;
@@ -976,10 +976,10 @@ static int itemdb_read_sqldb(void)
script_free_code(id->unequip_script);
if (sql_row[21] != NULL) {
if (sql_row[21][0] == '{')
- id->unequip_script = parse_script((unsigned char *) sql_row[21],item_db_name[i], 0);
+ id->unequip_script = parse_script((unsigned char *) sql_row[21],item_db_name[i], ln, 0);
else {
sprintf(script, "{%s}", sql_row[21]);
- id->unequip_script = parse_script((unsigned char *) script, item_db_name[i], 0);
+ id->unequip_script = parse_script((unsigned char *) script, item_db_name[i], ln, 0);
}
} else id->unequip_script = NULL;
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]);