From 7d014932d263c908529db8ad3d7b48a7ea01d0ec Mon Sep 17 00:00:00 2001 From: ai4rei Date: Mon, 31 Jan 2011 12:39:54 +0000 Subject: * Various accumulated cleanups and fixes. - Improved the compile speed for files which include common/socket.h on windows builds (related r10471). - Moved FIFOSIZE_SERVERLINK define from common/mmo.h to common/socket.h (since it is a server connection FIFO size setting). - Fixed script command 'areamobuseskill' canceling monster's skill cast before it determined it's new target, which could be 'none' (bugreport:3272, since r13897). - Added a protection against attempts to read an empty backup / write to a full backup in skill_dance_switch as per TODO from r11347. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14690 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/script.c') diff --git a/src/map/script.c b/src/map/script.c index f842b614a..5c87336c3 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -14635,9 +14635,6 @@ static int buildin_mobuseskill_sub(struct block_list *bl,va_list ap) if( md->class_ != mobid ) return 0; - if( md->ud.skilltimer != INVALID_TIMER ) // Cancel the casting skill. - unit_skillcastcancel(bl,0); - // 0:self, 1:target, 2:master, default:random switch( target ) { @@ -14650,6 +14647,9 @@ static int buildin_mobuseskill_sub(struct block_list *bl,va_list ap) if( !tbl ) return 0; + if( md->ud.skilltimer != INVALID_TIMER ) // Cancel the casting skill. + unit_skillcastcancel(bl,0); + if( skill_get_casttype(skillid) == CAST_GROUND ) unit_skilluse_pos2(&md->bl, tbl->x, tbl->y, skillid, skilllv, casttime, cancel); else -- cgit v1.2.3-70-g09d2