Setup/Spawns

* implement SpawnedByDefault from TC
 * maybe fix a longstanding issue where multiple parent areas per instanced map lead to wrong spawn points
    map  should be                  can also be
    36   The Deadmines              The Great Sea, Unused Ironcladcove
    109  The Temple of Atal'Hakkar  Sunken Temple
    540  The Shattered Halls        Hellfire Citadel
    560  Old Hillsbrad Foothills    Hyjal Past
    631  Icecrown Citadel           The Frost Queen's Lair, Putricide's Laboratory of Alchemical Horrors and Fun, The Crimson Hall, The Frozen Throne, The Sanctum of Blood
This commit is contained in:
Sarjuuk
2024-05-28 19:52:46 +02:00
parent a87b869896
commit f422c4ecfb
21 changed files with 160 additions and 103 deletions

View File

@@ -630,8 +630,13 @@ trait spawnHelper
$opts = $menu = $tt = $info = [];
$footer = '';
if ($s['respawn'])
$info[1] = '<span class="q0">'.Lang::npc('respawnIn').Lang::main('colon').Lang::formatTime($s['respawn'] * 1000, 'game', 'timeAbbrev', true).'</span>';
if ($s['respawn'] > 0)
$info[1] = '<span class="q0">'.Lang::npc('respawnIn', [Lang::formatTime($s['respawn'] * 1000, 'game', 'timeAbbrev', true)]).'</span>';
else if ($s['respawn'] < 0)
{
$info[1] = '<span class="q0">'.Lang::npc('despawnAfter', [Lang::formatTime(-$s['respawn'] * 1000, 'game', 'timeAbbrev', true)]).'</span>';
$opts['type'] = 4; // make pip purple
}
if (User::isInGroup(U_GROUP_STAFF))
{

View File

@@ -48,7 +48,7 @@ class Game
-2 => [ 0],
0 => [ 1, 3, 4, 8, 9, 10, 11, 12, 25, 28, 33, 36, 38, 40, 41, 44, 45, 46, 47, 51, 85, 130, 132, 139, 154, 267, 1497, 1519, 1537, 2257, 3430, 3431, 3433, 3487, 4080, 4298],
1 => [ 14, 15, 16, 17, 141, 148, 188, 215, 220, 331, 357, 361, 363, 400, 405, 406, 440, 490, 493, 618, 1377, 1637, 1638, 1657, 1769, 3524, 3525, 3526, 3557],
2 => [ 206, 209, 491, 717, 718, 719, 721, 722, 796, 1176, 1196, 1337, 1417, 1581, 1583, 1584, 1941, 2017, 2057, 2100, 2366, 2367, 2437, 2557, 3535, 3562, 3688, 3713, 3714, 3715, 3716, 3717, 3789, 3790, 3791, 3792, 3842, 3847, 3848, 3849, 3905, 4100, 4131, 4196, 4228, 4264, 4265, 4272, 4277, 4415, 4416, 4494, 4522, 4723, 4809, 4813, 4820],
2 => [ 206, 209, 491, 717, 718, 719, 721, 722, 796, 1176, 1196, 1337, 1477, 1581, 1583, 1584, 1941, 2017, 2057, 2100, 2366, 2367, 2437, 2557, 3535, 3562, 3688, 3713, 3714, 3715, 3716, 3717, 3789, 3790, 3791, 3792, 3842, 3847, 3848, 3849, 3905, 4100, 4131, 4196, 4228, 4264, 4265, 4272, 4277, 4415, 4416, 4494, 4522, 4723, 4809, 4813, 4820],
3 => [ 1977, 2159, 2677, 2717, 3428, 3429, 3456, 3457, 3606, 3607, 3805, 3836, 3845, 3923, 3959, 4075, 4273, 4493, 4500, 4603, 4722, 4812, 4987],
4 => [ -372, -263, -262, -261, -162, -161, -141, -82, -81, -61],
5 => [ -373, -371, -324, -304, -264, -201, -182, -181, -121, -101, -24],
@@ -59,6 +59,46 @@ class Game
10 => [ 65, 66, 67, 210, 394, 495, 2817, 3537, 3711, 4024, 4197, 4395, 4742]
);
// zoneorsort for quests need updating
// partially points non-instanced area with identical name for instance quests
public static $questSortFix = array(
-221 => 440, // Treasure Map => Tanaris
-284 => 0, // Special => Misc (some quests get shuffled into seasonal)
151 => 0, // Designer Island => Misc
22 => 0, // Programmer Isle
35 => 33, // Booty Bay => Stranglethorn Vale
131 => 132, // Kharanos => Coldridge Valley
24 => 9, // Northshire Abbey => Northshire Valley
279 => 36, // Dalaran Crater => Alterac Mountains
4342 => 4298, // Acherus: The Ebon Hold => The Scarlet Enclave
2079 => 15, // Alcaz Island => Dustwallow Marsh
1939 => 440, // Abyssal Sands => Tanaris
393 => 363, // Darkspeer Strand => Valley of Trials
702 => 141, // Rut'theran Village => Teldrassil
221 => 220, // Camp Narache => Red Cloud Mesa
1116 => 357, // Feathermoon Stronghold => Feralas
236 => 209, // Shadowfang Keep
4769 => 4742, // Hrothgar's Landing => Hrothgar's Landing
4613 => 4395, // Dalaran City => Dalaran
4522 => 210, // Icecrown Citadell => Icecrown
3896 => 3703, // Aldor Rise => Shattrath City
3696 => 3522, // The Barrier Hills => Blade's Edge Mountains
2839 => 2597, // Alterac Valley
19 => 1977, // Zul'Gurub
4445 => 4273, // Ulduar
2300 => 1941, // Caverns of Time
3545 => 3535, // Hellfire Citadel
2562 => 3457, // Karazhan
3840 => 3959, // Black Temple
1717 => 491, // Razorfen Kraul
978 => 1176, // Zul'Farrak
133 => 721, // Gnomeregan
3607 => 3905, // Serpentshrine Cavern
3845 => 3842, // Tempest Keep
1517 => 1337, // Uldaman
1417 => 1477 // Sunken Temple
);
public static $questSubCats = array(
1 => [132], // Dun Morogh: Coldridge Valley
12 => [9], // Elwynn Forest: Northshire Valley
@@ -383,6 +423,10 @@ class Game
return [];
}
// Black Temple and Sunwell floor offset bullshit
if ($points && in_array($mapId, [564, 580]))
$points[0]['floor']++;
return $points;
}

