summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-22 04:59:21 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-22 04:59:21 +0000
commit3c28bcdb276c7edaebfa39db390c8d55652a8525 (patch)
tree14772dfee1a8efa11f32af0a385ef675de02c7ec /src/map/map.c
parentf1ab59626ff04306a8009c98566631d81d95c33b (diff)
downloadhercules-3c28bcdb276c7edaebfa39db390c8d55652a8525.tar.gz
hercules-3c28bcdb276c7edaebfa39db390c8d55652a8525.tar.bz2
hercules-3c28bcdb276c7edaebfa39db390c8d55652a8525.tar.xz
hercules-3c28bcdb276c7edaebfa39db390c8d55652a8525.zip
Fixed bugreport:5356 Shadow Shaser's Shadow Form. Skill now redirects damage properly and is removed upon either caster or target leaving skill range
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15755 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/map/map.c b/src/map/map.c
index d07db5eb5..30e766402 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -413,8 +413,19 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
#endif
if (bl->type&BL_CHAR) {
+
skill_unit_move(bl,tick,3);
sc = status_get_sc(bl);
+
+ if( bl->type == BL_PC && ((TBL_PC*)bl)->shadowform_id ) {//Shadow Form Target Moving
+ struct block_list *d_bl;
+ if( (d_bl = map_id2bl(((TBL_PC*)bl)->shadowform_id)) == NULL || bl->m != d_bl->m || !check_distance_bl(bl,d_bl,skill_get_range(SC_SHADOWFORM,1)) ) {
+ if( d_bl )
+ status_change_end(d_bl,SC__SHADOWFORM,INVALID_TIMER);
+ ((TBL_PC*)bl)->shadowform_id = 0;
+ }
+ }
+
if (sc && sc->count) {
if (sc->data[SC_DANCING])
skill_unit_move_unit_group(skill_id2group(sc->data[SC_DANCING]->val2), bl->m, x1-x0, y1-y0);
@@ -430,6 +441,12 @@ int map_moveblock(struct block_list *bl, int x1, int y1, unsigned int tick)
skill_unit_move_unit_group(skill_id2group(sc->data[SC_NEUTRALBARRIER_MASTER]->val2), bl->m, x1-x0, y1-y0);
else if (sc->data[SC_STEALTHFIELD_MASTER])
skill_unit_move_unit_group(skill_id2group(sc->data[SC_STEALTHFIELD_MASTER]->val2), bl->m, x1-x0, y1-y0);
+
+ if( sc->data[SC__SHADOWFORM] ) {//Shadow Form Caster Moving
+ struct block_list *d_bl;
+ if( (d_bl = map_id2bl(sc->data[SC__SHADOWFORM]->val2)) == NULL || bl->m != d_bl->m || !check_distance_bl(bl,d_bl,skill_get_range(SC_SHADOWFORM,1)) )
+ status_change_end(bl,SC__SHADOWFORM,INVALID_TIMER);
+ }
}
/* Guild Aura Moving */
if( bl->type == BL_PC && ((TBL_PC*)bl)->state.gmaster_flag ) {