summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-11 14:21:09 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-11 14:21:09 +0000
commit3381a5ea9a482409d361f2b36d3aff7a72dcb0c2 (patch)
tree5d4adce5708fd808261c4c2ae3f60f963c70e162 /src/map/clif.c
parent6b820eae6a9b9944be8e7d2b179e9337a25306e9 (diff)
downloadhercules-3381a5ea9a482409d361f2b36d3aff7a72dcb0c2.tar.gz
hercules-3381a5ea9a482409d361f2b36d3aff7a72dcb0c2.tar.bz2
hercules-3381a5ea9a482409d361f2b36d3aff7a72dcb0c2.tar.xz
hercules-3381a5ea9a482409d361f2b36d3aff7a72dcb0c2.zip
- Some cleaning of the castend_map code to prevent the menuskill variable from not being cleared if you made a choice but the skill was not triggered (due to silence, stun or whatever).
- Cleaned up a bit the Charge Attack casttime equation, should prevent infinite casttime when the distance is 0. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10213 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 09b2d4623..8025f7014 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9889,22 +9889,21 @@ void clif_parse_UseSkillToPosMoreInfo(int fd, struct map_session_data *sd) {
*/
void clif_parse_UseSkillMap(int fd,struct map_session_data *sd)
{
+ int skill_num;
RFIFOHEAD(fd);
+ skill_num = RFIFOW(fd,2);
- if (clif_cant_act(sd))
+ if(skill_num != sd->menuskill_id)
return;
- if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS))
+ if (clif_cant_act(sd))
+ {
+ sd->menuskill_id = sd->menuskill_lv = 0;
return;
-
- if(sd->menuskill_id &&
- sd->menuskill_id != RFIFOW(fd,2) &&
- sd->menuskill_id != SA_AUTOSPELL)
- return; //Can't use skills while a menu is open.
+ }
pc_delinvincibletimer(sd);
-
- skill_castend_map(sd,RFIFOW(fd,2),(char*)RFIFOP(fd,4));
+ skill_castend_map(sd,skill_num,(char*)RFIFOP(fd,4));
}
/*==========================================
* ƒƒ‚—v‹