View File

@@ -1021,7 +1021,8 @@ $lang = array(
'tameable' => "Zähmbar (%s)",
'waypoint' => "Wegpunkt",
'wait' => "Wartezeit",
'respawnIn' => "Wiedereinstieg in",
'respawnIn' => "Respawn in: %s",
'despawnAfter' => "Gespawnt durch Script<br>Despawn nach: %s",
'rank' => [0 => "Normal", 1 => "Elite", 4 => "Rar", 2 => "Rar Elite", 3 => "Boss"],
'textRanges' => [null, "an das Gebiet gesendet", "an die Zone gesendet", "an die Map gesendet", "an die Welt gesendet"],
'textTypes' => [null, "schreit", "sagt", "flüstert"],
@@ -1309,7 +1310,7 @@ $lang = array(
2 => array( "Dungeons",
206 => "Burg Utgarde", 209 => "Burg Schattenfang", 491 => "Kral der Klingenhauer", 717 => "Das Verlies", 718 => "Die Höhlen des Wehklagens",
719 => "Tiefschwarze Grotte", 721 => "Gnomeregan", 722 => "Hügel der Klingenhauer", 796 => "Das Scharlachrote Kloster", 1176 => "Zul'Farrak",
1196 => "Turm Utgarde", 1337 => "Uldaman", 1417 => "Versunkener Tempel", 1581 => "Die Todesminen", 1583 => "Schwarzfelsspitze",
1196 => "Turm Utgarde", 1337 => "Uldaman", 1477 => "Versunkener Tempel", 1581 => "Die Todesminen", 1583 => "Schwarzfelsspitze",
1584 => "Schwarzfelstiefen", 1941 => "Höhlen der Zeit", 2017 => "Stratholme", 2057 => "Scholomance", 2100 => "Maraudon",
2366 => "Der schwarze Morast", 2367 => "Vorgebirge des Alten Hügellands",2437 => "Der Flammenschlund", 2557 => "Düsterbruch", 3535 => "Höllenfeuerzitadelle",
3562 => "Höllenfeuerbollwerk", 3688 => "Auchindoun", 3713 => "Der Blutkessel", 3714 => "Die zerschmetterten Hallen", 3715 => "Die Dampfkammer",

View File

@@ -1021,7 +1021,8 @@ $lang = array(
'tameable' => "Tameable (%s)",
'waypoint' => "Waypoint",
'wait' => "Wait",
'respawnIn' => "Respawn in",
'respawnIn' => "Respawn in: %s",
'despawnAfter' => "Spawned by Script<br>Despawn after: %s",
'rank' => [0 => "Normal", 1 => "Elite", 4 => "Rare", 2 => "Rare Elite", 3 => "Boss"],
'textRanges' => [null, "sent to area", "sent to zone", "sent to map", "sent to world"],
'textTypes' => [null, "yells", "says", "whispers"],
@@ -1309,7 +1310,7 @@ $lang = array(
2 => array( "Dungeons",
206 => "Utgarde Keep", 209 => "Shadowfang Keep", 491 => "Razorfen Kraul", 717 => "The Stockade", 718 => "Wailing Caverns",
719 => "Blackfathom Deeps", 721 => "Gnomeregan", 722 => "Razorfen Downs", 796 => "Scarlet Monastery", 1176 => "Zul'Farrak",
1196 => "Utgarde Pinnacle", 1337 => "Uldaman", 1417 => "Sunken Temple", 1581 => "The Deadmines", 1583 => "Blackrock Spire",
1196 => "Utgarde Pinnacle", 1337 => "Uldaman", 1477 => "Sunken Temple", 1581 => "The Deadmines", 1583 => "Blackrock Spire",
1584 => "Blackrock Depths", 1941 => "Caverns of Time", 2017 => "Stratholme", 2057 => "Scholomance", 2100 => "Maraudon",
2366 => "The Black Morass", 2367 => "Old Hillsbrad Foothills", 2437 => "Ragefire Chasm", 2557 => "Dire Maul", 3535 => "Hellfire Citadel",
3562 => "Hellfire Ramparts", 3688 => "Auchindoun", 3713 => "The Blood Furnace", 3714 => "The Shattered Halls", 3715 => "The Steamvault",

View File

@@ -1021,7 +1021,8 @@ $lang = array(
'tameable' => "Domesticable (%s)",
'waypoint' => "punto de recorrido",
'wait' => "Tiempo de espera",
'respawnIn' => "Reingreso en",
'respawnIn' => "Reingreso en: %s",
'despawnAfter' => "[Spawned by Script<br>Despawn after]: %s",
'rank' => [0 => "Normal", 1 => "Élite", 4 => "Raro", 2 => "Élite raro", 3 => "Jefe"],
'textRanges' => [null, "Mandar al área", "Mandar a zona", "Mandar al mapa", "Mandar al mundo"],
'textTypes' => [null, "grita", "dice", "susurra"],
@@ -1309,7 +1310,7 @@ $lang = array(
2 => array( "Mazmorras",
206 => "Fortaleza de Utgarde", 209 => "Castillo de Colmillo Oscuro", 491 => "Horado Rajacieno", 717 => "Las Mazmorras", 718 => "Cuevas de los Lamentos",
719 => "Cavernas de Brazanegra", 721 => "Gnomeregan", 722 => "Zahúrda Rajacieno", 796 => "Monasterio Escarlata", 1176 => "Zul'Farrak",
1196 => "Pináculo de Utgarde", 1337 => "Uldaman", 1417 => "Templo Sumergido", 1581 => "Las Minas de la Muerte", 1583 => "Cumbre de Roca Negra",
1196 => "Pináculo de Utgarde", 1337 => "Uldaman", 1477 => "Templo Sumergido", 1581 => "Las Minas de la Muerte", 1583 => "Cumbre de Roca Negra",
1584 => "Profundidades de Roca Negra", 1941 => "Cavernas del Tiempo", 2017 => "Stratholme", 2057 => "Scholomance", 2100 => "Maraudon",
2366 => "La Ciénaga Negra", 2367 => "Antiguas Laderas de Trabalomas",2437 => "Sima Ígnea", 2557 => "La Masacre", 3535 => "Ciudadela del Fuego Infernal",
3562 => "Murallas del Fuego Infernal", 3688 => "Auchindoun", 3713 => "El Horno de Sangre", 3714 => "Las Salas Arrasadas", 3715 => "La Cámara de Vapor",

View File

@@ -1021,7 +1021,8 @@ $lang = array(
'tameable' => "Domptable (%s)",
'waypoint' => "Point de route",
'wait' => "Période d'attente",
'respawnIn' => "Rentrée en",
'respawnIn' => "Rentrée en : %s",
'despawnAfter' => "[Spawned by Script<br>Despawn after] : %s",
'rank' => [0 => "Standard", 1 => "Élite", 4 => "Rare", 2 => "Élite rare", 3 =>"Boss"],
'textRanges' => [null, "[sent to area]", "[sent to zone]", "[sent to map]", "[sent to world]"],
'textTypes' => [null, "crie", "dit", "chuchote"],
@@ -1309,7 +1310,7 @@ $lang = array(
2 => array( "Donjons",
206 => "Donjon d'Utgarde", 209 => "Donjon d'Ombrecroc", 491 => "Kraal de Tranchebauge", 717 => "La Prison", 718 => "Cavernes des lamentations",
719 => "Profondeurs de Brassenoire", 721 => "Gnomeregan", 722 => "Souilles de Tranchebauge", 796 => "Monastère écarlate", 1176 => "Zul'Farrak",
1196 => "Cime d'Utgarde", 1337 => "Uldaman", 1417 => "Temple englouti", 1581 => "Les Mortemines", 1583 => "Pic Rochenoire",
1196 => "Cime d'Utgarde", 1337 => "Uldaman", 1477 => "Temple englouti", 1581 => "Les Mortemines", 1583 => "Pic Rochenoire",
1584 => "Profondeurs de Rochenoire", 1941 => "Grottes du temps", 2017 => "Stratholme", 2057 => "Scholomance", 2100 => "Maraudon",
2366 => "Le Noir Marécage", 2367 => "Contreforts de Hautebrande d'antan",2437 => "Gouffre de Ragefeu", 2557 => "Hache-tripes", 3535 => "Citadelle des Flammes infernale",
3562 => "Remparts des Flammes infernales",3688 => "Auchindoun", 3713 => "La Fournaise du sang", 3714 => "Les Salles brisées", 3715 => "Le Caveau de la vapeur",

View File

@@ -1021,7 +1021,8 @@ $lang = array(
'tameable' => "Можно приручить (%s)",
'waypoint' => "Путевой точки",
'wait' => "Период ожидания",
'respawnIn' => "Reentry in", /// ..lol?
'respawnIn' => "Reentry in: %s",
'despawnAfter' => "[Spawned by Script<br>Despawn after]: %s",
'rank' => [0 => "Обычный", 1 => "Элитный", 4 => "Редкий", 2 => "Редкий элитный", 3 =>"Босс"],
'textRanges' => [null, "[sent to area]", "[sent to zone]", "[sent to map]", "[sent to world]"],
'textTypes' => [null, "кричит", "говорит", "шепчет"],
@@ -1309,7 +1310,7 @@ $lang = array(
2 => array( "Подземелья",
206 => "Крепость Утгард", 209 => "Крепость Темного Клыка", 491 => "Лабиринты Иглошкурых", 717 => "Тюрьма", 718 => "Пещеры Стенаний",
719 => "Непроглядная Пучина", 721 => "Гномреган", 722 => "Курганы Иглошкурых", 796 => "Монастырь Алого ордена", 1176 => "Зул'Фаррак",
1196 => "Вершина Утгард", 1337 => "Ульдаман", 1417 => "Затонувший храм", 1581 => "Мертвые копи", 1583 => "Пик Черной горы",
1196 => "Вершина Утгард", 1337 => "Ульдаман", 1477 => "Затонувший храм", 1581 => "Мертвые копи", 1583 => "Пик Черной горы",
1584 => "Глубины Черной горы", 1941 => "Пещеры Времени", 2017 => "Стратхольм", 2057 => "Некроситет", 2100 => "Мародон",
2366 => "Черные топи", 2367 => "Старые предгорья Хилсбрада", 2437 => "Огненная пропасть", 2557 => "Забытый Город", 3535 => "Цитадель Адского Пламени",
3562 => "Бастионы Адского Пламени", 3688 => "Аукиндон", 3713 => "Кузня Крови", 3714 => "Разрушенные залы", 3715 => "Паровое подземелье",

View File

@@ -1020,7 +1020,8 @@ $lang = array(
'tameable' => "可驯服的(%s)",
'waypoint' => "路径点",
'wait' => "等待",
'respawnIn' => "重生",
'respawnIn' => "重生%s",
'despawnAfter' => "[Spawned by Script<br>Despawn after]%s",
'rank' => [0 => "普通", 1 => "稀有", 4 => "精英", 2 => "稀有精英", 3 => "首领"],
'textRanges' => [null, "发送到地区", "发送到区域", "发送到地图", "发送到世界"],
'textTypes' => [null, "喊道", "", "悄悄地说"],
@@ -1308,7 +1309,7 @@ $lang = array(
2 => array( "地下城",
206 => "乌特加德城堡", 209 => "影牙城堡", 491 => "剃刀沼泽", 717 => "监狱", 718 => "哀嚎洞穴",
719 => "黑暗深渊", 721 => "诺莫瑞根", 722 => "剃刀高地", 796 => "血色修道院", 1176 => "祖尔法拉克",
1196 => "乌特加德之巅", 1337 => "奥达曼", 1417 => "沉没的神庙", 1581 => "死亡矿井", 1583 => "黑石塔",
1196 => "乌特加德之巅", 1337 => "奥达曼", 1477 => "沉没的神庙", 1581 => "死亡矿井", 1583 => "黑石塔",
1584 => "黑石深渊", 1941 => "时光之穴", 2017 => "斯坦索姆", 2057 => "通灵学院", 2100 => "玛拉顿",
2366 => "黑色沼泽", 2367 => "旧希尔斯布莱德丘陵", 2437 => "怒焰裂谷", 2557 => "厄运之槌", 3535 => "地狱火堡垒",
3562 => "地狱火城墙", 3688 => "奥金顿", 3713 => "鲜血熔炉", 3714 => "破碎大厅", 3715 => "蒸汽地窟",

File diff suppressed because one or more lines are too long

View File

@@ -71,8 +71,8 @@ function setup() : void
['SqlGen::generate', 'titles', null, null, null],
['SqlGen::generate', 'items', null, null, null],
['FileGen::generate', 'complexImg', null, null, null], // alphamaps generated here are requires for spawns/waypoints
['SqlGen::generate', 'spawns', null, null, null], // this one ^_^
['SqlGen::generate', 'zones', null, null, null],
['SqlGen::generate', 'spawns', null, null, null], // this one ^_^
['SqlGen::generate', 'itemset', null, null, null],
['SqlGen::generate', 'item_stats', null, null, null],
['SqlGen::generate', 'source', null, null, null],

View File

@@ -45,7 +45,7 @@ function update(?array &$sql = [], ?array &$build = []) : void
$pi = pathinfo($file);
[$fDate, $fPart] = explode('_', $pi['filename']);
$fData = intVal($fDate);
$fDate = intVal($fDate);
if ($date && $fDate < $date)
continue;

View File

@@ -9,6 +9,8 @@ if (!CLI)
SqlGen::register(new class extends SetupScript
{
use TrCustomData; // import custom data from DB
protected $command = 'quests';
protected $tblDependencyTC = ['quest_template', 'quest_template_addon', 'quest_template_locale', 'game_event', 'game_event_seasonal_questrelation', 'disables'];
@@ -193,46 +195,7 @@ SqlGen::register(new class extends SetupScript
for ($i = 1; $i < 6; $i++)
DB::Aowow()->query($repQuery, $i, $i, $i, $i, $ids ?: DBSIMPLE_SKIP);
// zoneorsort for quests need updating
// partially points non-instanced area with identic name for instance quests
$subcats = array(
-221 => 440, // Treasure Map => Tanaris
-284 => 0, // Special => Misc (some quests get shuffled into seasonal)
151 => 0, // Designer Island => Misc
22 => 0, // Programmer Isle
35 => 33, // Booty Bay => Stranglethorn Vale
131 => 132, // Kharanos => Coldridge Valley
24 => 9, // Northshire Abbey => Northshire Valley
279 => 36, // Dalaran Crater => Alterac Mountains
4342 => 4298, // Acherus: The Ebon Hold => The Scarlet Enclave
2079 => 15, // Alcaz Island => Dustwallow Marsh
1939 => 440, // Abyssal Sands => Tanaris
393 => 363, // Darkspeer Strand => Valley of Trials
702 => 141, // Rut'theran Village => Teldrassil
221 => 220, // Camp Narache => Red Cloud Mesa
1116 => 357, // Feathermoon Stronghold => Feralas
236 => 209, // Shadowfang Keep
4769 => 4742, // Hrothgar's Landing => Hrothgar's Landing
4613 => 4395, // Dalaran City => Dalaran
4522 => 210, // Icecrown Citadell => Icecrown
3896 => 3703, // Aldor Rise => Shattrath City
3696 => 3522, // The Barrier Hills => Blade's Edge Mountains
2839 => 2597, // Alterac Valley
19 => 1977, // Zul'Gurub
4445 => 4273, // Ulduar
2300 => 1941, // Caverns of Time
3545 => 3535, // Hellfire Citadel
2562 => 3457, // Karazhan
3840 => 3959, // Black Temple
1717 => 491, // Razorfen Kraul
978 => 1176, // Zul'Farrak
133 => 721, // Gnomeregan
3607 => 3905, // Serpentshrine Cavern
3845 => 3842, // Tempest Keep
1517 => 1337 // Uldaman
);
foreach ($subcats as $child => $parent)
foreach (Game::$questSortFix as $child => $parent)
DB::Aowow()->query('UPDATE ?_quests SET zoneOrSort = ?d WHERE zoneOrSortBak = ?d', $parent, $child);
// move quests liked to holidays into appropirate quests-sorts. create dummy sorts as needed

View File

@@ -453,9 +453,9 @@ SqlGen::register(new class extends SetupScript
$q['zone'] = 0; // todo: do not use questSort for zoneId, but .. questender? (starter can be item)
if ($_ = $this->taughtSpell($q))
$this->pushBuffer(Type::SPELL, $_, SRC_QUEST, $q['side'], $q['qty'] > 1 ? 0 : Type::QUEST, $q['quest'], $areaParent[$q['zone']] ?? $q['zone']);
$this->pushBuffer(Type::SPELL, $_, SRC_QUEST, $q['side'], $q['qty'] > 1 ? 0 : Type::QUEST, $q['quest'], $areaParent[$q['zone']] ?? Game::$questSortFix[$q['zone']] ?? $q['zone']);
$this->pushBuffer(Type::ITEM, $iId, SRC_QUEST, $q['side'], $q['qty'] > 1 ? 0 : Type::QUEST, $q['quest'], $areaParent[$q['zone']] ?? $q['zone']);
$this->pushBuffer(Type::ITEM, $iId, SRC_QUEST, $q['side'], $q['qty'] > 1 ? 0 : Type::QUEST, $q['quest'], $areaParent[$q['zone']] ?? Game::$questSortFix[$q['zone']] ?? $q['zone']);
}
$mailLoot = DB::World()->select(
@@ -480,10 +480,10 @@ SqlGen::register(new class extends SetupScript
foreach ($this->refLoot[-$roi] as $iId => $r)
{
if ($_ = $this->taughtSpell($r))
$this->pushBuffer(Type::SPELL, $_, SRC_QUEST, $l['side'], $l['qty'] > 1 ? 0 : Type::QUEST, $l['entry'], $areaParent[$l['zone']] ?? $l['zone']);
$this->pushBuffer(Type::SPELL, $_, SRC_QUEST, $l['side'], $l['qty'] > 1 ? 0 : Type::QUEST, $l['entry'], $areaParent[$l['zone']] ?? Game::$questSortFix[$l['zone']] ?? $l['zone']);
$itemOT[] = $iId;
$this->pushBuffer(Type::ITEM, $iId, SRC_QUEST, $l['side'], $l['qty'] > 1 ? 0 : Type::QUEST, $l['entry'], $areaParent[$l['zone']] ?? $l['zone']);
$this->pushBuffer(Type::ITEM, $iId, SRC_QUEST, $l['side'], $l['qty'] > 1 ? 0 : Type::QUEST, $l['entry'], $areaParent[$l['zone']] ?? Game::$questSortFix[$l['zone']] ?? $l['zone']);
}
continue;
@@ -1011,7 +1011,7 @@ SqlGen::register(new class extends SetupScript
foreach ($qSpells as $sId => $spell)
for ($i = 1; $i <= 3; $i++)
if ($spell['effect'.$i.'Id'] == SPELL_EFFECT_LEARN_SPELL)
$this->pushBuffer(Type::SPELL, $spell['effect'.$i.'TriggerSpell'], SRC_QUEST, $quests[$sId]['side'], $quests[$sId]['qty'] > 1 ? 0 : Type::QUEST, $quests[$sId]['id'], $areaParent[$quests[$sId]['zone']] ?? $quests[$sId]['zone']);
$this->pushBuffer(Type::SPELL, $spell['effect'.$i.'TriggerSpell'], SRC_QUEST, $quests[$sId]['side'], $quests[$sId]['qty'] > 1 ? 0 : Type::QUEST, $quests[$sId]['id'], $areaParent[$quests[$sId]['zone']] ?? Game::$questSortFix[$quests[$sId]['zone']] ?? $quests[$sId]['zone']);
}
private function spellTrainer() : void
@@ -1134,7 +1134,7 @@ SqlGen::register(new class extends SetupScript
$areaParent = DB::Aowow()->selectCol('SELECT id AS ARRAY_KEY, parentArea FROM ?_zones WHERE id IN (?a) AND parentArea > 0', array_filter(array_column($quests, 'zone')));
foreach ($quests as $titleId => $q)
$this->pushBuffer(Type::TITLE, $titleId, SRC_QUEST, $q['side'], $q['qty'] > 1 ? 0 : Type::QUEST, $q['id'], $areaParent[$q['zone']] ?? $q['zone']);
$this->pushBuffer(Type::TITLE, $titleId, SRC_QUEST, $q['side'], $q['qty'] > 1 ? 0 : Type::QUEST, $q['id'], $areaParent[$q['zone']] ?? Game::$questSortFix[$q['zone']] ?? $q['zone']);
}
private function titleAchievement() : void

View File

@@ -21,7 +21,7 @@ SqlGen::register(new class extends SetupScript
'FROM creature c LEFT JOIN creature_addon ca ON ca.guid = c.guid',
'creature spawns', Type::NPC],
2 => ['SELECT c.guid, 2 AS "type", c.id AS typeId, ABS(c.spawntimesecs) AS respawn, c.phaseMask, c.zoneId AS areaId, c.map, 0 as pathId, c.position_y AS `posX`, c.position_x AS `posY` ' .
2 => ['SELECT c.guid, 2 AS "type", c.id AS typeId, c.spawntimesecs AS respawn, c.phaseMask, c.zoneId AS areaId, c.map, 0 as pathId, c.position_y AS `posX`, c.position_x AS `posY` ' .
'FROM gameobject c',
'gameobject spawns', Type::OBJECT],
@@ -133,7 +133,8 @@ SqlGen::register(new class extends SetupScript
// cannot be placed, but we know the instanced map and can thus at least assign a zone
if (!$points && !in_array($spawn['map'], [0, 1, 530, 571]) && $idx < 5)
{
$area = DB::Aowow()->selectCell('SELECT id FROM dbc_areatable WHERE mapId = ?d AND areaTable = 0', $spawn['map']);
// use server calculated areaId if possible
$area = $area ?: DB::Aowow()->selectCell('SELECT id FROM aowow_zones WHERE mapId = ?d AND parentArea = 0 AND (cuFlags & ?d) = 0', $spawn['map'], CUSTOM_EXCLUDE_FOR_LISTVIEW);
if (!$area)
{
CLI::write('tried to default GUID '.$spawn['guid'].' to instanced area by mapId, but returned empty [M:'.$spawn['map'].']', CLI::LOG_WARN);
@@ -149,13 +150,7 @@ SqlGen::register(new class extends SetupScript
continue;
}
else // if areaId is set, area was determined by TC .. we're fine .. mostly
{
// Black Temple and Sunwell floor offset bullshit
if (in_array($spawn['map'], [564, 580]))
$points[0]['floor']++;
$final = $area ? $points[0] : Game::checkCoords($points);
}
if ($idx < 5)
{

View File

@@ -0,0 +1,44 @@
-- undo sunken temple data
DELETE FROM aowow_setup_custom_data WHERE `command` = 'zones' AND `entry` IN (1477, 1417);
-- undo icc unused subzone linking (still has EXCLUDE_FOR_LISTVIEW set)
DELETE FROM aowow_setup_custom_data WHERE `command` = 'zones' AND `field` = 'parentAreaId' AND `value` = 4812;
-- undo Hellfire Citadel recategorization
DELETE FROM aowow_setup_custom_data WHERE `command` = 'quests' AND `field` = 'zoneOrSort' AND `entry` IN (9572, 9575, 11354, 9589, 9590, 9607, 9608, 11362, 9492, 9493, 9494, 9495, 9496, 9497, 9524, 9525, 11363, 11364);
INSERT INTO aowow_setup_custom_data VALUES
('zones', 1417, 'cuFlags', 1073741824, 'Sunken Temple [extra area on map 109] - set: CUSTOM_EXCLUDE_FOR_LISTVIEW'),
('zones', 22, 'cuFlags', 1073741824, 'Programmer Isle - set: CUSTOM_EXCLUDE_FOR_LISTVIEW'),
('zones', 151, 'cuFlags', 1073741824, 'Designer Island - set: CUSTOM_EXCLUDE_FOR_LISTVIEW'),
('zones', 3948, 'cuFlags', 1073741824, 'Brian and Pat Test - set: CUSTOM_EXCLUDE_FOR_LISTVIEW'),
('zones', 4019, 'cuFlags', 1073741824, 'Development Land - set: CUSTOM_EXCLUDE_FOR_LISTVIEW'),
('zones', 3605, 'cuFlags', 1073741824, 'Hyjal Past [extra area on map 560] - set: CUSTOM_EXCLUDE_FOR_LISTVIEW'),
('zones', 3535, 'cuFlags', 1073741824, 'Hellfire Citadel [extra area on map 540] - set: CUSTOM_EXCLUDE_FOR_LISTVIEW'),
-- move quests from generic Hellfire Citadel to...
-- ...Hellfire Ramparts [3562]
('quests', 9572, 'zoneOrSort', 3562, 'Weaken the Ramparts - category Hellfire Citadel -> Hellfire Ramparts'),
('quests', 9575, 'zoneOrSort', 3562, 'Weaken the Ramparts - category Hellfire Citadel -> Hellfire Ramparts'),
('quests', 11354, 'zoneOrSort', 3562, "Wanted: Nazan's Riding Crop - category Hellfire Citadel -> Hellfire Ramparts"),
-- ...The Blood Furnace [3713]
('quests', 9589, 'zoneOrSort', 3713, 'The Blood is Life - category Hellfire Citadel -> Blood Furnace'),
('quests', 9590, 'zoneOrSort', 3713, 'The Blood is Life - category Hellfire Citadel -> Blood Furnace'),
('quests', 9607, 'zoneOrSort', 3713, 'Heart of Rage - category Hellfire Citadel -> Blood Furnace'),
('quests', 9608, 'zoneOrSort', 3713, 'Heart of Rage - category Hellfire Citadel -> Blood Furnace'),
('quests', 11362, 'zoneOrSort', 3713, "Wanted: Keli'dan's Feathered Stave - category Hellfire Citadel -> Blood Furnace"),
-- ...The Shattered Halls [3714]
('quests', 9492, 'zoneOrSort', 3714, 'Turning the Tide - category Hellfire Citadel -> Shattered Halls'),
('quests', 9493, 'zoneOrSort', 3714, 'Pride of the Fel Horde - category Hellfire Citadel -> Shattered Halls'),
('quests', 9494, 'zoneOrSort', 3714, 'Fel Embers - category Hellfire Citadel -> Shattered Halls'),
('quests', 9495, 'zoneOrSort', 3714, 'The Will of the Warchief - category Hellfire Citadel -> Shattered Halls'),
('quests', 9496, 'zoneOrSort', 3714, 'Pride of the Fel Horde - category Hellfire Citadel -> Shattered Halls'),
('quests', 9497, 'zoneOrSort', 3714, 'Emblem of the Fel Horde - category Hellfire Citadel -> Shattered Halls'),
('quests', 9524, 'zoneOrSort', 3714, 'Imprisoned in the Citadel - category Hellfire Citadel -> Shattered Halls'),
('quests', 9525, 'zoneOrSort', 3714, 'Imprisoned in the Citadel - category Hellfire Citadel -> Shattered Halls'),
('quests', 11363, 'zoneOrSort', 3714, "Wanted: Bladefist's Seal - category Hellfire Citadel -> Shattered Halls"),
('quests', 11364, 'zoneOrSort', 3714, 'Wanted: Shattered Hand Centurions - category Hellfire Citadel -> Shattered Halls');
-- implement SpawnedByDefault
ALTER TABLE aowow_spawns
MODIFY COLUMN `respawn` int signed NOT NULL DEFAULT 0;
-- rebuild spawns
UPDATE aowow_dbversion
SET `sql` = CONCAT(IFNULL(`sql`, ''), ' spawns quests');

View File

@@ -427,7 +427,7 @@ var mn_quests = [
[1176, "Zul'Farrak"],
[1196, "Turm Utgarde"],
[1337, "Uldaman"],
[1417, "Versunkener Tempel"],
[1477, "Versunkener Tempel"],
[1581, "Die Todesminen"],
[1583, "Schwarzfelsspitze"],
[1584, "Schwarzfelstiefen"],
@@ -1593,7 +1593,7 @@ var g_quest_sorts = {
1196: 'Turm Utgarde',
1337: 'Uldaman',
1377: 'Silithus',
1417: 'Versunkener Tempel',
1477: 'Versunkener Tempel',
1497: 'Unterstadt',
1517: 'Uldaman',
1519: 'Sturmwind',

View File

@@ -427,7 +427,7 @@ var mn_quests = [
[1176, "Zul'Farrak"],
[1196, "Utgarde Pinnacle"],
[1337, "Uldaman"],
[1417, "Sunken Temple"],
[1477, "Sunken Temple"],
[1581, "The Deadmines"],
[1583, "Blackrock Spire"],
[1584, "Blackrock Depths"],
@@ -1640,7 +1640,7 @@ var g_quest_sorts = {
1196: 'Utgarde Pinnacle',
1337: 'Uldaman',
1377: 'Silithus',
1417: 'Sunken Temple',
1477: 'Sunken Temple',
1497: 'Undercity',
1517: 'Uldaman',
1519: 'Stormwind City',

View File

@@ -427,7 +427,7 @@ var mn_quests = [
[1176, "Zul'Farrak"],
[1196, "Pináculo de Utgarde"],
[1337, "Uldaman"],
[1417, "Templo Sumergido"],
[1477, "Templo Sumergido"],
[1581, "Las Minas de la Muerte"],
[1583, "Cumbre de Roca Negra"],
[1584, "Profundidades de Roca Negra"],
@@ -1593,7 +1593,7 @@ var g_quest_sorts = {
1196: 'Pináculo de Utgarde',
1337: 'Uldaman',
1377: 'Silithus',
1417: 'Templo Sumergido',
1477: 'Templo Sumergido',
1497: 'Entrañas',
1517: 'Uldaman',
1519: 'Ciudad de Ventormenta',

View File

@@ -427,7 +427,7 @@ var mn_quests = [
[1176, "Zul'Farrak"],
[1196, "Cime d'Utgarde"],
[1337, "Uldaman"],
[1417, "Temple englouti"],
[1477, "Temple englouti"],
[1581, "Les Mortemines"],
[1583, "Pic Rochenoire"],
[1584, "Profondeurs de Rochenoire"],
@@ -1593,7 +1593,7 @@ var g_quest_sorts = {
1196: 'Cime d\'Utgarde',
1337: 'Uldaman',
1377: 'Silithus',
1417: 'Temple englouti',
1477: 'Temple englouti',
1497: 'Fossoyeuse',
1517: 'Uldaman',
1519: 'Hurlevent',

View File

@@ -427,7 +427,7 @@ var mn_quests = [
[1176, "Зул'Фаррак"],
[1196, "Вершина Утгард"],
[1337, "Ульдаман"],
[1417, "Затонувший храм"],
[1477, "Затонувший храм"],
[1581, "Мертвые копи"],
[1583, "Пик Черной горы"],
[1584, "Глубины Черной горы"],
@@ -1593,7 +1593,7 @@ var g_quest_sorts = {
1196: 'Вершина Утгард',
1337: 'Ульдаман',
1377: 'Силитус',
1417: 'Затонувший храм',
1477: 'Затонувший храм',
1497: 'Подгород',
1517: 'Ульдаман',
1519: 'Штормград',

View File

@@ -427,7 +427,7 @@ var mn_quests = [
[1176,"祖尔法拉克"], // Zul'Farrak,
[1196,"乌特加德之巅"], // Utgarde Pinnacle,
[1337,"奥达曼"], // Uldaman,
[1417,"沉没的神庙"], // Sunken Temple
[1477,"沉没的神庙"], // Sunken Temple
[1581,"死亡矿井"], // The Deadmines,
[1583,"黑石塔"], // Blackrock Spire,
[1584,"黑石深渊"], // Blackrock Depths,
@@ -1639,7 +1639,7 @@ var g_quest_sorts = {
1196: '乌特加德之巅',
1337: '奥达曼',
1377: '希利苏斯',
1417: '沉没的神庙',
1477: '沉没的神庙',
1497: '幽暗城',
1517: '奥达曼',
1519: '暴风城',