- Modified the Asura code (again), hopefully movement sprite issues are fixed now

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8793 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-09-18 15:09:30 +00:00
parent ee19937202
commit aa84d16456
3 changed files with 25 additions and 5 deletions

View File

@ -5,6 +5,8 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/09/18
* Modified the Asura code (again), hopefully movement sprite issues are
fixed now [Skotlex]
* @reloadscript scripts will no longer eliminate mobs with no respawn data.
But watch out for possible bugs (I think someone mentioned 1 extra
treasure box will spawn when you use it? This needs testing!) [Skotlex]

View File

@ -2852,13 +2852,31 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
if (sc->data[SC_BLADESTOP].timer != -1)
status_change_end(src,SC_BLADESTOP,-1);
}
//Client expects you to move to target regardless
if(unit_walktobl(src, bl, 1, 1)) {
//Client expects you to move to target regardless of distance
{
struct unit_data *ud = unit_bl2ud(src);
short dx,dy;
int i,speed;
dx = bl->x - src->x;
dy = bl->y - src->y;
if (dx < 0) dx--;
else if (dx > 0) dx++;
if (dy < 0) dy--;
else if (dy > 0) dy++;
if (!dx && !dy) dy++;
if (map_getcell(src->m, src->x+dx, src->y+dy, CELL_CHKNOPASS))
{
dx = bl->x;
dy = bl->y;
} else {
dx = src->x + dx;
dy = src->y + dy;
}
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
if (ud) {
ud->target = 0; //Clear target, as you shouldn't be chasing it if you can't get there on time.
if(unit_walktoxy(src, dx, dy, 2) && ud) {
//Increase can't walk delay to not alter your walk path
ud->canmove_tick = tick;
speed = status_get_speed(src);

View File

@ -262,7 +262,7 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
return 0;
}
//Easy parameter: &1 -> 1/2 = easy/hard, &2 -> force walking.
//Easy parameter: &1 -> 1/0 = easy/hard, &2 -> force walking.
int unit_walktoxy( struct block_list *bl, int x, int y, int easy) {
struct unit_data *ud = NULL;
struct status_change *sc = NULL;