diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 7 | ||||
-rw-r--r-- | src/map/map.c | 2 | ||||
-rw-r--r-- | src/map/unit.c | 1 |
3 files changed, 3 insertions, 7 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 8db4597cd..92ec003e5 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9429,7 +9429,7 @@ int atcommand_iteminfo( clif_displaymessage(fd, atcmd_output);
count = MAX_SEARCH;
}
- for (i = 0; i < MAX_SEARCH; i++) {
+ for (i = 0; i < count; i++) {
item_data = item_array[i];
sprintf(atcmd_output, "Item: '%s'/'%s'[%d] (%d) Type: %s | Extra Effect: %s",
item_data->name,item_data->jname,item_data->slot,item_id,
@@ -9449,11 +9449,8 @@ int atcommand_iteminfo( strcpy(atcmd_output, " - Monsters don't drop this item");
clif_displaymessage(fd, atcmd_output);
- return 0;
}
-
- clif_displaymessage(fd, "Item not found.");
- return -1;
+ return 0;
}
/*==========================================
diff --git a/src/map/map.c b/src/map/map.c index 030ea4d02..7a37f6c43 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1407,7 +1407,7 @@ int map_search_freecell(struct block_list *src, int m, int *x,int *y, int rx, in tries = rx2*ry2; if (tries > 50) tries = 50; } else - tries = 50; + tries = 100; while(tries--) { *x = (rx >= 0)?(rand()%rx2-rx+bx):(rand()%(map[m].xs-2)+1); diff --git a/src/map/unit.c b/src/map/unit.c index ad76f5145..fc6c5c578 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -420,7 +420,6 @@ int unit_warp(struct block_list *bl,int m,int x,int y,int type) if (x<0 || y<0)
{ //Random map position.
-
if (!map_search_freecell(NULL, m, &x, &y, -1, -1, 1)) {
if(battle_config.error_log)
ShowWarning("unit_warp failed. Unit Id:%d/Type:%d, target position map %d (%s) at [%d,%d]\n", bl->id, bl->type, m, map[m].name, x, y);
|