From 12e7c68c782442ed44ef69b529901d6d76d4e0b1 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 20 Nov 2006 18:02:08 +0000 Subject: [PATCH] - You now can't use other skills while a skill-induced "window" is up (teleport, refining, etc). However, be warned that we aren't quite sure how the server will clear this out if you decide to hit cancel on the window, so skill-blockage is likely to happen (temporary solution: whenever you change maps or warp the state is reset server-side). git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9276 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 5 +++++ src/map/skill.c | 5 ++++- src/map/skill.h | 1 + src/map/unit.c | 2 ++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 8a1f139acf..8b8eed076e 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,11 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. 2006/11/20 + * You now can't use other skills while a skill-induced "window" is up + (teleport, refining, etc). However, be warned that we aren't quite sure how + the server will clear this out if you decide to hit cancel on the window, + so skill-blockage is likely to happen (temporary solution: whenever you + change maps or warp the state is reset server-side). [Skotlex] * Fixed itemskill variable being cleared before parsing the skill, this causes auto-casted teleport to fail to skip the skill menu. It is now cleared on castend_pos/id directly. [Skotlex] diff --git a/src/map/skill.c b/src/map/skill.c index acef1a96db..610fc5790b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -852,6 +852,9 @@ int skillnotok (int skillid, struct map_session_data *sd) if (battle_config.gm_skilluncond && pc_isGM(sd) >= battle_config.gm_skilluncond) return 0; // gm's can do anything damn thing they want + if(sd->menuskill_id && skillid != sd->menuskill_id) + return 1; //Can't use skills while a menu is open. + // Check skill restrictions [Celest] if(!map_flag_vs(m) && skill_get_nocast (skillid) & 1) return 1; @@ -8309,7 +8312,7 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t case GD_BATTLEORDER: case GD_REGENERATION: case GD_RESTORE: - //Emergency Recall is handled on skill_notok + //Emergency Recall is handled on skillnotok if (!agit_flag) { clif_skill_fail(sd,skill,0,0); return 0; diff --git a/src/map/skill.h b/src/map/skill.h index 50781bfbd0..952448d74f 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -157,6 +157,7 @@ int skill_get_splash( int id , int lv ); int skill_get_hp( int id ,int lv ); int skill_get_mhp( int id ,int lv ); int skill_get_sp( int id ,int lv ); +int skill_get_state(int id); int skill_get_zeny( int id ,int lv ); int skill_get_num( int id ,int lv ); int skill_get_cast( int id ,int lv ); diff --git a/src/map/unit.c b/src/map/unit.c index 15571bc995..81aa1c3b94 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1620,6 +1620,8 @@ int unit_remove_map(struct block_list *bl, int clrtype) { guild_reply_invite(sd,sd->guild_invite,0); if(sd->guild_alliance>0) guild_reply_reqalliance(sd,sd->guild_alliance_account,0); + if(sd->menuskill_id) + sd->menuskill_id = sd->menuskill_lv = 0; pc_delinvincibletimer(sd);