From dca432abfd5d8b6996458e275221068ab39cf0f0 Mon Sep 17 00:00:00 2001 From: Pinya <800pin.ru@gmail.com> Date: Thu, 14 Dec 2017 20:38:18 +0300 Subject: [PATCH] fixed to work with Lua 5.0 --- !Compatibility/api/wowAPI.lua | 6 +- !Compatibility/libs/LibBabble-3.0.lua | 4 +- !Compatibility/libs/LibBabble-Class-3.0.lua | 22 +- !Compatibility/libs/LibBabble-Zone-3.0.lua | 698 +------------------- !Compatibility/libs/LibStub.lua | 2 +- !DebugTools/Blizzard_DebugTools.lua | 25 +- !DebugTools/Blizzard_DebugTools.xml | 70 +- !DebugTools/Compatibility.lua | 20 +- 8 files changed, 70 insertions(+), 777 deletions(-) diff --git a/!Compatibility/api/wowAPI.lua b/!Compatibility/api/wowAPI.lua index 9af1bfc..28c40d5 100644 --- a/!Compatibility/api/wowAPI.lua +++ b/!Compatibility/api/wowAPI.lua @@ -5,6 +5,7 @@ local pairs = pairs local tonumber = tonumber local type = type local format, gsub, lower, match, upper = string.format, string.gsub, string.lower, string.match, string.upper +local getn = table.getn --WoW API local GetCurrentDungeonDifficulty = GetCurrentDungeonDifficulty local GetQuestGreenRange = GetQuestGreenRange @@ -33,7 +34,7 @@ CLASS_SORT_ORDER = { "WARLOCK", "HUNTER" } -MAX_CLASSES = #CLASS_SORT_ORDER +MAX_CLASSES = getn(CLASS_SORT_ORDER) LOCALIZED_CLASS_NAMES_MALE = {} LOCALIZED_CLASS_NAMES_FEMALE = {} @@ -104,7 +105,7 @@ function FillLocalizedClassList(tab, female) if female then tab[engClass] = LBC[engClass] else - tab[engClass] = LBC[engClass:lower():gsub("^%l", upper)] + tab[engClass] = LBC[gsub(lower(engClass), "^%l", upper)] end end @@ -290,7 +291,6 @@ function GetThreatStatusColor(statusIndex) return threatColors[statusIndex][1], threatColors[statusIndex][2], threatColors[statusIndex][3] end - function GetThreatStatus(currentThreat, maxThreat) assert(type(currentThreat) == "number" and type(maxThreat) == "number", "Usage: GetThreatStatus(currentThreat, maxThreat)") diff --git a/!Compatibility/libs/LibBabble-3.0.lua b/!Compatibility/libs/LibBabble-3.0.lua index d9003a6..1237228 100644 --- a/!Compatibility/libs/LibBabble-3.0.lua +++ b/!Compatibility/libs/LibBabble-3.0.lua @@ -44,11 +44,11 @@ local lookup_mt = { __index = function(self, key) real_MAJOR_VERSION = LIBBABBLE_MAJOR end if base_key then - warn(("%s: Translation %q not found for locale %q"):format(real_MAJOR_VERSION, key, GetLocale())) + warn(string.format("%s: Translation %q not found for locale %q", real_MAJOR_VERSION, key, GetLocale())) rawset(self, key, base_key) return base_key end - warn(("%s: Translation %q not found."):format(real_MAJOR_VERSION, key)) + warn(string.format("%s: Translation %q not found.", real_MAJOR_VERSION, key)) rawset(self, key, key) return key end } diff --git a/!Compatibility/libs/LibBabble-Class-3.0.lua b/!Compatibility/libs/LibBabble-Class-3.0.lua index cfb5ec1..d26db4f 100644 --- a/!Compatibility/libs/LibBabble-Class-3.0.lua +++ b/!Compatibility/libs/LibBabble-Class-3.0.lua @@ -8,7 +8,7 @@ License: MIT ]] local MAJOR_VERSION = "LibBabble-Class-3.0" -local MINOR_VERSION = 90000 + tonumber(("$Revision: 50 $"):match("%d+")) +local MINOR_VERSION = 90000 + tonumber(string.match("$Revision: 50 $", "%d+")) if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end local lib = LibStub("LibBabble-3.0"):New(MAJOR_VERSION, MINOR_VERSION) @@ -26,7 +26,6 @@ lib:SetBaseTranslations { Paladin = true, Shaman = true, Rogue = true, - Deathknight = "Death Knight", WARLOCK = true, WARRIOR = true, @@ -37,7 +36,6 @@ lib:SetBaseTranslations { PALADIN = true, SHAMAN = true, ROGUE = true, - DEATHKNIGHT = "Death Knight", } if GAME_LOCALE == "enUS" then @@ -53,7 +51,6 @@ elseif GAME_LOCALE == "deDE" then ["Paladin"] = "Paladin", ["Shaman"] = "Schamane", ["Rogue"] = "Schurke", - ["Deathknight"] = "Todesritter", ["WARLOCK"] = "Hexenmeisterin", ["WARRIOR"] = "Kriegerin", @@ -64,7 +61,6 @@ elseif GAME_LOCALE == "deDE" then ["PALADIN"] = "Paladin", ["SHAMAN"] = "Schamanin", ["ROGUE"] = "Schurkin", - ["DEATHKNIGHT"] = "Todesritter", } elseif GAME_LOCALE == "frFR" then lib:SetCurrentTranslations { @@ -77,7 +73,6 @@ elseif GAME_LOCALE == "frFR" then ["Paladin"] = "Paladin", ["Shaman"] = "Chaman", ["Rogue"] = "Voleur", - ["Deathknight"] = "Chevalier de la mort", ["WARLOCK"] = "Démoniste", ["WARRIOR"] = "Guerrière", @@ -88,7 +83,6 @@ elseif GAME_LOCALE == "frFR" then ["PALADIN"] = "Paladin", ["SHAMAN"] = "Chamane", ["ROGUE"] = "Voleuse", - ["DEATHKNIGHT"] = "Chevalier de la mort", } elseif GAME_LOCALE == "zhCN" then lib:SetCurrentTranslations { @@ -101,7 +95,6 @@ elseif GAME_LOCALE == "zhCN" then ["Paladin"] = "圣骑士", ["Shaman"] = "萨满祭司", ["Rogue"] = "潜行者", - ["Deathknight"] = "死亡骑士", ["WARLOCK"] = "术士", ["WARRIOR"] = "战士", @@ -112,7 +105,6 @@ elseif GAME_LOCALE == "zhCN" then ["PALADIN"] = "圣骑士", ["SHAMAN"] = "萨满祭司", ["ROGUE"] = "潜行者", - ["DEATHKNIGHT"] = "死亡骑士", } elseif GAME_LOCALE == "zhTW" then lib:SetCurrentTranslations { @@ -125,7 +117,6 @@ elseif GAME_LOCALE == "zhTW" then ["Paladin"] = "聖騎士", ["Shaman"] = "薩滿", ["Rogue"] = "盜賊", - ["Deathknight"] = "死亡騎士", ["WARLOCK"] = "術士", ["WARRIOR"] = "戰士", @@ -136,7 +127,6 @@ elseif GAME_LOCALE == "zhTW" then ["PALADIN"] = "聖騎士", ["SHAMAN"] = "薩滿", ["ROGUE"] = "盜賊", - ["DEATHKNIGHT"] = "死亡騎士", } elseif GAME_LOCALE == "koKR" then lib:SetCurrentTranslations { @@ -149,7 +139,6 @@ elseif GAME_LOCALE == "koKR" then ["Paladin"] = "성기사", ["Shaman"] = "주술사", ["Rogue"] = "도적", - ["Deathknight"] = "죽음의 기사", ["WARLOCK"] = "흑마법사", ["WARRIOR"] = "전사", @@ -160,7 +149,6 @@ elseif GAME_LOCALE == "koKR" then ["PALADIN"] = "성기사", ["SHAMAN"] = "주술사", ["ROGUE"] = "도적", - ["DEATHKNIGHT"] = "죽음의 기사", } elseif GAME_LOCALE == "esES" then lib:SetCurrentTranslations { @@ -173,7 +161,6 @@ elseif GAME_LOCALE == "esES" then ["Paladin"] = "Paladín", ["Shaman"] = "Chamán", ["Rogue"] = "Pícaro", - ["Deathknight"] = "Caballero de la muerte", ["WARLOCK"] = "Bruja", ["WARRIOR"] = "Guerrera", @@ -184,7 +171,6 @@ elseif GAME_LOCALE == "esES" then ["PALADIN"] = "Paladín", ["SHAMAN"] = "Chamán", ["ROGUE"] = "Pícara", - ["Deathknight"] = "Caballero de la muerte", } elseif GAME_LOCALE == "esMX" then lib:SetCurrentTranslations { @@ -197,7 +183,6 @@ elseif GAME_LOCALE == "esMX" then ["Paladin"] = "Paladín", ["Shaman"] = "Chamán", ["Rogue"] = "Pícaro", - ["Deathknight"] = "Caballero de la muerte", ["WARLOCK"] = "Bruja", ["WARRIOR"] = "Guerrera", @@ -208,7 +193,6 @@ elseif GAME_LOCALE == "esMX" then ["PALADIN"] = "Paladín", ["SHAMAN"] = "Chamán", ["ROGUE"] = "Pícara", - ["Deathknight"] = "Caballero de la muerte", } elseif GAME_LOCALE == "ruRU" then lib:SetCurrentTranslations { @@ -221,7 +205,6 @@ elseif GAME_LOCALE == "ruRU" then ["Paladin"] = "Паладин", ["Shaman"] = "Шаман", ["Rogue"] = "Разбойник", - ["Deathknight"] = "Рыцарь смерти", ["WARLOCK"] = "Чернокнижница", ["WARRIOR"] = "Воин", @@ -232,8 +215,7 @@ elseif GAME_LOCALE == "ruRU" then ["PALADIN"] = "Паладин", ["SHAMAN"] = "Шаманка", ["ROGUE"] = "Разбойница", - ["DEATHKNIGHT"] = "Рыцарь смерти", } else - error(("%s: Locale %q not supported"):format(MAJOR_VERSION, GAME_LOCALE)) + error(string.format("%s: Locale %q not supported", MAJOR_VERSION, GAME_LOCALE)) end \ No newline at end of file diff --git a/!Compatibility/libs/LibBabble-Zone-3.0.lua b/!Compatibility/libs/LibBabble-Zone-3.0.lua index a3afa1e..745fcbb 100644 --- a/!Compatibility/libs/LibBabble-Zone-3.0.lua +++ b/!Compatibility/libs/LibBabble-Zone-3.0.lua @@ -8,7 +8,8 @@ License: MIT ]] local MAJOR_VERSION = "LibBabble-Zone-3.0" -local MINOR_VERSION = 90000 + tonumber(("$Revision: 107 $"):match("%d+")) +--local MINOR_VERSION = 90000 + tonumber(("$Revision: 107 $"):match("%d+")) +local MINOR_VERSION = 90000 + tonumber(string.match("$Revision: 107 $", "%d+")) if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end local lib = LibStub("LibBabble-3.0"):New(MAJOR_VERSION, MINOR_VERSION) @@ -135,83 +136,6 @@ lib:SetBaseTranslations { ["Library"] = true, ["Cathedral"] = true, ["Graveyard"] = true, - - -- Burning Crusade - - -- Subzones used for displaying instances. - ["Plaguewood"] = true, - ["Hellfire Citadel"] = true, - ["Auchindoun"] = true, - ["The Bone Wastes"] = true, -- Substitute for Auchindoun, since this is what shows on the minimap. - ["Ring of Observance"] = true, - ["Coilfang Reservoir"] = true, - ["Amani Pass"] = true, - - ["Azuremyst Isle"] = true, - ["Bloodmyst Isle"] = true, - ["Eversong Woods"] = true, - ["Ghostlands"] = true, - ["The Exodar"] = true, - ["Silvermoon City"] = true, - ["Shadowmoon Valley"] = true, - ["Black Temple"] = true, - ["Terokkar Forest"] = true, - ["Auchenai Crypts"] = true, - ["Mana-Tombs"] = true, - ["Shadow Labyrinth"] = true, - ["Sethekk Halls"] = true, - ["Hellfire Peninsula"] = true, - ["The Dark Portal"] = true, - ["Hellfire Ramparts"] = true, - ["The Blood Furnace"] = true, - ["The Shattered Halls"] = true, - ["Magtheridon's Lair"] = true, - ["Nagrand"] = true, - ["Zangarmarsh"] = true, - ["The Slave Pens"] = true, - ["The Underbog"] = true, - ["The Steamvault"] = true, - ["Serpentshrine Cavern"] = true, - ["Blade's Edge Mountains"] = true, - ["Gruul's Lair"] = true, - ["Netherstorm"] = true, - ["Tempest Keep"] = true, - ["The Mechanar"] = true, - ["The Botanica"] = true, - ["The Arcatraz"] = true, - ["The Eye"] = true, - ["Eye of the Storm"] = true, - ["Shattrath City"] = true, - ["Shattrath"] = true, - ["Karazhan"] = true, - ["Caverns of Time"] = true, - ["Old Hillsbrad Foothills"] = true, - ["The Black Morass"] = true, - ["Night Elf Village"] = true, - ["Horde Encampment"] = true, - ["Alliance Base"] = true, - ["Zul'Aman"] = true, - ["Quel'thalas"] = true, - ["Isle of Quel'Danas"] = true, - ["Sunwell Plateau"] = true, - ["Magisters' Terrace"] = true, - - -- Blade's Edge Plateau - ["Forge Camp: Terror"] = true, - ["Vortex Pinnacle"] = true, - ["Rivendark's Perch"] = true, - ["Ogri'la"] = true, - ["Obsidia's Perch"] = true, - ["Skyguard Outpost"] = true, - ["Shartuul's Transporter"] = true, - ["Forge Camp: Wrath"] = true, - ["Bash'ir Landing"] = true, - ["Crystal Spine"] = true, - ["Insidion's Perch"] = true, - ["Furywing's Perch"] = true, - - ["Tirisfal"] = true, - ["Sunken Temple"] = true, } if GAME_LOCALE == "enUS" then @@ -336,83 +260,6 @@ elseif GAME_LOCALE == "deDE" then ["Library"] = "Bibliothek", ["Cathedral"] = "Kathedrale", ["Graveyard"] = "Friedhof", - - -- Burning Crusade - - -- Subzones used for displaying instances. - ["Plaguewood"] = "Seuchenwald", - ["Hellfire Citadel"] = "Höllenfeuerzitadelle", - ["Auchindoun"] = "Auchindoun", - ["The Bone Wastes"] = "Die Knochenwüste", -- Substitute for Auchindoun, since this is what shows on the minimap. - ["Ring of Observance"] = "Ring der Beobachtung", - ["Coilfang Reservoir"] = "Der Echsenkessel", - ["Amani Pass"] = "Amanipass", - - ["Azuremyst Isle"] = "Azurmythosinsel", - ["Bloodmyst Isle"] = "Blutmythosinsel", - ["Eversong Woods"] = "Immersangwald", - ["Ghostlands"] = "Geisterlande", - ["The Exodar"] = "Die Exodar", - ["Silvermoon City"] = "Silbermond", - ["Shadowmoon Valley"] = "Schattenmondtal", - ["Black Temple"] = "Der Schwarze Tempel", - ["Terokkar Forest"] = "Wälder von Terokkar", - ["Auchenai Crypts"] = "Auchenaikrypta", - ["Mana-Tombs"] = "Managruft", - ["Shadow Labyrinth"] = "Schattenlabyrinth", - ["Sethekk Halls"] = "Sethekkhallen", - ["Hellfire Peninsula"] = "Höllenfeuerhalbinsel", - ["The Dark Portal"] = "Das Dunkle Portal", - ["Hellfire Ramparts"] = "Höllenfeuerbollwerk", - ["The Blood Furnace"] = "Der Blutkessel", - ["The Shattered Halls"] = "Die zerschmetterten Hallen", - ["Magtheridon's Lair"] = "Magtheridons Kammer", - ["Nagrand"] = "Nagrand", - ["Zangarmarsh"] = "Zangarmarschen", - ["The Slave Pens"] = "Die Sklavenunterkünfte", - ["The Underbog"] = "Der Tiefensumpf", - ["The Steamvault"] = "Die Dampfkammer", - ["Serpentshrine Cavern"] = "Höhle des Schlangenschreins", - ["Blade's Edge Mountains"] = "Schergrat", - ["Gruul's Lair"] = "Gruuls Unterschlupf", - ["Netherstorm"] = "Nethersturm", - ["Tempest Keep"] = "Festung der Stürme", - ["The Mechanar"] = "Die Mechanar", - ["The Botanica"] = "Die Botanika", - ["The Arcatraz"] = "Die Arkatraz", - ["The Eye"] = "Das Auge", - ["Eye of the Storm"] = "Auge des Sturms", - ["Shattrath City"] = "Shattrath", - ["Shattrath"] = "Shattrath", - ["Karazhan"] = "Karazhan", - ["Caverns of Time"] = "Die Höhlen der Zeit", - ["Old Hillsbrad Foothills"] = "Vorgebirge des Alten Hügellands", - ["The Black Morass"] = "Der schwarze Morast", - ["Night Elf Village"] = "Nachtelfen Dorf", - ["Horde Encampment"] = "Lager der Horde", - ["Alliance Base"] = "Basis der Allianz", - ["Zul'Aman"] = "Zul'Aman", - ["Quel'thalas"] = "Quel'Thalas", - ["Isle of Quel'Danas"] = "Insel von Quel'Danas", - ["Sunwell Plateau"] = "Sonnenbrunnenplateau", - ["Magisters' Terrace"] = "Terrasse der Magister", - - -- Blade's Edge Plateau - ["Forge Camp: Terror"] = "", - ["Vortex Pinnacle"] = "", - ["Rivendark's Perch"] = "", - ["Ogri'la"] = "", - ["Obsidia's Perch"] = "", - ["Skyguard Outpost"] = "", - ["Shartuul's Transporter"] = "", - ["Forge Camp: Wrath"] = "", - ["Bash'ir Landing"] = "", - ["Crystal Spine"] = "", - ["Insidion's Perch"] = "", - ["Furywing's Perch"] = "", - - ["Tirisfal"] = "Tirisfal", - ["Sunken Temple"] = "Versunkener Tempel", } elseif GAME_LOCALE == "frFR" then lib:SetCurrentTranslations { @@ -534,83 +381,6 @@ elseif GAME_LOCALE == "frFR" then ["Library"] = "Bibliothèque", ["Cathedral"] = "Cathédrale", ["Graveyard"] = "Cimetière", - - -- Burning Crusade - - -- Subzones used for displaying instances. - ["Plaguewood"] = "Pestebois", - ["Hellfire Citadel"] = "Citadelle des Flammes infernales", - ["Auchindoun"] = "Auchindoun", - ["The Bone Wastes"] = "Le désert des Ossements", -- Substitute for Auchindoun, since this is what shows on the minimap. - ["Ring of Observance"] = "Cercle d'observance", - ["Coilfang Reservoir"] = "Réservoir de Glissecroc", - ["Amani Pass"] = "Passage des Amani", - - ["Azuremyst Isle"] = "Ile de Brume-azur", - ["Bloodmyst Isle"] = "Ile de Brume-sang", - ["Eversong Woods"] = "Bois des Chants éternels", - ["Ghostlands"] = "Les Terres fantômes", - ["The Exodar"] = "L'Exodar", - ["Silvermoon City"] = "Lune-d'argent", - ["Shadowmoon Valley"] = "Vallée d'Ombrelune", - ["Black Temple"] = "Temple noir", - ["Terokkar Forest"] = "Forêt de Terokkar", - ["Auchenai Crypts"] = "Cryptes Auchenaï", - ["Mana-Tombs"] = "Tombes-mana", - ["Shadow Labyrinth"] = "Labyrinthe des ombres", - ["Sethekk Halls"] = "Les salles des Sethekk", - ["Hellfire Peninsula"] = "Péninsule des Flammes infernales", - ["The Dark Portal"] = "La Porte des ténèbres", - ["Hellfire Ramparts"] = "Remparts des Flammes infernales", - ["The Blood Furnace"] = "La Fournaise du sang", - ["The Shattered Halls"] = "Les Salles brisées", - ["Magtheridon's Lair"] = "Le repaire de Magtheridon", - ["Nagrand"] = "Nagrand", - ["Zangarmarsh"] = "Marécage de Zangar", - ["The Slave Pens"] = "Les enclos aux esclaves", - ["The Underbog"] = "La Basse-tourbière", - ["The Steamvault"] = "Le Caveau de la vapeur", - ["Serpentshrine Cavern"] = "Caverne du sanctuaire du Serpent", - ["Blade's Edge Mountains"] = "Les Tranchantes", - ["Gruul's Lair"] = "Repaire de Gruul", - ["Netherstorm"] = "Raz-de-Néant", - ["Tempest Keep"] = "Donjon de la Tempête", - ["The Mechanar"] = "Le Méchanar", - ["The Botanica"] = "La Botanica", - ["The Arcatraz"] = "L'Arcatraz", - ["The Eye"] = "L'Œil", - ["Eye of the Storm"] = "L'Œil du cyclone", - ["Shattrath City"] = "Shattrath", - ["Shattrath"] = "Shattrath", - ["Karazhan"] = "Karazhan", - ["Caverns of Time"] = "Grottes du temps", - ["Old Hillsbrad Foothills"] = "Contreforts de Hautebrande d'antan", - ["The Black Morass"] = "Le Noir Marécage", - ["Night Elf Village"] = "Village elfe de la nuit", - ["Horde Encampment"] = "Campement de la Horde", - ["Alliance Base"] = "Base de l'Alliance", - ["Zul'Aman"] = "Zul'Aman", - ["Quel'thalas"] = "Quel'thalas", - ["Isle of Quel'Danas"] = "Île de Quel'Danas", - ["Sunwell Plateau"] = "Plateau du Puits de soleil", - ["Magisters' Terrace"] = "Terrasse des Magistères", - - -- Blade's Edge Plateau - ["Forge Camp: Terror"] = "Camp de forge : Terreur", - ["Vortex Pinnacle"] = "Cime du vortex", - ["Rivendark's Perch"] = "Perchoir de Clivenuit", - ["Ogri'la"] = "Ogri'la", - ["Obsidia's Perch"] = "Perchoir d'Obsidia", - ["Skyguard Outpost"] = "Avant-poste de la Garde-ciel", - ["Shartuul's Transporter"] = "Transporteur de Shartuul", - ["Forge Camp: Wrath"] = "Camp de forge : Courroux", - ["Bash'ir Landing"] = "Point d'ancrage de Bash'ir", - ["Crystal Spine"] = "Éperon de cristal", - ["Insidion's Perch"] = "Perchoir d'Insidion", - ["Furywing's Perch"] = "Perchoir d'Aile-furie", - - ["Tirisfal"] = "Tirisfal", - ["Sunken Temple"] = "Temple englouti", } elseif GAME_LOCALE == "zhCN" then lib:SetCurrentTranslations { @@ -732,83 +502,6 @@ elseif GAME_LOCALE == "zhCN" then ["Library"] = "图书馆", ["Cathedral"] = "教堂", ["Graveyard"] = "墓地", - - -- Burning Crusade - - -- Subzones used for displaying instances. - ["Plaguewood"] = "病木林", - ["Hellfire Citadel"] = "地狱火堡垒", - ["Auchindoun"] = "奥金顿", - ["The Bone Wastes"] = "白骨荒野", - ["Ring of Observance"] = "仪式广场", - ["Coilfang Reservoir"] = "盘牙水库", - ["Amani Pass"] = "阿曼尼小径", - - ["Azuremyst Isle"] = "秘蓝岛", - ["Bloodmyst Isle"] = "秘血岛", - ["Eversong Woods"] = "永歌森林", - ["Ghostlands"] = "幽魂之地", - ["The Exodar"] = "埃索达", - ["Silvermoon City"] = "银月城", - ["Shadowmoon Valley"] = "影月谷", - ["Black Temple"] = "黑暗神殿", - ["Terokkar Forest"] = "泰罗卡森林", - ["Auchenai Crypts"] = "奥金尼地穴", - ["Mana-Tombs"] = "法力陵墓", - ["Shadow Labyrinth"] = "暗影迷宫", - ["Sethekk Halls"] = "塞泰克大厅", - ["Hellfire Peninsula"] = "地狱火半岛", - ["The Dark Portal"] = "黑暗之门", - ["Hellfire Ramparts"] = "地狱火城墙", - ["The Blood Furnace"] = "鲜血熔炉", - ["The Shattered Halls"] = "破碎大厅", - ["Magtheridon's Lair"] = "玛瑟里顿的巢穴", - ["Nagrand"] = "纳格兰", - ["Zangarmarsh"] = "赞加沼泽", - ["The Slave Pens"] = "奴隶围栏", - ["The Underbog"] = "幽暗沼泽", - ["The Steamvault"] = "蒸汽地窟", - ["Serpentshrine Cavern"] = "毒蛇神殿", - ["Blade's Edge Mountains"] = "刀锋山", - ["Gruul's Lair"] = "格鲁尔的巢穴", - ["Netherstorm"] = "虚空风暴", - ["Tempest Keep"] = "风暴要塞", - ["The Mechanar"] = "能源舰", - ["The Botanica"] = "生态船", - ["The Arcatraz"] = "禁魔监狱", - ["The Eye"] = "风暴要塞", - ["Eye of the Storm"] = "风暴之眼", - ["Shattrath City"] = "沙塔斯城", - ["Shattrath"] = "沙塔斯",--TaxiNodesDBC - ["Karazhan"] = "卡拉赞", - ["Caverns of Time"] = "时光之穴", - ["Old Hillsbrad Foothills"] = "旧希尔斯布莱德丘陵", - ["The Black Morass"] = "黑色沼泽", - ["Night Elf Village"] = "暗夜精灵村庄", - ["Horde Encampment"] = "部落营地", - ["Alliance Base"] = "联盟基地", - ["Zul'Aman"] = "祖阿曼", - ["Quel'thalas"] = "奎尔萨拉斯", - ["Isle of Quel'Danas"] = "奎尔丹纳斯岛", - ["Sunwell Plateau"] = "太阳之井高地", - ["Magisters' Terrace"] = "魔导师平台", - - -- Blade's Edge Plateau - ["Forge Camp: Terror"] = "铸魔营地:恐怖", - ["Vortex Pinnacle"] = "漩涡峰", - ["Rivendark's Perch"] = "雷文达克栖木", - ["Ogri'la"] = "奥格瑞拉", - ["Obsidia's Perch"] = "欧比斯迪栖木", - ["Skyguard Outpost"] = "天空卫队哨站", - ["Shartuul's Transporter"] = "沙图尔的传送器", - ["Forge Camp: Wrath"] = "铸魔营地:天罚", - ["Bash'ir Landing"] = "巴什伊尔码头", - ["Crystal Spine"] = "水晶之脊", - ["Insidion's Perch"] = "因斯迪安栖木", - ["Furywing's Perch"] = "弗雷文栖木", - - ["Tirisfal"] = "提里斯法林地",--TaxiNodesDBC - ["Sunken Temple"] = "沉没的神庙",--AreaTableDBC } elseif GAME_LOCALE == "zhTW" then lib:SetCurrentTranslations { @@ -930,83 +623,6 @@ elseif GAME_LOCALE == "zhTW" then ["Library"] = "圖書館", ["Cathedral"] = "教堂", ["Graveyard"] = "墓地", - - -- Burning Crusade - - -- Subzones used for displaying instances. - ["Plaguewood"] = "病木林", - ["Hellfire Citadel"] = "地獄火堡壘", - ["Auchindoun"] = "奧齊頓", - ["The Bone Wastes"] = "白骨荒野", -- Substitute for Auchindoun, since this is what shows on the minimap. - ["Ring of Observance"] = "儀式競技場", - ["Coilfang Reservoir"] = "盤牙洞穴", - ["Amani Pass"] = "阿曼尼小俓", - - ["Azuremyst Isle"] = "藍謎島", - ["Bloodmyst Isle"] = "血謎島", - ["Eversong Woods"] = "永歌森林", - ["Ghostlands"] = "鬼魂之地", - ["The Exodar"] = "艾克索達", - ["Silvermoon City"] = "銀月城", - ["Shadowmoon Valley"] = "影月谷", - ["Black Temple"] = "黑暗神廟", - ["Terokkar Forest"] = "泰洛卡森林", - ["Auchenai Crypts"] = "奧奇奈地穴", - ["Mana-Tombs"] = "法力墓地", - ["Shadow Labyrinth"] = "暗影迷宮", - ["Sethekk Halls"] = "塞司克大廳", - ["Hellfire Peninsula"] = "地獄火半島", - ["The Dark Portal"] = "黑暗之門", - ["Hellfire Ramparts"] = "地獄火壁壘", - ["The Blood Furnace"] = "血熔爐", - ["The Shattered Halls"] = "破碎大廳", - ["Magtheridon's Lair"] = "瑪瑟里頓的巢穴", - ["Nagrand"] = "納葛蘭", - ["Zangarmarsh"] = "贊格沼澤", - ["The Slave Pens"] = "奴隸監獄", - ["The Underbog"] = "深幽泥沼", - ["The Steamvault"] = "蒸汽洞窟", - ["Serpentshrine Cavern"] = "毒蛇神殿洞穴", - ["Blade's Edge Mountains"] = "劍刃山脈", - ["Gruul's Lair"] = "戈魯爾之巢", - ["Netherstorm"] = "虛空風暴", - ["Tempest Keep"] = "風暴要塞", - ["The Mechanar"] = "麥克納爾", - ["The Botanica"] = "波塔尼卡", - ["The Arcatraz"] = "亞克崔茲", - ["The Eye"] = "風暴要塞", - ["Eye of the Storm"] = "暴風之眼", - ["Shattrath City"] = "撒塔斯城", - --["Shattrath"] = true, - ["Karazhan"] = "卡拉贊", - ["Caverns of Time"] = "時光之穴", - ["Old Hillsbrad Foothills"] = "希爾斯布萊德丘陵舊址", - ["The Black Morass"] = "黑色沼澤", - ["Night Elf Village"] = "夜精靈村", - ["Horde Encampment"] = "部落營地", - ["Alliance Base"] = "聯盟營地", - ["Zul'Aman"] = "祖阿曼", - ["Quel'thalas"] = "奎爾薩拉斯", - ["Isle of Quel'Danas"] = "奎爾達納斯之島", - ["Sunwell Plateau"] = "太陽之井高地", - ["Magisters' Terrace"] = "博學者殿堂", - - -- Blade's Edge Plateau - ["Forge Camp: Terror"] = "煉冶場:驚駭", - ["Vortex Pinnacle"] = "漩渦尖塔", - ["Rivendark's Perch"] = "瑞文達科棲所", - ["Ogri'la"] = "歐格利拉", - ["Obsidia's Perch"] = "歐比希迪亞棲所", - ["Skyguard Outpost"] = "禦天者崗哨", - ["Shartuul's Transporter"] = "夏圖歐的傳送門", - ["Forge Camp: Wrath"] = "煉冶場:憤怒", - ["Bash'ir Landing"] = "貝許爾平臺", - ["Crystal Spine"] = "水晶背脊", - ["Insidion's Perch"] = "印希迪恩棲所", - ["Furywing's Perch"] = "狂怒之翼棲所", - - ["Tirisfal"] = "提里斯法林地", - ["Sunken Temple"] = "沉沒的神廟", } elseif GAME_LOCALE == "koKR" then lib:SetCurrentTranslations { @@ -1128,83 +744,6 @@ elseif GAME_LOCALE == "koKR" then ["Library"] = "도서관", ["Cathedral"] = "대성당", ["Graveyard"] = "묘지", - - -- Burning Crusade - - -- Subzones used for displaying instances. - ["Plaguewood"] = "역병의 숲", - ["Hellfire Citadel"] = "지옥불 성채", - ["Auchindoun"] = "아킨둔", - ["The Bone Wastes"] = "해골 무덤", -- Substitute for Auchindoun, since this is what shows on the minimap. - ["Ring of Observance"] = "규율의 광장", - ["Coilfang Reservoir"] = "갈퀴송곳니 저수지", - ["Amani Pass"] = "아마니 고개", - - ["Azuremyst Isle"] = "하늘안개 섬", - ["Bloodmyst Isle"] = "핏빛안개 섬", - ["Eversong Woods"] = "영원노래 숲", - ["Ghostlands"] = "유령의 땅", - ["The Exodar"] = "엑소다르", - ["Silvermoon City"] = "실버문", - ["Shadowmoon Valley"] = "어둠달 골짜기", - ["Black Temple"] = "검은 사원", - ["Terokkar Forest"] = "테로카르 숲", - ["Auchenai Crypts"] = "아키나이 납골당", - ["Mana-Tombs"] = "마나 무덤", - ["Shadow Labyrinth"] = "어둠의 미궁", - ["Sethekk Halls"] = "세데크 전당", - ["Hellfire Peninsula"] = "지옥불 반도", - ["The Dark Portal"] = "어둠의 문", - ["Hellfire Ramparts"] = "지옥불 성루", - ["The Blood Furnace"] = "피의 용광로", - ["The Shattered Halls"] = "으스러진 손의 전당", - ["Magtheridon's Lair"] = "마그테리돈의 둥지", - ["Nagrand"] = "나그란드", - ["Zangarmarsh"] = "장가르 습지대", - ["The Slave Pens"] = "강제 노역소", - ["The Underbog"] = "지하수렁", - ["The Steamvault"] = "증기 저장고", - ["Serpentshrine Cavern"] = "불뱀 제단", - ["Blade's Edge Mountains"] = "칼날 산맥", - ["Gruul's Lair"] = "그룰의 둥지", - ["Netherstorm"] = "황천의 폭풍", - ["Tempest Keep"] = "폭풍우 요새", - ["The Mechanar"] = "메카나르", - ["The Botanica"] = "신록의 정원", - ["The Arcatraz"] = "알카트라즈", - ["The Eye"] = "눈", -- check - ["Eye of the Storm"] = "폭풍의 눈", - ["Shattrath City"] = "샤트라스", - ["Shattrath"] = "샤트라스", - ["Karazhan"] = "카라잔", - ["Caverns of Time"] = "시간의 동굴", - ["Old Hillsbrad Foothills"] = "옛 힐스브래드 구릉지", - ["The Black Morass"] = "검은늪", - ["Night Elf Village"] = "나이트 엘프 마을", - ["Horde Encampment"] = "호드 야영지", - ["Alliance Base"] = "얼라이언스 주둔지", - ["Zul'Aman"] = "줄아만", - ["Quel'thalas"] = "쿠엘탈라스", - ["Isle of Quel'Danas"] = "쿠엘다나스 섬", - ["Sunwell Plateau"] = "태양샘 고원", - ["Magisters' Terrace"] = "마법학자의 정원", - - -- Blade's Edge Plateau - ["Forge Camp: Terror"] = "공포의 괴철로 기지", - ["Vortex Pinnacle"] = "소용돌이 고원", - ["Rivendark's Perch"] = "리븐다크의 둥지", - ["Ogri'la"] = "오그릴라", - ["Obsidia's Perch"] = "옵시디아의 둥지", - ["Skyguard Outpost"] = "하늘경비대 전초기지", - ["Shartuul's Transporter"] = "샤툴의 순간이동기", - ["Forge Camp: Wrath"] = "격노의 괴철로 기지", - ["Bash'ir Landing"] = "바쉬르 영지", - ["Crystal Spine"] = "수정 돌기", - ["Insidion's Perch"] = "인시디온의 둥지", - ["Furywing's Perch"] = "퓨리윙의 둥지", - - ["Tirisfal"] = "티리스팔", - ["Sunken Temple"] = "가라앉은 사원", } elseif GAME_LOCALE == "esES" then lib:SetCurrentTranslations { @@ -1326,83 +865,6 @@ elseif GAME_LOCALE == "esES" then ["Library"] = "Biblioteca", ["Cathedral"] = "Catedral", ["Graveyard"] = "Cementerio", - - -- Burning Crusade - - -- Subzones used for displaying instances. - ["Plaguewood"] = "Bosque de la Plaga", - ["Hellfire Citadel"] = "Ciudadela del Fuego Infernal", - ["Auchindoun"] = "Auchindoun", - ["The Bone Wastes"] = "El Vertedero de Huesos", - ["Ring of Observance"] = "Círculo de la Observancia", - ["Coilfang Reservoir"] = "Reserva Colmillo Torcido", - ["Amani Pass"] = "Paso de Amani", - - ["Azuremyst Isle"] = "Isla Bruma Azur", - ["Bloodmyst Isle"] = "Isla Bruma de Sangre", - ["Eversong Woods"] = "Bosque Canción Eterna", - ["Ghostlands"] = "Tierras Fantasma", - ["The Exodar"] = "El Exodar", - ["Silvermoon City"] = "Ciudad de Lunargenta", - ["Shadowmoon Valley"] = "Valle Sombraluna", - ["Black Temple"] = "El Templo Oscuro", -- check - ["Terokkar Forest"] = "Bosque de Terokkar", - ["Auchenai Crypts"] = "Criptas Auchenai", - ["Mana-Tombs"] = "Tumbas de Maná", - ["Shadow Labyrinth"] = "Laberinto de las Sombras", - ["Sethekk Halls"] = "Salas Sethekk", - ["Hellfire Peninsula"] = "Península del Fuego Infernal", - ["The Dark Portal"] = "El Portal Oscuro", - ["Hellfire Ramparts"] = "Murallas del Fuego Infernal", - ["The Blood Furnace"] = "El Horno de Sangre", - ["The Shattered Halls"] = "Las Salas Arrasadas", - ["Magtheridon's Lair"] = "Guarida de Magtheridon", -- check - Magtheradon /Magtheridon ?? - ["Nagrand"] = "Nagrand", - ["Zangarmarsh"] = "Marisma de Zangar", - ["The Slave Pens"] = "Recinto de los Esclavos", - ["The Underbog"] = "La Sotiénaga", - ["The Steamvault"] = "La Cámara de Vapor", - ["Serpentshrine Cavern"] = "Caverna Santuario Serpiente", -- check - ["Blade's Edge Mountains"] = "Montañas Filospada", - ["Gruul's Lair"] = "Guarida de Gruul", - ["Netherstorm"] = "Tormenta Abisal", - ["Tempest Keep"] = "El Castillo de la Tempestad", - ["The Mechanar"] = "El Mechanar", - ["The Botanica"] = "El Invernáculo", - ["The Arcatraz"] = "El Alcatraz", - ["The Eye"] = "El Ojo", -- check - ["Eye of the Storm"] = "Ojo de la Tormenta", - ["Shattrath City"] = "Ciudad de Shattrath", - ["Shattrath"] = "Shattrath", - ["Karazhan"] = "Karazhan", - ["Caverns of Time"] = "Cavernas del Tiempo", - ["Old Hillsbrad Foothills"] = "Viejas Laderas de Trabalomas", -- doesn't work in spanish anyway - ["The Black Morass"] = "La Ciénaga Negra", - ["Night Elf Village"] = "Night Elf Village", - ["Horde Encampment"] = "Horde Encampment", - ["Alliance Base"] = "Alliance Base", - ["Zul'Aman"] = "Zul'Aman", - ["Quel'thalas"] = "Quel'thalas", - ["Isle of Quel'Danas"] = "Isla de Quel'Danas", - ["Sunwell Plateau"] = "Meseta de la Fuente del Sol", - ["Magisters' Terrace"] = "Bancal Del Magister" , - - -- Blade's Edge Plateau - ["Forge Camp: Terror"] = "", - ["Vortex Pinnacle"] = "", - ["Rivendark's Perch"] = "", - ["Ogri'la"] = "", - ["Obsidia's Perch"] = "", - ["Skyguard Outpost"] = "", - ["Shartuul's Transporter"] = "", - ["Forge Camp: Wrath"] = "", - ["Bash'ir Landing"] = "", - ["Crystal Spine"] = "", - ["Insidion's Perch"] = "", - ["Furywing's Perch"] = "", - - ["Tirisfal"] = "Tirisfal", - ["Sunken Temple"] = "El Templo de Sunken", } elseif GAME_LOCALE == "esMX" then lib:SetCurrentTranslations { @@ -1524,83 +986,6 @@ elseif GAME_LOCALE == "esMX" then ["Library"] = "Biblioteca", ["Cathedral"] = "Catedral", ["Graveyard"] = "Cementerio", - - -- Burning Crusade - - -- Subzones used for displaying instances. - ["Plaguewood"] = "Bosque de la Plaga", - ["Hellfire Citadel"] = "Ciudadela del Fuego Infernal", - ["Auchindoun"] = "Auchindoun", - ["The Bone Wastes"] = "El Vertedero de Huesos", - ["Ring of Observance"] = "Círculo de la Observancia", - ["Coilfang Reservoir"] = "Reserva Colmillo Torcido", - ["Amani Pass"] = "Paso de Amani", - - ["Azuremyst Isle"] = "Isla Bruma Azur", - ["Bloodmyst Isle"] = "Isla Bruma de Sangre", - ["Eversong Woods"] = "Bosque Canción Eterna", - ["Ghostlands"] = "Tierras Fantasma", - ["The Exodar"] = "El Exodar", - ["Silvermoon City"] = "Ciudad de Lunargenta", - ["Shadowmoon Valley"] = "Valle Sombraluna", - ["Black Temple"] = "El Templo Oscuro", -- check - ["Terokkar Forest"] = "Bosque de Terokkar", - ["Auchenai Crypts"] = "Criptas Auchenai", - ["Mana-Tombs"] = "Tumbas de Maná", - ["Shadow Labyrinth"] = "Laberinto de las Sombras", - ["Sethekk Halls"] = "Salas Sethekk", - ["Hellfire Peninsula"] = "Península del Fuego Infernal", - ["The Dark Portal"] = "El Portal Oscuro", - ["Hellfire Ramparts"] = "Murallas del Fuego Infernal", - ["The Blood Furnace"] = "El Horno de Sangre", - ["The Shattered Halls"] = "Las Salas Arrasadas", - ["Magtheridon's Lair"] = "Guarida de Magtheridon", -- check - Magtheradon /Magtheridon ?? - ["Nagrand"] = "Nagrand", - ["Zangarmarsh"] = "Marisma de Zangar", - ["The Slave Pens"] = "Recinto de los Esclavos", - ["The Underbog"] = "La Sotiénaga", - ["The Steamvault"] = "La Cámara de Vapor", - ["Serpentshrine Cavern"] = "Caverna Santuario Serpiente", -- check - ["Blade's Edge Mountains"] = "Montañas Filospada", - ["Gruul's Lair"] = "Guarida de Gruul", - ["Netherstorm"] = "Tormenta Abisal", - ["Tempest Keep"] = "El Castillo de la Tempestad", - ["The Mechanar"] = "El Mechanar", - ["The Botanica"] = "El Invernáculo", - ["The Arcatraz"] = "El Alcatraz", - ["The Eye"] = "El Ojo", -- check - ["Eye of the Storm"] = "Ojo de la Tormenta", - ["Shattrath City"] = "Ciudad de Shattrath", - ["Shattrath"] = "Shattrath", - ["Karazhan"] = "Karazhan", - ["Caverns of Time"] = "Cavernas del Tiempo", - ["Old Hillsbrad Foothills"] = "Viejas Laderas de Trabalomas", -- doesn't work in spanish anyway - ["The Black Morass"] = "La Ciénaga Negra", - ["Night Elf Village"] = "Night Elf Village", - ["Horde Encampment"] = "Horde Encampment", - ["Alliance Base"] = "Alliance Base", - ["Zul'Aman"] = "Zul'Aman", - ["Quel'thalas"] = "Quel'thalas", - ["Isle of Quel'Danas"] = "Isla de Quel'Danas", - ["Sunwell Plateau"] = "Meseta de la Fuente del Sol", - ["Magisters' Terrace"] = "Bancal Del Magister" , - - -- Blade's Edge Plateau - ["Forge Camp: Terror"] = "", - ["Vortex Pinnacle"] = "", - ["Rivendark's Perch"] = "", - ["Ogri'la"] = "", - ["Obsidia's Perch"] = "", - ["Skyguard Outpost"] = "", - ["Shartuul's Transporter"] = "", - ["Forge Camp: Wrath"] = "", - ["Bash'ir Landing"] = "", - ["Crystal Spine"] = "", - ["Insidion's Perch"] = "", - ["Furywing's Perch"] = "", - - ["Tirisfal"] = "Tirisfal", - ["Sunken Temple"] = "El Templo de Sunken", } elseif GAME_LOCALE == "ruRU" then lib:SetCurrentTranslations { @@ -1722,84 +1107,7 @@ elseif GAME_LOCALE == "ruRU" then ["Library"] = "Библиотека", ["Cathedral"] = "Собор", ["Graveyard"] = "Кладбище", - - -- Burning Crusade - - -- Subzones used for displaying instances. - ["Plaguewood"] = "Проклятый лес", - ["Hellfire Citadel"] = "Цитадель Адского Пламени", - ["Auchindoun"] = "Аукиндон", - ["The Bone Wastes"] = "Костяные пустоши", - ["Ring of Observance"] = "Ритуальный Круг", - ["Coilfang Reservoir"] = "Резервуар Кривого Клыка", - ["Amani Pass"] = "Перевал Амани", - - ["Azuremyst Isle"] = "Остров Лазурной Дымки", - ["Bloodmyst Isle"] = "Остров Кровавой Дымки", - ["Eversong Woods"] = "Леса Вечной Песни", - ["Ghostlands"] = "Призрачные земли", - ["The Exodar"] = "Экзодар", - ["Silvermoon City"] = "Луносвет", - ["Shadowmoon Valley"] = "Долина Призрачной Луны", - ["Black Temple"] = "Черный храм", - ["Terokkar Forest"] = "Лес Тероккар", - ["Auchenai Crypts"] = "Аукенайские гробницы", - ["Mana-Tombs"] = "Гробницы Маны", - ["Shadow Labyrinth"] = "Темный Лабиринт", - ["Sethekk Halls"] = "Сетеккские залы", - ["Hellfire Peninsula"] = "Полуостров Адского Пламени", - ["The Dark Portal"] = "Темный портал", - ["Hellfire Ramparts"] = "Бастионы Адского Пламени", - ["The Blood Furnace"] = "Кузня Крови", - ["The Shattered Halls"] = "Разрушенные залы", - ["Magtheridon's Lair"] = "Логово Магтеридона", - ["Nagrand"] = "Награнд", - ["Zangarmarsh"] = "Зангартопь", - ["The Slave Pens"] = "Узилище", - ["The Underbog"] = "Нижетопь", - ["The Steamvault"] = "Паровое Подземелье", - ["Serpentshrine Cavern"] = "Змеиное святилище", - ["Blade's Edge Mountains"] = "Острогорье", - ["Gruul's Lair"] = "Логово Груула", - ["Netherstorm"] = "Пустоверть", - ["Tempest Keep"] = "Крепость Бурь", - ["The Mechanar"] = "Механар", - ["The Botanica"] = "Ботаника", - ["The Arcatraz"] = "Аркатрац", - ["The Eye"] = "Око", - ["Eye of the Storm"] = "Око Бури", - ["Shattrath City"] = "Шаттрат", - ["Shattrath"] = "Шаттрат", - ["Karazhan"] = "Каражан", - ["Caverns of Time"] = "Пещеры Времени", - ["Old Hillsbrad Foothills"] = "Старые предгорья Хилсбрада", - ["The Black Morass"] = "Черные топи", - ["Night Elf Village"] = "Деревня ночных эльфов", - ["Horde Encampment"] = "Стоянка Орды", - ["Alliance Base"] = "База Альянса", - ["Zul'Aman"] = "Зул'Аман", - ["Quel'thalas"] = "Кель'Талас", - ["Isle of Quel'Danas"] = "Остров Кель'Данас", - ["Sunwell Plateau"] = "Плато Солнечного Колодца", - ["Magisters' Terrace"] = "Терраса Магистров", - - -- Blade's Edge Plateau - ["Forge Camp: Terror"] = "Лагерь Легиона: Ужас", - ["Vortex Pinnacle"] = "Нагорье Смерчей", - ["Rivendark's Perch"] = "Гнездо Чернокрыла", - ["Ogri'la"] = "Огри'ла", - ["Obsidia's Perch"] = "Гнездо Обсидии", - ["Skyguard Outpost"] = "Застава Стражи Небес", - ["Shartuul's Transporter"] = "Транспортер Шартуула", - ["Forge Camp: Wrath"] = "Лагерь Легиона: Гнев", - ["Bash'ir Landing"] = "Лагерь Баш'ира", - ["Crystal Spine"] = "Хрустальное поле", - ["Insidion's Perch"] = "Гнездо Инсидиона", - ["Furywing's Perch"] = "Гнездовье Ярокрыла", - - ["Tirisfal"] = "Тирисфальские леса", - ["Sunken Temple"] = "Затонувший храм", } else - error(("%s: Locale %q not supported"):format(MAJOR_VERSION, GAME_LOCALE)) + error(string.format("%s: Locale %q not supported", MAJOR_VERSION, GAME_LOCALE)) end \ No newline at end of file diff --git a/!Compatibility/libs/LibStub.lua b/!Compatibility/libs/LibStub.lua index d198f45..e45950e 100644 --- a/!Compatibility/libs/LibStub.lua +++ b/!Compatibility/libs/LibStub.lua @@ -35,7 +35,7 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then -- returns the library object if found function LibStub:GetLibrary(major, silent) if not self.libs[major] and not silent then - error(("Cannot find a library instance of %q."):format(tostring(major)), 2) + error(string.format("Cannot find a library instance of %q.", tostring(major)), 2) end return self.libs[major], self.minors[major] end diff --git a/!DebugTools/Blizzard_DebugTools.lua b/!DebugTools/Blizzard_DebugTools.lua index 973d4e2..85c6f60 100644 --- a/!DebugTools/Blizzard_DebugTools.lua +++ b/!DebugTools/Blizzard_DebugTools.lua @@ -1,3 +1,6 @@ +local mod = math.mod +local getn = table.getn + EVENT_TRACE_EVENT_HEIGHT = 16; EVENT_TRACE_MAX_ENTRIES = 1000; @@ -18,7 +21,7 @@ local _framesSinceLast = 0; local _timeSinceLast = 0; local _timer = CreateFrame("FRAME"); -_timer:SetScript("OnUpdate", function (self, elapsed) _framesSinceLast = _framesSinceLast + 1; _timeSinceLast = _timeSinceLast + elapsed; end); +_timer:SetScript("OnUpdate", function () _framesSinceLast = _framesSinceLast + 1; _timeSinceLast = _timeSinceLast + arg1; end); function EventTraceFrame_OnLoad(self) local frameName = self:GetName() @@ -42,11 +45,11 @@ function EventTraceFrame_OnLoad(self) self.lastIndex = 0; self.visibleButtons = 0; _EventTraceFrame = self; - self:SetScript("OnSizeChanged", EventTraceFrame_OnSizeChanged); + self:SetScript("OnSizeChanged", function() EventTraceFrame_OnSizeChanged(this, this:GetWidth(), this:GetHeight()) end); EventTraceFrame_OnSizeChanged(self, self:GetWidth(), self:GetHeight()); self:EnableMouse(true); self:EnableMouseWheel(true); - self:SetScript("OnMouseWheel", EventTraceFrame_OnMouseWheel); + self:SetScript("OnMouseWheel", function() EventTraceFrame_OnMouseWheel(tris, arg1) end); end local _workTable = {}; @@ -97,18 +100,18 @@ function EventTraceFrame_OnEvent (self, event, ...) local hours = math.floor(minutes / 60); seconds = seconds - 60 * minutes; minutes = minutes - 60 * hours; - hours = hours % 1000; + hours = mod(hours, 1000) self.times[nextIndex] = string.format("%.2d:%.2d:%06.3f", hours, minutes, seconds); self.timeSinceLast[nextIndex] = 0; self.framesSinceLast[nextIndex] = 0; self.eventids[nextIndex] = GetCurrentEventID(); - local numArgs = select("#", ...); + local numArgs = select("#", arg); for i=1, numArgs do if (not self.args[i]) then self.args[i] = {}; end - self.args[i][nextIndex] = select(i, ...); + self.args[i][nextIndex] = select(i, arg); end if (self.eventsToCapture) then @@ -138,7 +141,7 @@ end function EventTraceFrame_OnSizeChanged (self, width, height) local numButtonsToDisplay = math.floor((height - 36)/EVENT_TRACE_EVENT_HEIGHT); - local numButtonsCreated = #self.buttons; + local numButtonsCreated = getn(self.buttons); if (numButtonsCreated < numButtonsToDisplay) then for i = numButtonsCreated + 1, numButtonsToDisplay do @@ -542,7 +545,7 @@ function ScriptErrorsFrame_OnError (message, keepHidden) _ScriptErrorsFrame.times[index] = date(); else tinsert(_ScriptErrorsFrame.order, stack); - index = #_ScriptErrorsFrame.order; + index = getn(_ScriptErrorsFrame.order); _ScriptErrorsFrame.count[index] = 1; _ScriptErrorsFrame.messages[index] = message; _ScriptErrorsFrame.times[index] = date(); @@ -562,7 +565,7 @@ function ScriptErrorsFrame_Update () local editBox = ScriptErrorsFrameScrollFrameText; local index = _ScriptErrorsFrame.index; if (not index or not _ScriptErrorsFrame.order[index]) then - index = #_ScriptErrorsFrame.order; + index = getn(_ScriptErrorsFrame.order); _ScriptErrorsFrame.index = index; end @@ -586,7 +589,7 @@ function ScriptErrorsFrame_Update () if (prevText ~= text) then editBox:SetText(text); editBox:HighlightText(0); - editBox:SetCursorPosition(0); +-- editBox:SetCursorPosition(0); else ScrollingEdit_OnTextChanged(editBox, parent); end @@ -597,7 +600,7 @@ end function ScriptErrorsFrame_UpdateButtons () local index = _ScriptErrorsFrame.index; - local numErrors = #_ScriptErrorsFrame.order; + local numErrors = getn(_ScriptErrorsFrame.order); if (index == 0) then _ScriptErrorsFrame.next:Disable(); _ScriptErrorsFrame.previous:Disable(); diff --git a/!DebugTools/Blizzard_DebugTools.xml b/!DebugTools/Blizzard_DebugTools.xml index c4479cf..582e455 100644 --- a/!DebugTools/Blizzard_DebugTools.xml +++ b/!DebugTools/Blizzard_DebugTools.xml @@ -41,10 +41,10 @@ - EventTraceFrameEventHideButton_OnClick(self); + EventTraceFrameEventHideButton_OnClick(this); - EventTraceFrameEvent_OnLeave(self:GetParent()); + EventTraceFrameEvent_OnLeave(this:GetParent()); @@ -56,20 +56,20 @@ - local frameName = self:GetName(); - self.time = _G[frameName.."Time"]; - self.event = _G[frameName.."Event"]; - self.HideButton = _G[frameName.."HideButton"]; - self:GetHighlightTexture():SetAlpha(.15); + local frameName = this:GetName(); + this.time = _G[frameName.."Time"]; + this.event = _G[frameName.."Event"]; + this.HideButton = _G[frameName.."HideButton"]; + this:GetHighlightTexture():SetAlpha(.15); - EventTraceFrameEvent_OnEnter(self); + EventTraceFrameEvent_OnEnter(this); - EventTraceFrameEvent_OnLeave(self); + EventTraceFrameEvent_OnLeave(this); - EventTraceFrameEvent_OnClick(self); + EventTraceFrameEvent_OnClick(this); @@ -323,7 +323,7 @@ - self:RegisterForDrag("LeftButton"); + this:RegisterForDrag("LeftButton"); local eventTraceFrame = _G["EventTraceFrame"]; @@ -356,9 +356,9 @@ - self:SetFrameLevel(self:GetFrameLevel() + 1); - self:SetValue(0); - self:SetValueStep(1); + this:SetFrameLevel(self:GetFrameLevel() + 1); + this:SetValue(0); + this:SetValueStep(1); @@ -369,19 +369,19 @@ - EventTraceFrame_OnLoad(self); + EventTraceFrame_OnLoad(this); - EventTraceFrame_OnShow(self); + EventTraceFrame_OnShow(this); - EventTraceFrame_OnEvent(self, event, ...); + EventTraceFrame_OnEvent(this, event, arg); - EventTraceFrame_OnUpdate(self, elapsed); + EventTraceFrame_OnUpdate(this, arg1); - EventTraceFrame_OnKeyUp(self, key); + EventTraceFrame_OnKeyUp(this, arg1); @@ -411,7 +411,7 @@ - self:RegisterForDrag("LeftButton"); + this:RegisterForDrag("LeftButton"); local frame = _G["ScriptErrorsFrame"]; @@ -437,16 +437,16 @@ - ScrollingEdit_OnCursorChanged(self); + ScrollingEdit_OnCursorChanged(this); - ScrollingEdit_OnUpdate(self, elapsed, self:GetParent()); + ScrollingEdit_OnUpdate(this, arg1, this:GetParent()); - self:HighlightText(0); + this:HighlightText(0); - self:ClearFocus(); + this:ClearFocus(); @@ -481,7 +481,7 @@ - ScriptErrorsFrameButton_OnClick(self); + ScriptErrorsFrameButton_OnClick(this); @@ -500,7 +500,7 @@ - ScriptErrorsFrameButton_OnClick(self); + ScriptErrorsFrameButton_OnClick(this); @@ -513,17 +513,17 @@ - HideUIPanel(self:GetParent()); + HideUIPanel(this:GetParent()); - ScriptErrorsFrame_OnLoad(self); + ScriptErrorsFrame_OnLoad(this); - ScriptErrorsFrame_OnShow(self); + ScriptErrorsFrame_OnShow(this); @@ -531,19 +531,19 @@ @@ -551,7 +551,7 @@ diff --git a/!DebugTools/Compatibility.lua b/!DebugTools/Compatibility.lua index 0cfee50..ef8b63e 100644 --- a/!DebugTools/Compatibility.lua +++ b/!DebugTools/Compatibility.lua @@ -1,10 +1,10 @@ ---Cache global variables -local format, match = string.format, string.match -local tinsert, tsort, twipe = table.insert, table.sort, table.wipe -local fmod = math.fmod +-- Cache global variables +local mod = math.mod local pairs = pairs local tostring = tostring ---WoW API +local format, match = string.format, string.match +local getn, tinsert, tsort, twipe = table.getn, table.insert, table.sort, table.wipe +-- WoW API local GetTime = GetTime DEBUG_FRAMESTACK = "Frame Stack" @@ -21,7 +21,7 @@ local eventHandler = CreateFrame("Frame", "EventHandler", UIParent) eventHandler:SetScript("OnEvent", EventHandler_OnEvent) function GetCurrentEventID() - return #eventList + return getn(eventList) end function GetEventTime(eventID) @@ -92,7 +92,7 @@ end function UpdateFrameStack(tooltip, showHidden) local x, y = GetCursorPosition() - for i = 1, #frameStackList do + for i = 1, getn(frameStackList) do frameStackList[i] = nil end @@ -151,7 +151,7 @@ function UpdateFrameStack(tooltip, showHidden) end end - frameStackList[#frameStackList + 1] = nil + frameStackList[getn(frameStackList) + 1] = nil tsort(frameStackList, FrameStackSort) @@ -159,7 +159,7 @@ function UpdateFrameStack(tooltip, showHidden) tooltip:AddDoubleLine(DEBUG_FRAMESTACK, format("(%.2f,%.2f)", x, y), 1, 1, 1, 1, .82, 0) local cs, os, ol = 1, nil, nil - local cn = #colorSpecs + local cn = getn(colorSpecs) local highlighted local highlightFrame = GetMouseFocus() @@ -173,7 +173,7 @@ function UpdateFrameStack(tooltip, showHidden) end if l ~= ol then - cs = fmod(cs, cn) + 1 + cs = mod(cs, cn) + 1 ol = l end