From ded09d81feaaed814630e58551b4a384d32945f8 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 24 May 2006 16:47:10 +0000 Subject: - Merged item_db.sql from stable :B - Added a missing line (how did it get lost?) in mob_spawn to set aggressive state for angry mobs. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6731 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 18 ++++++++---------- src/map/unit.c | 2 +- 2 files changed, 9 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/map/mob.c b/src/map/mob.c index 3d22baa80..fe4b32a12 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -288,28 +288,26 @@ int mob_once_spawn (struct map_session_data *sd, char *mapname, } strncpy(data.eventname, event, 50); - if (sd && (x < 0 || y < 0)) - { //Locate spot around player. + if (sd && (x < 0 || y < 0)) //Locate spot around player. map_search_freecell(&sd->bl, m, &x, &y, 1, 1, 0); - data.x = x; - data.y = y; - } if (x <= 0 || y <= 0 || map_getcell(m,x,y,CELL_CHKNOREACH)) rand_flag = 1; //Randomize spot on map for each mob. - + else { + data.x = x; + data.y = y; + } if (!mob_parse_dataset(&data)) return 0; for (count = 0; count < amount; count++) { if (rand_flag) { //Get a random cell for this mob. map_search_freecell(NULL, m, &x, &y, -1, -1, 1); + // This should ALWAYS be done. [blackhole89] + data.x = x; + data.y = y; } - // This should ALWAYS be done. [blackhole89] - data.x = x; - data.y = y; - md =mob_spawn_dataset (&data); if (class_ < 0 && battle_config.dead_branch_active) diff --git a/src/map/unit.c b/src/map/unit.c index 01814b296..cf7d88aea 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -392,7 +392,7 @@ int unit_movepos(struct block_list *bl,int dst_x,int dst_y, int easy, int checkp unit_stop_walking(bl,1); unit_stop_attack(bl); - if(checkpath && (map_getcell(bl->m,bl->x,bl->y, CELL_CHKNOPASS) || path_search_real(&wpd,bl->m,bl->x,bl->y,dst_x,dst_y,easy, CELL_CHKNOREACH))) + if(checkpath && (map_getcell(bl->m,dst_x,dst_y, CELL_CHKNOPASS) || path_search_real(&wpd,bl->m,bl->x,bl->y,dst_x,dst_y,easy, CELL_CHKNOREACH))) return 0; dir = map_calc_dir(bl, dst_x,dst_y); -- cgit v1.2.3-70-g09d2