From a496d2693dd3727a8e3991b05fe57601e44b48b1 Mon Sep 17 00:00:00 2001 From: sketchyphoenix Date: Sat, 21 Jun 2008 22:01:37 +0000 Subject: Fixed a not-so-well implemented basilica fix that was reverted in 12869. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12872 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/unit.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/map/unit.c b/src/map/unit.c index 06a0a07bf..715bb11e4 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -218,13 +218,19 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr data) else i = status_get_speed(bl); + if (map_getcell(bl->m,x,y,CELL_CHKBASILICA)) { + skill_blown(bl,bl,2,unit_getdir(bl),0); + clif_fixpos(bl); + } + if(i > 0) ud->walktimer = add_timer(tick+i,unit_walktoxy_timer,id,i); else if(ud->state.running) { //Keep trying to run. if (!unit_run(bl)) ud->state.running = 0; - } else if (ud->target) { + } + else if (ud->target) { //Update target trajectory. struct block_list *tbl = map_id2bl(ud->target); if (!tbl || !status_check_visibility(bl, tbl)) { //Cancel chase. @@ -246,7 +252,8 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr data) unit_walktobl(bl, tbl, ud->chaserange, ud->state.walk_easy|(ud->state.attack_continue?2:0)); return 0; } - } else { //Stopped walking. Update to_x and to_y to current location [Skotlex] + } + else { //Stopped walking. Update to_x and to_y to current location [Skotlex] ud->to_x = bl->x; ud->to_y = bl->y; if(md && md->nd) // Tell the script engine we've finished walking (for AI pathfinding) -- cgit v1.2.3-70-g09d2