diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-01-15 04:50:51 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-01-15 04:50:51 +0000 |
commit | c9a0b6b049054a60d0d43af1505e873c5b26a5a8 (patch) | |
tree | 003bf273706178d539ffe8375d14d1cf6b954a6e /src/map | |
parent | 1d02588929b3d2e8a28de5f57a4cb748f157a4ed (diff) | |
download | hercules-c9a0b6b049054a60d0d43af1505e873c5b26a5a8.tar.gz hercules-c9a0b6b049054a60d0d43af1505e873c5b26a5a8.tar.bz2 hercules-c9a0b6b049054a60d0d43af1505e873c5b26a5a8.tar.xz hercules-c9a0b6b049054a60d0d43af1505e873c5b26a5a8.zip |
Fixed gm_all_skill, bugreport:5239
Removed broken skills from skill tree, so @allskill doesn't give resource errors when gm_all_skill is enabled.
Increased maximum client packet size drop limit (was limiting gm_all_skill unnecessarily since the client doesn't crash with it)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15462 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pc.c | 44 |
1 files changed, 35 insertions, 9 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index d5b6b688e..b2f948180 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1282,10 +1282,31 @@ int pc_calc_skilltree(struct map_session_data *sd) } } - if( battle_config.gm_allskill > 0 && pc_isGM(sd) >= battle_config.gm_allskill ) - { - for( i = 0; i < MAX_SKILL; i++ ) - { + if( battle_config.gm_allskill > 0 && pc_isGM(sd) >= battle_config.gm_allskill ) { + for( i = 0; i < MAX_SKILL; i++ ) { + switch(i) { + /** + * Dummy skills must be added here otherwise they'll be displayed in the, + * skill tree and since they have no icons they'll give resource errors + **/ + case AB_DUPLELIGHT_MELEE: + case AB_DUPLELIGHT_MAGIC: + case WL_CHAINLIGHTNING_ATK: + case WL_TETRAVORTEX_FIRE: + case WL_TETRAVORTEX_WATER: + case WL_TETRAVORTEX_WIND: + case WL_TETRAVORTEX_GROUND: + case WL_SUMMON_ATK_FIRE: + case WL_SUMMON_ATK_WIND: + case WL_SUMMON_ATK_WATER: + case WL_SUMMON_ATK_GROUND: + case LG_OVERBRAND_BRANDISH: + case LG_OVERBRAND_PLUSATK: + case ALL_BUYING_STORE: + continue; + default: + break; + } if( skill_get_inf2(i)&(INF2_NPC_SKILL|INF2_GUILD_SKILL) ) continue; //Only skills you can't have are npc/guild ones if( skill_get_max(i) > 0 ) @@ -5509,12 +5530,17 @@ int pc_allskillup(struct map_session_data *sd) { //Get ALL skills except npc/guild ones. [Skotlex] //and except SG_DEVIL [Komurka] and MO_TRIPLEATTACK and RG_SNATCHER [ultramage] for(i=0;i<MAX_SKILL;i++){ - if(!(skill_get_inf2(i)&(INF2_NPC_SKILL|INF2_GUILD_SKILL)) && i!=SG_DEVIL && i!=MO_TRIPLEATTACK && i!=RG_SNATCHER) - sd->status.skill[i].lv=skill_get_max(i); //Nonexistant skills should return a max of 0 anyway. + switch( i ) { + case SG_DEVIL: + case MO_TRIPLEATTACK: + case RG_SNATCHER: + continue; + default: + if( !(skill_get_inf2(i)&(INF2_NPC_SKILL|INF2_GUILD_SKILL)) ) + sd->status.skill[i].lv=skill_get_max(i);//Nonexistant skills should return a max of 0 anyway. + } } - } - else - { + } else { int inf2; for(i=0;i < MAX_SKILL_TREE && (id=skill_tree[pc_class2idx(sd->status.class_)][i].id)>0;i++){ inf2 = skill_get_inf2(id); |