Setup/Zones

* instances with with a entrance touple of (0, 0, 0) will no longer be displayed somewhere in Alterac (at the map 0 origin point)
This commit is contained in:
Sarjuuk
2024-02-28 22:13:42 +01:00
parent 54b224d929
commit e85a9e9d6a
2 changed files with 6 additions and 7 deletions

View File

@@ -115,7 +115,8 @@ SqlGen::register(new class extends SetupScript
foreach ($baseData as &$bd)
{
if (in_array($bd['mapBak'], [0, 1, 530, 571]))
// usually parent = -1 means no parent but some maps have this touple set to 0
if (!$bd['parentMapId'] && !$bd['parentX'] && !$bd['parentY'])
continue;
if ($gPos = Game::worldPosToZonePos($bd['parentMapId'], $bd['parentY'], $bd['parentX']))
@@ -124,13 +125,10 @@ SqlGen::register(new class extends SetupScript
$bd['parentMapId'] = $pos['areaId'] ?? $gPos[0]['areaId'];
$bd['parentX'] = $pos['posX'] ?? $gPos[0]['posX'];
$bd['parentY'] = $pos['posY'] ?? $gPos[0]['posY'];
continue;
}
else
{
$bd['parentMapId'] = 0;
$bd['parentX'] = 0;
$bd['parentY'] = 0;
}
$bd['parentMapId'] = 0;
}
DB::Aowow()->query('REPLACE INTO ?_zones VALUES (?a)', $baseData);

View File

@@ -0,0 +1 @@
UPDATE `aowow_dbversion` SET `sql` = CONCAT(IFNULL(`sql`, ''), ' zones');