summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-01-28 17:37:22 -0200
committershennetsind <ind@henn.et>2013-01-28 17:37:22 -0200
commit9f75e121fd20aaa20e337c8664ba9a57fe90fe21 (patch)
treee9ab1c0a067165a785e2db5f67ef8b46273cb031 /src/map/unit.c
parentc1e85710adac6f38eacd5b27b2236415abcfc237 (diff)
downloadhercules-9f75e121fd20aaa20e337c8664ba9a57fe90fe21.tar.gz
hercules-9f75e121fd20aaa20e337c8664ba9a57fe90fe21.tar.bz2
hercules-9f75e121fd20aaa20e337c8664ba9a57fe90fe21.tar.xz
hercules-9f75e121fd20aaa20e337c8664ba9a57fe90fe21.zip
Fixed Bug #4832
Fixed Ankle Snare to behave as in official servers, you only stop walking when you reach your destination and activates all other traps in the path. http://hercules.ws/board/tracker/issue-4832-hunter-ht-anklesnare-serious-bug/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 0104e9a42..5d2a6c794 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -890,8 +890,7 @@ int unit_is_walking(struct block_list *bl)
/*==========================================
* Determines if the bl can move based on status changes. [Skotlex]
*------------------------------------------*/
-int unit_can_move(struct block_list *bl)
-{
+int unit_can_move(struct block_list *bl) {
struct map_session_data *sd;
struct unit_data *ud;
struct status_change *sc;
@@ -931,6 +930,9 @@ int unit_can_move(struct block_list *bl)
sc->data[SC_CLOAKING]->val1 < 3 && !(sc->data[SC_CLOAKING]->val4&1))
)
return 0;
+
+ if( sc->data[SC_ANKLE] && !unit_is_walking(bl) ) // Ankle only stops you after you're done moving
+ return 0;
if (sc->opt1 > 0 && sc->opt1 != OPT1_STONEWAIT && sc->opt1 != OPT1_BURNING && (sc->opt1 != OPT1_CRYSTALIZE && bl->type != BL_MOB))
return 0;