- Added a check to map_searchfreecell to handle the case when no ranges are specified (returns the center tile).
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6622 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
1bac98be0c
commit
99dbd259be
@ -1474,6 +1474,13 @@ int map_search_freecell(struct block_list *src, int m, short *x,short *y, int rx
|
|||||||
by = src->y;
|
by = src->y;
|
||||||
m = src->m;
|
m = src->m;
|
||||||
}
|
}
|
||||||
|
if (!rx && !ry) {
|
||||||
|
//No range? Return the target cell then....
|
||||||
|
*x = bx;
|
||||||
|
*y = by;
|
||||||
|
return map_getcell(m,*x,*y,CELL_CHKREACH);
|
||||||
|
}
|
||||||
|
|
||||||
if (rx >= 0 && ry >= 0) {
|
if (rx >= 0 && ry >= 0) {
|
||||||
tries = rx2*ry2;
|
tries = rx2*ry2;
|
||||||
if (tries > 100) tries = 100;
|
if (tries > 100) tries = 100;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user