summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
author(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-11 10:17:53 +0000
committer(no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-02-11 10:17:53 +0000
commitd4e895de213f20d1e66846b25afee77dd310a28a (patch)
tree7707ddfcc8b81808a36baab56f111f32396bd550 /src/map/pc.c
parent6cb7f24e8447fb5149f19bb8a04d902472b3bd4e (diff)
downloadhercules-d4e895de213f20d1e66846b25afee77dd310a28a.tar.gz
hercules-d4e895de213f20d1e66846b25afee77dd310a28a.tar.bz2
hercules-d4e895de213f20d1e66846b25afee77dd310a28a.tar.xz
hercules-d4e895de213f20d1e66846b25afee77dd310a28a.zip
* Reduced memory used for the skill_tree DB by 30+mb
* Added script commands isday and isnight * Updated Sharp Shooting, Ankle Snare, Magnum Break, Tiger Fist, Devotion, Soul Burn git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1072 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index e98df2a02..512a097ed 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -48,7 +48,7 @@ static int exp_table[14][MAX_LEVEL];
static char statp[255][7];
// h-files are for declarations, not for implementations... [Shinomori]
-struct skill_tree_entry skill_tree[3][MAX_PC_CLASS][100];
+struct skill_tree_entry skill_tree[3][25][MAX_SKILL_TREE];
// timer for night.day implementation
int day_timer_tid;
int night_timer_tid;
@@ -6843,7 +6843,12 @@ int pc_readdb(void)
s_class = pc_calc_base_job(atoi(split[0]));
i = s_class.job;
u = s_class.upper;
- for(j=0;skill_tree[u][i][j].id;j++);
+ // check for bounds [celest]
+ if (i > 25 || u > 3)
+ continue;
+ for(j = 0; skill_tree[u][i][j].id && j < MAX_SKILL_TREE; j++);
+ if (j == MAX_SKILL_TREE)
+ continue;
skill_tree[u][i][j].id=atoi(split[1]);
skill_tree[u][i][j].max=atoi(split[2]);