From 6550dccef376b5a100dd6019e3f4890436f76c25 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Fri, 23 Mar 2012 03:46:34 +0000 Subject: 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 --- src/map/pc.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') 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. } -- cgit v1.2.3-70-g09d2