Skip to content

Commit

Permalink
Zones/Misc
Browse files Browse the repository at this point in the history
 * hide some more unused zone
 * link zones Plaguelands: Scarlet Enclave and Onyxia's Lair to correct map
 * fixed wotlk raids all being heroic
 * link icecrown citadel sub maps to master and hide sub maps
  • Loading branch information
Sarjuuk committed Apr 19, 2020
1 parent 92a1016 commit d3b11af
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 9 deletions.
2 changes: 2 additions & 0 deletions pages/zones.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ protected function generateContent()
?_taxinodes tn2
WHERE tn1.Id = tp.endNodeId AND
tn2.Id = tp.startNodeId AND
tn1.type <> 0 AND
tn2.type <> 0 AND
(tp.startNodeId IN (?a) OR tp.EndNodeId IN (?a))
', array_keys($nodes), array_keys($nodes));

Expand Down
33 changes: 24 additions & 9 deletions setup/tools/sqlgen/zones.func.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,22 @@
2597 => ['maxPlayer' => 40], // is 5 in battlemasterlist ... dafuq?
4710 => ['maxPlayer' => 40],
3456 => ['parentAreaId' => 65, 'parentX' => 87.3, 'parentY' => 51.1], // has no coordinates set in map.dbc
// individual Tempest Keep ships
3849 => ['parentAreaId' => 3523, 'parentX' => 70.5, 'parentY' => 69.6],
3847 => ['parentAreaId' => 3523, 'parentX' => 71.7, 'parentY' => 55.1],
3848 => ['parentAreaId' => 3523, 'parentX' => 74.3, 'parentY' => 57.8],
3845 => ['parentAreaId' => 3523, 'parentX' => 73.5, 'parentY' => 63.7]
3845 => ['parentAreaId' => 3523, 'parentX' => 73.5, 'parentY' => 63.7],
// individual Icecrown Citadel wings
4893 => ['parentAreaId' => 4812, 'cuFlags' => CUSTOM_EXCLUDE_FOR_LISTVIEW],
4894 => ['parentAreaId' => 4812, 'cuFlags' => CUSTOM_EXCLUDE_FOR_LISTVIEW],
4895 => ['parentAreaId' => 4812, 'cuFlags' => CUSTOM_EXCLUDE_FOR_LISTVIEW],
4896 => ['parentAreaId' => 4812, 'cuFlags' => CUSTOM_EXCLUDE_FOR_LISTVIEW],
4897 => ['parentAreaId' => 4812, 'cuFlags' => CUSTOM_EXCLUDE_FOR_LISTVIEW],
// uncaught unused zones
207 => ['cuFlags' => CUSTOM_EXCLUDE_FOR_LISTVIEW],
208 => ['cuFlags' => CUSTOM_EXCLUDE_FOR_LISTVIEW],
616 => ['cuFlags' => CUSTOM_EXCLUDE_FOR_LISTVIEW],
1417 => ['cuFlags' => CUSTOM_EXCLUDE_FOR_LISTVIEW]
);

public function generate(array $ids = []) : bool
Expand All @@ -39,16 +51,17 @@ public function generate(array $ids = []) : bool
REPLACE INTO ?_zones
SELECT
a.id,
IFNULL(wmt.targetMapId, a.mapId), -- map
a.mapId, -- mapBak
IFNULL(wmt.targetMapId, m.id), -- map
m.id, -- mapBak
a.areaTable, -- parentArea
IFNULL(wmt.targetMapId, -- g_zone_categories
IF(m.areaType = 1, 2,
IF(m.areaType = 2, 3,
IF(m.areaType = 4, 9,
IF(m.isBG = 1, 6,
IF(a.mapId = 571, 10,
IF(a.mapId = 530, 8, a.mapId))))))),
IF(m.id = 609, 1,
IF(m.id = 571, 10,
IF(m.id = 530, 8, m.id)))))))),
a.flags,
IF(areaTable <> 0 OR -- cuFlags
(wma.id IS NULL AND pa.areaId IS NULL AND (flags & 0x11000) = 0), ?d, 0),
Expand Down Expand Up @@ -95,10 +108,10 @@ public function generate(array $ids = []) : bool
FROM
dbc_areatable a
JOIN
dbc_map m ON a.mapId = m.id
dbc_map m ON m.id = IF(a.id = 2159, 249, a.mapId) -- Zone: Onyxias Lair is linked to the wrong map
LEFT JOIN (
SELECT mapId, BIT_OR(1 << difficulty) AS modeMask, MIN(nPlayer) AS minPl, MAX(nPlayer) AS maxPl FROM dbc_mapdifficulty GROUP BY mapId
) md ON md.mapId = a.mapId
) md ON md.mapId = m.id
LEFT JOIN
dbc_lfgdungeons lfgOpen ON a.mapId IN (0, 1, 530, 571) AND a.name_loc0 LIKE CONCAT("%", lfgOpen.name_loc0) AND lfgOpen.type = 4
LEFT JOIN (
Expand Down Expand Up @@ -134,7 +147,7 @@ public function generate(array $ids = []) : bool
groupId <> 11
GROUP BY
mapId
) lfgIni ON lfgIni.mapId = a.mapId
) lfgIni ON lfgIni.mapId = m.id
LEFT JOIN
dbc_battlemasterlist bm ON bm.mapId = a.mapId AND bm.moreMapId < 0
LEFT JOIN
Expand Down Expand Up @@ -171,12 +184,14 @@ public function generate(array $ids = []) : bool
mapId
');

$heroics = DB::Aowow()->selectCol('SELECT DISTINCT mapId FROM aowow_zones WHERE type IN (5, 8)');

foreach ($zoneReq as $mapId => $req)
{
$update = ['levelReq' => $req['reqLevel']];
$aN = $aH = [];

if ($req['heroicLevel'])
if ($req['heroicLevel'] && in_array($mapId, $heroics))
$update['levelHeroic'] = $req['heroicLevel'];

if ($req['reqItemLevelN'])
Expand Down

0 comments on commit d3b11af

Please sign in to comment.