summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-29 14:21:09 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-29 14:21:09 +0000
commit756fadf08a839aceba87198136e4dd096cf9a349 (patch)
treedc01244752e011e79efd7716a2c8451f6a3cea60 /src/map/unit.c
parent3583c98573c0f94546d149786333f9cc7043ff77 (diff)
downloadhercules-756fadf08a839aceba87198136e4dd096cf9a349.tar.gz
hercules-756fadf08a839aceba87198136e4dd096cf9a349.tar.bz2
hercules-756fadf08a839aceba87198136e4dd096cf9a349.tar.xz
hercules-756fadf08a839aceba87198136e4dd096cf9a349.zip
- Skill use is now cancelled when you use it while cloaking, and the uncloaking process warps you.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9591 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 4997f13b2..213168682 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -988,7 +988,10 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int
if(sc && sc->data[SC_CLOAKING].timer != -1 &&
!(sc->data[SC_CLOAKING].val4&4) && skill_num != AS_CLOAKING)
+ {
status_change_end(src,SC_CLOAKING,-1);
+ if (!src->prev) return 0; //Warped away!
+ }
if(casttime > 0) {
ud->skilltimer = add_timer( tick+casttime, skill_castend_id, src->id, 0 );
@@ -1088,7 +1091,10 @@ int unit_skilluse_pos2( struct block_list *src, int skill_x, int skill_y, int sk
if (sc && sc->data[SC_CLOAKING].timer != -1 &&
!(sc->data[SC_CLOAKING].val4&4))
+ {
status_change_end(src,SC_CLOAKING,-1);
+ if (!src->prev) return 0; //Warped away!
+ }
if(casttime > 0) {
ud->skilltimer = add_timer( tick+casttime, skill_castend_pos, src->id, 0 );