summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-23 03:46:34 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-23 03:46:34 +0000
commit6550dccef376b5a100dd6019e3f4890436f76c25 (patch)
treebce04216a6070ccf23d2a671764764b19550dea7 /src/map/pc.c
parent49ebf878dfb1301fe86d490bab59811c0632e716 (diff)
downloadhercules-6550dccef376b5a100dd6019e3f4890436f76c25.tar.gz
hercules-6550dccef376b5a100dd6019e3f4890436f76c25.tar.bz2
hercules-6550dccef376b5a100dd6019e3f4890436f76c25.tar.xz
hercules-6550dccef376b5a100dd6019e3f4890436f76c25.zip
Fixed crash with using @allskills in a character without PC_PERM_ALL_SKILL also applied some more of my curly brace love
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15769 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index a81300b9e..138efc636 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1374,8 +1374,7 @@ int pc_calc_skilltree(struct map_session_data *sd)
f = 0; // job level requirement wasn't satisfied
}
- if( f )
- {
+ if( f ) {
inf2 = skill_get_inf2(id);
if(!sd->status.skill[id].lv && (
@@ -1384,11 +1383,14 @@ int pc_calc_skilltree(struct map_session_data *sd)
(inf2&INF2_SPIRIT_SKILL && !sd->sc.data[SC_SPIRIT])
))
continue; //Cannot be learned via normal means. Note this check DOES allows raising already known skills.
+
+ /* This thing is present in all skill trees (for whatever reason) and it crashes if gm w/o PC_PERM_ALL_SKILL uses @allskills */
+ if( id == ALL_BUYING_STORE )
+ continue;
sd->status.skill[id].id = id;
- if(inf2&INF2_SPIRIT_SKILL)
- { //Spirit skills cannot be learned, they will only show up on your tree when you get buffed.
+ if(inf2&INF2_SPIRIT_SKILL) { //Spirit skills cannot be learned, they will only show up on your tree when you get buffed.
sd->status.skill[id].lv = 1; // need to manually specify a skill level
sd->status.skill[id].flag = SKILL_FLAG_TEMPORARY; //So it is not saved, and tagged as a "bonus" skill.
}