diff --git a/localization/locale_dede.php b/localization/locale_dede.php
index a57f1dbc..010d7729 100644
--- a/localization/locale_dede.php
+++ b/localization/locale_dede.php
@@ -926,6 +926,51 @@ $lang = array(
'reqNumCrt' => "Benötigt",
'rfAvailable' => "Verfügbar auf Realm: ",
'_transfer' => 'Dieser Erfolg wird mit %s vertauscht, wenn Ihr zur %s wechselt.',
+ 'cat' => array(
+ 1 => "Statistiken", 21 => "Spieler gegen Spieler",
+ 81 => "Heldentaten", 92 => "Allgemein",
+ 95 => "Spieler gegen Spieler", 96 => "Quests",
+ 97 => "Erkundung", 122 => "Tode",
+ 123 => "Arenen", 124 => "Schlachtfelder",
+ 125 => "Dungeons", 126 => "Welt",
+ 127 => "Wiederbelebung", 128 => "Siege",
+ 130 => "Charakter", 131 => "Geselligkeit",
+ 132 => "Fertigkeiten", 133 => "Quests",
+ 134 => "Reise", 135 => "Kreaturen",
+ 136 => "Ehrenhafte Siege", 137 => "Todesstöße",
+ 140 => "Vermögen", 141 => "Kampf",
+ 145 => "Verbrauchsgüter", 147 => "Ruf",
+ 152 => "Gewertete Arenen", 153 => "Schlachtfelder",
+ 154 => "Welt", 155 => "Weltereignisse",
+ 156 => "Winterhauch", 158 => "Schlotternächte",
+ 159 => "Nobelgarten", 160 => "Mondfest",
+ 161 => "Sonnenwende", 162 => "Braufest",
+ 163 => "Kinderwoche", 165 => "Arena",
+ 168 => "Dungeon & Schlachtzug", 169 => "Berufe",
+ 170 => "Kochkunst", 171 => "Angeln",
+ 172 => "Erste Hilfe", 173 => "Berufe",
+ 178 => "Sekundäre Fertigkeiten", 187 => "Liebe liegt in der Luft",
+ 191 => "Ausrüstung", 201 => "Ruf",
+ 14777 => "Östliche Königreiche", 14778 => "Kalimdor",
+ 14779 => "Scherbenwelt", 14780 => "Nordend",
+ 14801 => "Alteractal", 14802 => "Arathibecken",
+ 14803 => "Auge des Sturms", 14804 => "Kriegshymnenschlucht",
+ 14805 => "The Burning Crusade", 14806 => "Wrath of the Lich King - Dungeons",
+ 14807 => "Dungeon & Schlachtzug", 14808 => "Classic",
+ 14821 => "Classic", 14822 => "The Burning Crusade",
+ 14823 => "Wrath of the Lich King", 14861 => "Classic",
+ 14862 => "The Burning Crusade", 14863 => "Wrath of the Lich King",
+ 14864 => "Classic", 14865 => "The Burning Crusade",
+ 14866 => "Wrath of the Lich King", 14881 => "Strand der Uralten",
+ 14901 => "Tausendwinter", 14921 => "Wrath of the Lich King - Heroische Dungeons",
+ 14922 => "Wrath of the Lich King - Schlachtzüge für 10 Spieler", 14923 => "Wrath of the Lich King - Schlachtzüge für 25 Spieler",
+ 14941 => "Argentumturnier", 14961 => "Geheimnisse von Ulduar - Schlachtzug für 10 Spieler",
+ 14962 => "Geheimnisse von Ulduar - Schlachtzug für 25 Spieler", 14963 => "Geheimnisse v. Ulduar",
+ 14981 => "Die Pilgerfreuden", 15001 => "Der Ruf des Kreuzzugs - Schlachtzug für 10 Spieler",
+ 15002 => "Der Ruf des Kreuzzugs - Schlachtzug für 25 Spieler", 15003 => "Insel der Eroberung",
+ 15021 => "Der Ruf des Kreuzzugs", 15041 => "Der Untergang des Lichkönigs - Schlachtzug für 10 Spieler",
+ 15042 => "Der Untergang des Lichkönigs - Schlachtzug für 25 Spieler", 15062 => "Der Untergang des Lichkönigs"
+ )
),
'chrClass' => array(
'notFound' => "Diese Klasse existiert nicht."
diff --git a/localization/locale_enus.php b/localization/locale_enus.php
index aab78605..b229831f 100644
--- a/localization/locale_enus.php
+++ b/localization/locale_enus.php
@@ -926,6 +926,51 @@ $lang = array(
'reqNumCrt' => "Requires",
'rfAvailable' => "Available on realm: ",
'_transfer' => 'This achievement will be converted to %s if you transfer to %s.',
+ 'cat' => array(
+ 1 => "Statistics", 21 => "Player vs. Player",
+ 81 => "Feats of Strength", 92 => "General",
+ 95 => "Player vs. Player", 96 => "Quests",
+ 97 => "Exploration", 122 => "Deaths",
+ 123 => "Arenas", 124 => "Battlegrounds",
+ 125 => "Dungeons", 126 => "World",
+ 127 => "Resurrection", 128 => "Kills",
+ 130 => "Character", 131 => "Social",
+ 132 => "Skills", 133 => "Quests",
+ 134 => "Travel", 135 => "Creatures",
+ 136 => "Honorable Kills", 137 => "Killing Blows",
+ 140 => "Wealth", 141 => "Combat",
+ 145 => "Consumables", 147 => "Reputation",
+ 152 => "Rated Arenas", 153 => "Battlegrounds",
+ 154 => "World", 155 => "World Events",
+ 156 => "Winter Veil", 158 => "Hallow's End",
+ 159 => "Noblegarden", 160 => "Lunar Festival",
+ 161 => "Midsummer", 162 => "Brewfest",
+ 163 => "Children's Week", 165 => "Arena",
+ 168 => "Dungeons & Raids", 169 => "Professions",
+ 170 => "Cooking", 171 => "Fishing",
+ 172 => "First Aid", 173 => "Professions",
+ 178 => "Secondary Skills", 187 => "Love is in the Air",
+ 191 => "Gear", 201 => "Reputation",
+ 14777 => "Eastern Kingdoms", 14778 => "Kalimdor",
+ 14779 => "Outland", 14780 => "Northrend",
+ 14801 => "Alterac Valley", 14802 => "Arathi Basin",
+ 14803 => "Eye of the Storm", 14804 => "Warsong Gulch",
+ 14805 => "The Burning Crusade", 14806 => "Lich King Dungeon",
+ 14807 => "Dungeons & Raids", 14808 => "Classic",
+ 14821 => "Classic", 14822 => "The Burning Crusade",
+ 14823 => "Wrath of the Lich King", 14861 => "Classic",
+ 14862 => "The Burning Crusade", 14863 => "Wrath of the Lich King",
+ 14864 => "Classic", 14865 => "The Burning Crusade",
+ 14866 => "Wrath of the Lich King", 14881 => "Strand of the Ancients",
+ 14901 => "Wintergrasp", 14921 => "Lich King Heroic",
+ 14922 => "Lich King 10-Player Raid", 14923 => "Lich King 25-Player Raid",
+ 14941 => "Argent Tournament", 14961 => "Secrets of Ulduar 10-Player Raid",
+ 14962 => "Secrets of Ulduar 25-Player Raid", 14963 => "Secrets of Ulduar",
+ 14981 => "Pilgrim's Bounty", 15001 => "Call of the Crusade 10-Player Raid",
+ 15002 => "Call of the Crusade 25-Player Raid", 15003 => "Isle of Conquest",
+ 15021 => "Call of the Crusade", 15041 => "Fall of the Lich King 10-Player Raid",
+ 15042 => "Fall of the Lich King 25-Player Raid", 15062 => "Fall of the Lich King"
+ )
),
'chrClass' => array(
'notFound' => "This class doesn't exist."
diff --git a/localization/locale_eses.php b/localization/locale_eses.php
index 59d20adb..1fce1068 100644
--- a/localization/locale_eses.php
+++ b/localization/locale_eses.php
@@ -926,6 +926,51 @@ $lang = array(
'reqNumCrt' => "Requiere",
'rfAvailable' => "Disponible en reino: ",
'_transfer' => 'Este logro será convertido a %s si lo transfieres a la %s.',
+ 'cat' => array(
+ 1 => "Estadísticas", 21 => "Jugador contra Jugador",
+ 81 => "Proezas de fuerza", 92 => "General",
+ 95 => "Jugador contra Jugador", 96 => "Misiones",
+ 97 => "Exploración", 122 => "Muertes",
+ 123 => "Arenas", 124 => "Campos de batalla",
+ 125 => "Mazmorras", 126 => "Mundo",
+ 127 => "Resurrección", 128 => "Víctimas",
+ 130 => "Personaje", 131 => "Social",
+ 132 => "Habilidades", 133 => "Misiones",
+ 134 => "Viajes", 135 => "Criaturas",
+ 136 => "Muertes con honor", 137 => "Golpes de gracia",
+ 140 => "Fortuna", 141 => "Combate",
+ 145 => "Consumibles", 147 => "Reputación",
+ 152 => "Arenas puntuadas", 153 => "Campos de batalla",
+ 154 => "Mundo", 155 => "Eventos del mundo",
+ 156 => "Festival de Invierno", 158 => "Halloween",
+ 159 => "Jardín Noble", 160 => "Festival Lunar",
+ 161 => "Solsticio", 162 => "Fiesta de la cerveza",
+ 163 => "Los Niños", 165 => "Arena",
+ 168 => "Mazmorras y bandas", 169 => "Profesiones",
+ 170 => "Cocina", 171 => "Pesca",
+ 172 => "Primeros auxilios", 173 => "Profesiones",
+ 178 => "Habilidades secundarias", 187 => "Amor en el aire",
+ 191 => "Equipamiento", 201 => "Reputación",
+ 14777 => "Reinos del Este", 14778 => "Kalimdor",
+ 14779 => "Terrallende", 14780 => "Rasganorte",
+ 14801 => "Valle de Alterac", 14802 => "Cuenca de Arathi",
+ 14803 => "Ojo de la Tormenta", 14804 => "G. Grito de Guerra",
+ 14805 => "The Burning Crusade", 14806 => "Lich King: Mazmorra",
+ 14807 => "Mazmorras y bandas", 14808 => "World of Warcraft",
+ 14821 => "World of Warcraft", 14822 => "The Burning Crusade",
+ 14823 => "Wrath of the Lich King", 14861 => "World of Warcraft",
+ 14862 => "The Burning Crusade", 14863 => "Wrath of the Lich King",
+ 14864 => "World of Warcraft", 14865 => "The Burning Crusade",
+ 14866 => "Wrath of the Lich King", 14881 => "Playa de los Ancestros",
+ 14901 => "Conquista del Invierno", 14921 => "Lich King: Heroico",
+ 14922 => "Lich King (10 j.)", 14923 => "Lich King (25 j.)",
+ 14941 => "Torneo Argenta", 14961 => "Ulduar (10 j.)",
+ 14962 => "Ulduar (25 j.)", 14963 => "Ulduar",
+ 14981 => "Generosidad", 15001 => "La Llamada (10 j.)",
+ 15002 => "La Llamada (25 j.)", 15003 => "Isla de la Conquista",
+ 15021 => "La Llamada de la Cruzada", 15041 => "La Caída (10 j.)",
+ 15042 => "La Caída (25 j.)", 15062 => "La caída del Rey Exánime"
+ )
),
'chrClass' => array(
'notFound' => "Esta clase no existe."
diff --git a/localization/locale_frfr.php b/localization/locale_frfr.php
index a5e44699..1d59d587 100644
--- a/localization/locale_frfr.php
+++ b/localization/locale_frfr.php
@@ -926,6 +926,51 @@ $lang = array(
'reqNumCrt' => "Nécessite",
'rfAvailable' => "Disponibles sur les royaumes : ",
'_transfer' => 'Cet haut fait sera converti en %s si vous transférez en %s.',
+ 'cat' => array(
+ 1 => "Statistiques", 21 => "Joueur contre Joueur",
+ 81 => "Tours de force", 92 => "Général",
+ 95 => "Joueur contre Joueur", 96 => "Quêtes",
+ 97 => "Exploration", 122 => "Morts",
+ 123 => "Arènes", 124 => "Champs de bataille",
+ 125 => "Donjons", 126 => "En extérieur",
+ 127 => "Résurrection", 128 => "Victimes",
+ 130 => "Personnage", 131 => "Social",
+ 132 => "Compétences", 133 => "Quêtes",
+ 134 => "Voyages", 135 => "Créatures",
+ 136 => "Victoires honorables", 137 => "Coups fatals",
+ 140 => "Richesse", 141 => "Combat",
+ 145 => "Consommables", 147 => "Réputation",
+ 152 => "Arènes cotées", 153 => "Champs de bataille",
+ 154 => "En extérieur", 155 => "Évènements mondiaux",
+ 156 => "Voile d'hiver", 158 => "Sanssaint",
+ 159 => "Jardin des nobles", 160 => "Fête lunaire",
+ 161 => "Solstice d'été", 162 => "Fête des Brasseurs",
+ 163 => "Semaine des enfants", 165 => "Arène",
+ 168 => "Donjons & raids", 169 => "Métiers",
+ 170 => "Cuisine", 171 => "Pêche",
+ 172 => "Secourisme", 173 => "Métiers",
+ 178 => "Compétences secondaires", 187 => "De l'amour dans l'air",
+ 191 => "Équipement", 201 => "Réputation",
+ 14777 => "Royaumes de l'est", 14778 => "Kalimdor",
+ 14779 => "Outreterre", 14780 => "Norfendre",
+ 14801 => "Vallée d'Alterac", 14802 => "Bassin d'Arathi",
+ 14803 => "Œil du cyclone", 14804 => "Goulet des Chanteguerres",
+ 14805 => "The Burning Crusade", 14806 => "Donjons de Wrath of the Lich King",
+ 14807 => "Donjons & raids", 14808 => "Classique",
+ 14821 => "Classique", 14822 => "The Burning Crusade",
+ 14823 => "Wrath of the Lich King", 14861 => "Classique",
+ 14862 => "The Burning Crusade", 14863 => "Wrath of the Lich King",
+ 14864 => "Classique", 14865 => "The Burning Crusade",
+ 14866 => "Wrath of the Lich King", 14881 => "Rivage des Anciens",
+ 14901 => "Joug-d'hiver", 14921 => "Donj. héro. de Lich King",
+ 14922 => "Raids à 10 de Lich King", 14923 => "Raids à 25 de Lich King",
+ 14941 => "Tournoi d'Argent", 14961 => "Secrets d'Ulduar, raid à 10",
+ 14962 => "Secrets d'Ulduar, raid à 25", 14963 => "Les secrets d'Ulduar",
+ 14981 => "Bienfaits du pèlerin", 15001 => "L'appel de la Croisade, raid à 10",
+ 15002 => "L'appel de la Croisade, raid à 25", 15003 => "L'île des Conquérants",
+ 15021 => "L'appel de la Croisade", 15041 => "La chute du roi-liche, raid à 10",
+ 15042 => "La chute du roi-liche, raid à 25", 15062 => "La chute du roi-liche"
+ )
),
'chrClass' => array(
'notFound' => "Cette classe n'existe pas."
diff --git a/localization/locale_ruru.php b/localization/locale_ruru.php
index d39ce759..1c4623ee 100644
--- a/localization/locale_ruru.php
+++ b/localization/locale_ruru.php
@@ -926,6 +926,51 @@ $lang = array(
'reqNumCrt' => "Требуется",
'rfAvailable' => "[Available on realm]: ",
'_transfer' => 'Этот предмет превратится в %s, если вы перейдете за %s.',
+ 'cat' => array(
+ 1 => "Статистика", 21 => "PvP",
+ 81 => "Великие подвиги", 92 => "Общее",
+ 95 => "PvP", 96 => "Задания",
+ 97 => "Исследование", 122 => "Смерти",
+ 123 => "Арена", 124 => "Поле боя",
+ 125 => "Подземелья", 126 => "Мир",
+ 127 => "Воскрешение", 128 => "Победы",
+ 130 => "Персонаж", 131 => "Общение",
+ 132 => "Навыки", 133 => "Задания",
+ 134 => "Путешествия", 135 => "Существа",
+ 136 => "Почетные победы", 137 => "Смертельные удары",
+ 140 => "Доходы", 141 => "Бой",
+ 145 => "Расход. предметы", 147 => "Репутация",
+ 152 => "Арены с ведением счета", 153 => "Поле боя",
+ 154 => "Мир", 155 => "Игровые события",
+ 156 => "Зимний Покров", 158 => "Тыквовин",
+ 159 => "Сад чудес", 160 => "Лунный фестиваль",
+ 161 => "Огненный солнцеворот", 162 => "Хмельной фестиваль",
+ 163 => "Детская неделя", 165 => "Арена",
+ 168 => "Подземелья и рейды", 169 => "Профессии",
+ 170 => "Кулинария", 171 => "Рыбная ловля",
+ 172 => "Первая помощь", 173 => "Профессии",
+ 178 => "Вспомогательные навыки", 187 => "Любовная лихорадка",
+ 191 => "Снаряжение", 201 => "Репутация",
+ 14777 => "Восточные королевства", 14778 => "Калимдор",
+ 14779 => "Запределье", 14780 => "Нордскол",
+ 14801 => "Альтеракская долина", 14802 => "Низина Арати",
+ 14803 => "Око Бури", 14804 => "Ущелье Песни Войны",
+ 14805 => "The Burning Crusade", 14806 => "Lich King (5)",
+ 14807 => "Подземелья и рейды", 14808 => "World of Warcraft",
+ 14821 => "World of Warcraft", 14822 => "The Burning Crusade",
+ 14823 => "Wrath of the Lich King", 14861 => "World of Warcraft",
+ 14862 => "The Burning Crusade", 14863 => "Wrath of the Lich King",
+ 14864 => "World of Warcraft", 14865 => "The Burning Crusade",
+ 14866 => "Wrath of the Lich King", 14881 => "Берег Древних",
+ 14901 => "Ледяные Оковы", 14921 => "Lich King (5, героич.)",
+ 14922 => "Lich King (10)", 14923 => "Lich King (25)",
+ 14941 => "Серебряный турнир", 14961 => "Тайны Ульдуара (10)",
+ 14962 => "Тайны Ульдуара (25)", 14963 => "Тайны Ульдуара",
+ 14981 => "Пиршество странников", 15001 => "Призыв Авангарда (10)",
+ 15002 => "Призыв Авангарда (25)", 15003 => "Остров Завоеваний",
+ 15021 => "Призыв Авангарда", 15041 => "Падение Короля-лича (10)",
+ 15042 => "Падение Короля-лича (25)", 15062 => "Падение Короля-лича"
+ )
),
'chrClass' => array(
'notFound' => "Такой класс не существует."
diff --git a/localization/locale_zhcn.php b/localization/locale_zhcn.php
index c0656a82..d8abb3b6 100644
--- a/localization/locale_zhcn.php
+++ b/localization/locale_zhcn.php
@@ -926,6 +926,51 @@ $lang = array(
'reqNumCrt' => "要求",
'rfAvailable' => "Available on realm: ",
'_transfer' => '这个成就将被转换到%s,如果你转移到%s。',
+ 'cat' => array(
+ 1 => "属性", 21 => "PvP",
+ 81 => "光辉事迹", 92 => "综合",
+ 95 => "PvP", 96 => "任务",
+ 97 => "探索", 122 => "死亡",
+ 123 => "竞技场", 124 => "战场",
+ 125 => "地下城", 126 => "世界",
+ 127 => "复活", 128 => "杀敌",
+ 130 => "角色", 131 => "社交",
+ 132 => "技能", 133 => "任务",
+ 134 => "旅行", 135 => "怪物",
+ 136 => "荣誉杀敌", 137 => "击杀",
+ 140 => "财富", 141 => "战斗",
+ 145 => "消耗品", 147 => "声望",
+ 152 => "竞技场积分赛", 153 => "战场",
+ 154 => "世界", 155 => "世界事件",
+ 156 => "冬幕节", 158 => "万圣节",
+ 159 => "复活节", 160 => "春节",
+ 161 => "仲夏节", 162 => "美酒节",
+ 163 => "儿童周", 165 => "竞技场",
+ 168 => "地下城和团队", 169 => "专业",
+ 170 => "烹饪", 171 => "钓鱼",
+ 172 => "急救", 173 => "专业",
+ 178 => "辅助技能", 187 => "情人节",
+ 191 => "装备", 201 => "声望",
+ 14777 => "东部王国", 14778 => "卡利姆多",
+ 14779 => "外域", 14780 => "诺森德",
+ 14801 => "奥特兰克山谷", 14802 => "阿拉希盆地",
+ 14803 => "风暴之眼", 14804 => "战歌峡谷",
+ 14805 => "燃烧的远征", 14806 => "巫妖王 - 地下城",
+ 14807 => "地下城与团队", 14808 => "经典旧世",
+ 14821 => "经典旧世", 14822 => "燃烧的远征",
+ 14823 => "巫妖王之怒", 14861 => "经典旧世",
+ 14862 => "燃烧的远征", 14863 => "巫妖王之怒",
+ 14864 => "经典旧世", 14865 => "燃烧的远征",
+ 14866 => "巫妖王之怒", 14881 => "远古海滩",
+ 14901 => "冬拥湖", 14921 => "巫妖王 - 英雄地下城",
+ 14922 => "巫妖王 - 10人团队", 14923 => "巫妖王 - 25人团队",
+ 14941 => "银色锦标赛", 14961 => "奥杜尔的秘密 - 10人团队",
+ 14962 => "奥杜尔的秘密 - 25人团队", 14963 => "奥杜尔的秘密",
+ 14981 => "感恩节", 15001 => "北伐的召唤 - 10人团队",
+ 15002 => "北伐的召唤 - 25人团队", 15003 => "征服之岛",
+ 15021 => "北伐的召唤", 15041 => "巫妖王的陨落 - 10人团队",
+ 15042 => "巫妖王的陨落 - 25人团队", 15062 => "巫妖王的陨落"
+ )
),
'chrClass' => array(
'notFound' => "这个职业不存在。"
diff --git a/pages/achievement.php b/pages/achievement.php
index d08e2838..21e3d3bb 100644
--- a/pages/achievement.php
+++ b/pages/achievement.php
@@ -60,7 +60,7 @@ class AchievementPage extends GenericPage
do
{
array_unshift($this->path, $curCat);
- $curCat = DB::Aowow()->SelectCell('SELECT parentCategory FROM ?_achievementcategory WHERE id = ?d', $curCat);
+ $curCat = DB::Aowow()->SelectCell('SELECT parentCat FROM ?_achievementcategory WHERE id = ?d', $curCat);
}
while ($curCat > 0);
diff --git a/pages/achievements.php b/pages/achievements.php
index ce65a26e..57c0fa77 100644
--- a/pages/achievements.php
+++ b/pages/achievements.php
@@ -76,16 +76,11 @@ class AchievementsPage extends GenericPage
$acvList = new AchievementList($conditions);
if (!$acvList->getMatches())
{
- $curCats = $catList = [!empty($this->category) ? (int)end($this->category) : 0];
- while ($curCats)
- {
- $curCats = DB::Aowow()->SelectCol('SELECT Id FROM ?_achievementcategory WHERE parentCategory IN (?a)', $curCats);
- $catList = array_merge($catList, $curCats);
- }
+ $category = [!empty($this->category) ? (int)end($this->category) : 0];
$conditions = [];
if ($fiCnd)
$conditions[] = $fiCnd;
- if ($catList)
+ if ($catList = DB::Aowow()->SelectCol('SELECT Id FROM ?_achievementcategory WHERE parentCat IN (?a) OR parentCat2 IN (?a) ', $category, $category))
$conditions[] = ['category', $catList];
$acvList = new AchievementList($conditions);
@@ -127,20 +122,14 @@ class AchievementsPage extends GenericPage
{
array_unshift($this->title, Util::ucFirst(Lang::game('achievements')));
if ($this->category)
- {
- $catrow = DB::Aowow()->SelectRow('SELECT * FROM ?_achievementcategory WHERE id = ?d', end($this->category));
- array_unshift($this->title, Util::localizedString($catrow, 'name'));
- }
+ array_unshift($this->title, Lang::achievement('cat', end($this->category)));
}
protected function generatePath()
{
if ($this->category)
- {
- $catrows = DB::Aowow()->SelectCol('SELECT id FROM ?_achievementcategory WHERE id IN (?a)', $this->category);
- foreach ($catrows as $cat)
+ foreach ($this->category as $cat)
$this->path[] = $cat;
- }
}
}
diff --git a/setup/db_structure.sql b/setup/db_structure.sql
index 127da389..aed53a63 100644
--- a/setup/db_structure.sql
+++ b/setup/db_structure.sql
@@ -270,16 +270,10 @@ DROP TABLE IF EXISTS `aowow_achievementcategory`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_achievementcategory` (
- `id` int(11) unsigned NOT NULL,
- `parentCategory` mediumint(9) NOT NULL,
- `name_loc0` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
- `name_loc2` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
- `name_loc3` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
- `name_loc4` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
- `name_loc6` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
- `name_loc8` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
- PRIMARY KEY (`id`),
- KEY `idx_achievement` (`parentCategory`)
+ `id` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `parentCat` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `parentCat2` smallint(5) unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -3138,7 +3132,7 @@ UNLOCK TABLES;
LOCK TABLES `aowow_dbversion` WRITE;
/*!40000 ALTER TABLE `aowow_dbversion` DISABLE KEYS */;
-INSERT INTO `aowow_dbversion` VALUES (1590687330,0,NULL,NULL);
+INSERT INTO `aowow_dbversion` VALUES (1591223186,0,NULL,NULL);
/*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */;
UNLOCK TABLES;
diff --git a/setup/tools/dbc.class.php b/setup/tools/dbc.class.php
index 59174abe..64200e70 100644
--- a/setup/tools/dbc.class.php
+++ b/setup/tools/dbc.class.php
@@ -42,7 +42,7 @@ class DBC
{
private $_formats = array( // locales block for copy pasta: sxsssxsxsxxxxxxxx | xxxxxxxxxxxxxxxxx
'achievement' => 'niiisxsssxsxsxxxxxxxxsxsssxsxsxxxxxxxxiiiiisxsssxsxsxxxxxxxxii',
- 'achievement_category' => 'nisxsssxsxsxxxxxxxxx',
+ 'achievement_category' => 'nixxxxxxxxxxxxxxxxxx',
'achievement_criteria' => 'niiiiiiiisxsssxsxsxxxxxxxxiixii',
'areatable' => 'niixixxiiixsxsssxsxsxxxxxxxxixxxxxxx',
'areatrigger' => 'niffxxxxxf',
@@ -100,6 +100,7 @@ class DBC
'overridespelldata' => 'niiiixixxxxx',
'powerdisplay' => 'nisbbb',
'questfactionreward' => 'niiiiiiiiii',
+ 'questsort' => 'nsxsssxsxsxxxxxxxx',
'questxp' => 'niiiiiiiiii',
'randproppoints' => 'niiiiiiiiiiiiiii',
'scalingstatdistribution' => 'niiiiiiiiiiiiiiiiiiiii',
@@ -144,7 +145,7 @@ class DBC
private $_fields = array(
'achievement' => 'id,faction,map,previous,name_loc0,name_loc2,name_loc3,name_loc4,name_loc6,name_loc8,description_loc0,description_loc2,description_loc3,description_loc4,description_loc6,description_loc8,category,points,orderInGroup,flags,iconId,reward_loc0,reward_loc2,reward_loc3,reward_loc4,reward_loc6,reward_loc8,reqCriteriaCount,refAchievement',
- 'achievement_category' => 'id,parentCategory,name_loc0,name_loc2,name_loc3,name_loc4,name_loc6,name_loc8',
+ 'achievement_category' => 'id,parentCategory',
'achievement_criteria' => 'id,refAchievementId,type,value1,value2,value3,value4,value5,value6,name_loc0,name_loc2,name_loc3,name_loc4,name_loc6,name_loc8,completionFlags,groupFlags,timeLimit,order',
'areatable' => 'id,mapId,areaTable,flags,soundAmbience,zoneMusic,zoneIntroMusic,name_loc0,name_loc2,name_loc3,name_loc4,name_loc6,name_loc8,factionGroupMask',
'areatrigger' => 'id,mapId,posY,posX,orientation',
@@ -202,6 +203,7 @@ class DBC
'overridespelldata' => 'id,spellId1,spellId2,spellId3,spellId4,spellId5',
'powerdisplay' => 'id,realType,globalString,r,g,b',
'questfactionreward' => 'id,field1,field2,field3,field4,field5,field6,field7,field8,field9,field10',
+ 'questsort' => 'id,name_loc0,name_loc2,name_loc3,name_loc4,name_loc6,name_loc8',
'questxp' => 'id,field1,field2,field3,field4,field5,field6,field7,field8,field9,field10',
'randproppoints' => 'id,epic1,epic2,epic3,epic4,epic5,rare1,rare2,rare3,rare4,rare5,uncommon1,uncommon2,uncommon3,uncommon4,uncommon5',
'scalingstatdistribution' => 'id,statMod1,statMod2,statMod3,statMod4,statMod5,statMod6,statMod7,statMod8,statMod9,statMod10,modifier1,modifier2,modifier3,modifier4,modifier5,modifier6,modifier7,modifier8,modifier9,modifier10,maxLevel',
diff --git a/setup/tools/filegen/profiler.func.php b/setup/tools/filegen/profiler.func.php
index d6f317e6..dd9b7403 100644
--- a/setup/tools/filegen/profiler.func.php
+++ b/setup/tools/filegen/profiler.func.php
@@ -313,7 +313,7 @@ if (!CLI)
if (!$buff)
{
// this behaviour is intended, do not create an error
- CLI::write('profiler - file datasets/'.User::$localeString.'/p-recipes-'.$file.' has no content => skipping', CLI::LOG_WARN);
+ CLI::write('profiler - file datasets/'.User::$localeString.'/p-recipes-'.$file.' has no content => skipping', CLI::LOG_INFO);
continue;
}
diff --git a/setup/tools/sqlGen.class.php b/setup/tools/sqlGen.class.php
index 4b1dbef0..522c6cd9 100644
--- a/setup/tools/sqlGen.class.php
+++ b/setup/tools/sqlGen.class.php
@@ -103,7 +103,7 @@ class SqlGen
self::$mode = $mode;
}
- public static function register(SetupScript $ssRef) : bool
+ public static function register(SetupScript $ssRef) : void
{
// if dependancies haven't been stored yet, put aside for later use
foreach ($ssRef->getDependancies(true) as $d)
@@ -112,13 +112,13 @@ class SqlGen
continue;
self::$tmpStore[] = $ssRef;
- return false;
+ return;
}
if (isset(self::$tables[$ssRef->getName()]))
{
CLI::write('a SetupScript named '.CLI::bold($ssRef->getName()).' was already registered. Skipping...', CLI::LOG_WARN);
- return false;
+ return;
}
self::$tables[$ssRef->getName()] = $ssRef;
@@ -142,8 +142,6 @@ class SqlGen
unset(self::$tmpStore[$idx]);
}
}
-
- return true;
}
private static function handleCLIOpts(&$doTbls) : void
diff --git a/setup/tools/sqlgen/achievement.func.php b/setup/tools/sqlgen/achievement.func.php
index fd1ad34a..5e1d5e9c 100644
--- a/setup/tools/sqlgen/achievement.func.php
+++ b/setup/tools/sqlgen/achievement.func.php
@@ -23,6 +23,21 @@ SqlGen::register(new class extends SetupScript
public function generate(array $ids = []) : bool
{
+ /**************/
+ /* categories */
+ /**************/
+
+ CLI::write(' - resolving categories');
+
+ DB::Aowow()->query('REPLACE INTO ?_achievementcategory SELECT ac.id, IFNULL(ac.parentcategory, 0), IFNULL(ac1.parentcategory, 0)
+ FROM dbc_achievement_category ac LEFT JOIN dbc_achievement_category ac1 ON ac1.id = ac.parentCategory');
+
+ /************/
+ /* dbc data */
+ /************/
+
+ CLI::write(' - basic dbc data');
+
DB::Aowow()->query('
REPLACE INTO
?_achievement
@@ -57,7 +72,13 @@ SqlGen::register(new class extends SetupScript
{ WHERE a.id IN (?a) }
', $ids ?: DBSIMPLE_SKIP);
- // serverside achievements
+
+ /*******************/
+ /* serverside data */
+ /*******************/
+
+ CLI::write(' - serverside achievement data');
+
$serverAchievements = DB::World()->select('SELECT ID, IF(requiredFaction = -1, 3, IF(requiredFaction = 0, 2, 1)) AS "faction", mapID, points, flags, count, refAchievement FROM achievement_dbc{ WHERE id IN (?a)}',
$ids ?: DBSIMPLE_SKIP
);
@@ -67,10 +88,13 @@ SqlGen::register(new class extends SetupScript
'Serverside - #'.$sa['ID'], 'Serverside - #'.$sa['ID'], 'Serverside - #'.$sa['ID'], 'Serverside - #'.$sa['ID'], 'Serverside - #'.$sa['ID'], 'Serverside - #'.$sa['ID']
);
- if ($ids)
- return true;
- // create chain of achievements
+ /********************************/
+ /* create chain of achievements */
+ /********************************/
+
+ CLI::write(' - linking achievements to chain');
+
$chainIdx = 0;
$parents = DB::Aowow()->selectCol('SELECT a.id FROM dbc_achievement a JOIN dbc_achievement b ON b.previous = a.id WHERE a.previous = 0');
foreach ($parents as $chainId => $next)
@@ -93,7 +117,13 @@ SqlGen::register(new class extends SetupScript
}
}
- // apply disables
+
+ /*********************/
+ /* applying disables */
+ /*********************/
+
+ CLI::write(' - disabling disabled achievements from table disables');
+
if ($criteria = DB::World()->selectCol('SELECT entry FROM disables WHERE sourceType = 4'))
DB::Aowow()->query('UPDATE aowow_achievement a JOIN aowow_achievementcriteria ac ON a.id = ac.refAchievementId SET a.cuFlags = ?d WHERE ac.id IN (?a)', CUSTOM_DISABLED, $criteria);
diff --git a/setup/tools/sqlgen/achievementcategory.func.php b/setup/tools/sqlgen/achievementcategory.func.php
deleted file mode 100644
index c79e6bcf..00000000
--- a/setup/tools/sqlgen/achievementcategory.func.php
+++ /dev/null
@@ -1,18 +0,0 @@
-
diff --git a/setup/updates/1591223185_01.sql b/setup/updates/1591223185_01.sql
new file mode 100644
index 00000000..24ba29c2
--- /dev/null
+++ b/setup/updates/1591223185_01.sql
@@ -0,0 +1,9 @@
+DROP TABLE IF EXISTS `aowow_achievementcategory`;
+CREATE TABLE `aowow_achievementcategory` (
+ `id` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `parentCat` smallint(5) unsigned NOT NULL DEFAULT '0',
+ `parentCat2` smallint(5) unsigned NOT NULL DEFAULT '0',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+UPDATE aowow_dbversion SET `sql` = CONCAT(IFNULL(`sql`, ''), ' achievements');