summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-13 02:34:19 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-02-13 02:34:19 +0000
commit462927e702cf7254e08dcc935beed0fa16fa203f (patch)
treee3f4edb846e0a27e539abea15978e3dbcbfe4bc4 /src/map/map.c
parent293b6db260480627d08bc4465af88e01b0b4edcf (diff)
downloadhercules-462927e702cf7254e08dcc935beed0fa16fa203f.tar.gz
hercules-462927e702cf7254e08dcc935beed0fa16fa203f.tar.bz2
hercules-462927e702cf7254e08dcc935beed0fa16fa203f.tar.xz
hercules-462927e702cf7254e08dcc935beed0fa16fa203f.zip
- Added handling of type BL_PET to skill_unitgrouptickset_search. I know pets normally aren't affected by skills, but their structure already had support for this, so....
- Rewrote/simplified functions skill_addtimerskill/skill_cleartimerskill - Fixed SC_DANCING for non players (was making dances only last 1 second for them) - Modified map_moveblock to handle calls to skill_unit_move_unit_group and cancelling of Close Confine effects, removed these checks from the walk functions and skill_blown functions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5262 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/map/map.c b/src/map/map.c
index e1d97b0de..df3302313 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -501,7 +501,6 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) {
//TODO: Perhaps some outs of bounds checking should be placed here?
if (bl->type&BL_CHAR)
skill_unit_move(bl,tick,2);
-
if (moveblock) map_delblock_sub(bl,0);
#ifdef CELL_NOSTACK
else map_delblcell(bl);
@@ -512,8 +511,26 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick) {
#ifdef CELL_NOSTACK
else map_addblcell(bl);
#endif
- if (bl->type&BL_CHAR)
+ if (bl->type&BL_CHAR) {
+ struct status_change *sc = status_get_sc(bl);
skill_unit_move(bl,tick,3);
+ if (sc) {
+ if (sc->option&OPTION_CLOAK)
+ skill_check_cloaking(bl);
+ if (sc->count) {
+ if (sc->data[SC_DANCING].timer != -1) {
+ if (sc->data[SC_DANCING].val1 == CG_MOONLIT) //Cancel Moonlight Petals if moved from casting position. [Skotlex]
+ skill_stop_dancing(bl);
+ else
+ skill_unit_move_unit_group((struct skill_unit_group *)sc->data[SC_DANCING].val2, bl->m, x1-x0, y1-y0);
+ }
+ if (sc->data[SC_CLOSECONFINE].timer != -1)
+ status_change_end(bl, SC_CLOSECONFINE, -1);
+ if (sc->data[SC_CLOSECONFINE2].timer != -1)
+ status_change_end(bl, SC_CLOSECONFINE2, -1);
+ }
+ }
+ }
return 0;
}