Fixed bugreport:6401 / Follow up r16562
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16565 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
33fb89ef91
commit
cef909df2f
@ -686,8 +686,7 @@ uint8 unit_getdir(struct block_list *bl)
|
|||||||
// &1 Do not send position update packets.
|
// &1 Do not send position update packets.
|
||||||
int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag)
|
int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag)
|
||||||
{
|
{
|
||||||
if(count)
|
if(count) {
|
||||||
{
|
|
||||||
struct map_session_data* sd;
|
struct map_session_data* sd;
|
||||||
struct skill_unit* su = NULL;
|
struct skill_unit* su = NULL;
|
||||||
int nx, ny, result;
|
int nx, ny, result;
|
||||||
@ -700,49 +699,40 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag)
|
|||||||
nx = result>>16;
|
nx = result>>16;
|
||||||
ny = result&0xffff;
|
ny = result&0xffff;
|
||||||
|
|
||||||
if(!su)
|
if(!su) {
|
||||||
{
|
|
||||||
unit_stop_walking(bl, 0);
|
unit_stop_walking(bl, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( sd ) {
|
||||||
sd->ud.to_x = nx;
|
sd->ud.to_x = nx;
|
||||||
sd->ud.to_y = ny;
|
sd->ud.to_y = ny;
|
||||||
|
}
|
||||||
|
|
||||||
dx = nx-bl->x;
|
dx = nx-bl->x;
|
||||||
dy = ny-bl->y;
|
dy = ny-bl->y;
|
||||||
|
|
||||||
if(dx || dy)
|
if(dx || dy) {
|
||||||
{
|
|
||||||
map_foreachinmovearea(clif_outsight, bl, AREA_SIZE, dx, dy, bl->type == BL_PC ? BL_ALL : BL_PC, bl);
|
map_foreachinmovearea(clif_outsight, bl, AREA_SIZE, dx, dy, bl->type == BL_PC ? BL_ALL : BL_PC, bl);
|
||||||
|
|
||||||
if(su)
|
if(su) {
|
||||||
{
|
|
||||||
skill_unit_move_unit_group(su->group, bl->m, dx, dy);
|
skill_unit_move_unit_group(su->group, bl->m, dx, dy);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
map_moveblock(bl, nx, ny, gettick());
|
map_moveblock(bl, nx, ny, gettick());
|
||||||
}
|
}
|
||||||
|
|
||||||
map_foreachinmovearea(clif_insight, bl, AREA_SIZE, -dx, -dy, bl->type == BL_PC ? BL_ALL : BL_PC, bl);
|
map_foreachinmovearea(clif_insight, bl, AREA_SIZE, -dx, -dy, bl->type == BL_PC ? BL_ALL : BL_PC, bl);
|
||||||
|
|
||||||
if(!(flag&1))
|
if(!(flag&1)) {
|
||||||
{
|
|
||||||
clif_blown(bl);
|
clif_blown(bl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sd)
|
if(sd) {
|
||||||
{
|
if(sd->touching_id) {
|
||||||
if(sd->touching_id)
|
|
||||||
{
|
|
||||||
npc_touchnext_areanpc(sd, false);
|
npc_touchnext_areanpc(sd, false);
|
||||||
}
|
}
|
||||||
if(map_getcell(bl->m, bl->x, bl->y, CELL_CHKNPC))
|
if(map_getcell(bl->m, bl->x, bl->y, CELL_CHKNPC)) {
|
||||||
{
|
|
||||||
npc_touch_areanpc(sd, bl->m, bl->x, bl->y);
|
npc_touch_areanpc(sd, bl->m, bl->x, bl->y);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
sd->areanpc_id = 0;
|
sd->areanpc_id = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user