summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-26 20:21:56 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-03-26 20:21:56 +0000
commit6f618da64a31933954f3f5cbe8b3608d16681ed1 (patch)
tree7988eabfe90c65ec567d27c35127389954f97c8c /src/map/clif.c
parent7663ec43d2d64f7690e70f49cf66765b9a41f11e (diff)
downloadhercules-6f618da64a31933954f3f5cbe8b3608d16681ed1.tar.gz
hercules-6f618da64a31933954f3f5cbe8b3608d16681ed1.tar.bz2
hercules-6f618da64a31933954f3f5cbe8b3608d16681ed1.tar.xz
hercules-6f618da64a31933954f3f5cbe8b3608d16681ed1.zip
- Cleaned up some the mob skill use code. The skill re-use delay is set at the time the skill is used rather than when it finishes casting. The invalid target check was also moved to the mob skill db reading function.
- Skills can be used now when the autoskill menu is open (since there's no packet sent by the client when you hit on cancel) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10074 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index a06857834..b2d70f55e 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9670,6 +9670,7 @@ void clif_parse_UseSkillToId(int fd, struct map_session_data *sd) {
if (sd->menuskill_id == SA_TAMINGMONSTER)
sd->menuskill_id = sd->menuskill_lv = 0; //Cancel pet capture.
else
+ if (sd->menuskill_id != SA_AUTOSPELL)
return; //Can't use skills while a menu is open.
}
if (sd->skillitem == skillnum) {
@@ -9774,6 +9775,7 @@ void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, int skilll
if (sd->menuskill_id == SA_TAMINGMONSTER)
sd->menuskill_id = sd->menuskill_lv = 0; //Cancel pet capture.
else
+ if (sd->menuskill_id != SA_AUTOSPELL)
return; //Can't use skills while a menu is open.
}
@@ -9841,7 +9843,9 @@ void clif_parse_UseSkillMap(int fd,struct map_session_data *sd)
if(sd->sc.option&(OPTION_WEDDING|OPTION_XMAS))
return;
- if(sd->menuskill_id && sd->menuskill_id != RFIFOW(fd,2))
+ 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);