Skip to content

Commit

Permalink
Game/worldPosToZonePos
Browse files Browse the repository at this point in the history
 * catch DB errors resulting in wrong return type
  • Loading branch information
Sarjuuk committed Aug 30, 2020
1 parent 93948a2 commit 366a0f2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions includes/game.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ public static function worldPosToZonePos(int $mapId, float $posX, float $posY, i
if (!$points) // retry: TC counts pre-instance subareas as instance-maps .. which have no map file
$points = DB::Aowow()->select($query, $posX, $posX, $posY, $posY, $posX, $posX, $posY, $posY, 0, $mapId, 0, 0, DBSIMPLE_SKIP);

if (!is_array($points))
{
trigger_error('Game::worldPosToZonePos - dbc query failed', E_USER_ERROR);
return [];
}

return $points;
}
}
Expand Down

0 comments on commit 366a0f2

Please sign in to comment.