Skip to content

Commit

Permalink
Fixed Bug #4832
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
shennetsind committed Jan 28, 2013
1 parent c1e8571 commit 9f75e12
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions src/map/skill.c
Original file line number Diff line number Diff line change
Expand Up @@ -11445,8 +11445,10 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
const struct TimerData* td = tsc->data[type]?get_timer(tsc->data[type]->timer):NULL;
if( td )
sec = DIFF_TICK(td->tick, tick);
unit_movepos(bl, src->bl.x, src->bl.y, 0, 0);
clif_fixpos(bl);
if( sg->unit_id == UNT_MANHOLE ) {
unit_movepos(bl, src->bl.x, src->bl.y, 0, 0);
clif_fixpos(bl);
}
sg->val2 = bl->id;
} else
sec = 3000; //Couldn't trap it?
Expand Down
2 changes: 0 additions & 2 deletions src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,6 @@ void initChangeTables(void) {
StatusIconChangeTable[SC_HALLUCINATION] = SI_BLANK;

/* StatusChangeState (SCS_) NOMOVE */
StatusChangeStateTable[SC_ANKLE] |= SCS_NOMOVE;
StatusChangeStateTable[SC_AUTOCOUNTER] |= SCS_NOMOVE;
StatusChangeStateTable[SC_TRICKDEAD] |= SCS_NOMOVE;
StatusChangeStateTable[SC_BLADESTOP] |= SCS_NOMOVE;
Expand Down Expand Up @@ -8632,7 +8631,6 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_CONFUSION:
case SC_CLOSECONFINE:
case SC_CLOSECONFINE2:
case SC_ANKLE:
case SC_SPIDERWEB:
case SC_ELECTRICSHOCKER:
case SC_BITE:
Expand Down
6 changes: 4 additions & 2 deletions src/map/unit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9f75e12

Please sign in to comment.