Originally posted by [b]Orcao[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=3646
In mob.c -> mob_spawn_guardian():
CODE
if((x<=0 || y<=0) && !map_search_freecell(NULL, m, &x, &y, -1,-1, 0))
{
ShowWarning("mob_spawn_guardian: Couldn't locate a spawn cell for guardian class %d (index %d) at castle map %s\n",class_, guardian, map[m].name);
return 0;
}
If an x or y value that is less than or equal to 0 is passed to that, the map will spout a debug error and map_search_freecell will return 0 without finding a cell.
The reason:
CODE
if( !src && (!(flag&1) || flag&2) )
{
ShowDebug("map_search_freecell: Incorrect usage! When src is NULL, flag has to be &1 and can't have &2\n");
return 0;
}
if (flag&1) {
bx = *x;
by = *y;
} else {
bx = src->x;
by = src->y;
m = src->m;
}
The fix (back in mob_spawn_guardian):
CODE
if((x<=0 || y<=0) && !map_search_freecell(NULL, m, &x, &y, -1,-1, 1))
{
ShowWarning("mob_spawn_guardian: Couldn't locate a spawn cell for guardian class %d (index %d) at castle map %s\n",class_, guardian, map[m].name);
return 0;
}
Specifically, just changing the flag on the map_search_freecell to 1.