fix: mass teleport position validation (#214)

* fix: mass teleport position validation

* fix: max position
This commit is contained in:
Gabriel Pedro
2023-02-06 16:55:29 -04:00
committed by GitHub
parent 3fb30f6391
commit a846d8a7e7
2 changed files with 5 additions and 5 deletions

View File

@@ -90,8 +90,8 @@ if (isset($_POST['action']) && $_POST['action']) {
admin_teleport_town($town_id);
break;
case 'set-position':
if ((!$posx || !$posy || !$posz) && !$to_temple) {
displayMessage('Please fill all inputs');
if (!$to_temple && ($posx < 0 || $posx > 65535 || $posy < 0 || $posy > 65535|| $posz < 0 || $posz > 16)) {
displayMessage('Invalid Position');
return;
}