WoWInterface SVN InFlight

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 165 to Rev 166
    Reverse comparison

Rev 165 → Rev 166

tags/1.13.005_Classic/InFlight_Load/embeds.xml New file
0,0 → 1,4
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Script file="..\InFlight\libs\LibStub\LibStub.lua"/>
<Include file="..\InFlight\libs\AceLocale-3.0\AceLocale-3.0.xml"/>
</Ui>
\ No newline at end of file Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight_Load/locales/esMX.lua New file
0,0 → 1,8
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "esMX")
if not L then return end
 
L["Nighthaven"] = "Amparo de la Noche"
L["NighthavenGossipA"] = "Me gustaría volar a Aldea Rut'theran"
L["NighthavenGossipH"] = "Me gustaría volar a Cima del Trueno"
L["Rut'theran Village"] = "Aldea Rut'theran"
L["Thunder Bluff"] = "Cima del Trueno"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight_Load/locales/zhTW.lua New file
0,0 → 1,8
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "zhTW")
if not L then return end
 
L["Nighthaven"] = "永夜港"
L["NighthavenGossipA"] = "我想飛往魯瑟蘭村"
L["NighthavenGossipH"] = "我想飛往雷霆崖"
L["Rut'theran Village"] = "魯瑟蘭村"
L["Thunder Bluff"] = "雷霆崖"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight_Load/locales/ruRU.lua New file
0,0 → 1,8
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "ruRU")
if not L then return end
 
L["Nighthaven"] = "Ночная Гавань"
L["NighthavenGossipA"] = "Я бы хотела отправиться в деревню Рут'теран"
L["NighthavenGossipH"] = "Мне хотелось бы слетать в Громовой Утес"
L["Rut'theran Village"] = "Деревня Рут'теран"
L["Thunder Bluff"] = "Громовой Утес"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight_Load/locales/esES.lua New file
0,0 → 1,8
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "esES")
if not L then return end
 
L["Nighthaven"] = "Amparo de la Noche"
L["NighthavenGossipA"] = "Me gustaría volar a Aldea Rut'theran"
L["NighthavenGossipH"] = "Me gustaría volar a Cima del Trueno"
L["Rut'theran Village"] = "Aldea Rut'theran"
L["Thunder Bluff"] = "Cima del Trueno"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight_Load/locales/frFR.lua New file
0,0 → 1,8
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "frFR")
if not L then return end
 
L["Nighthaven"] = "Havrenuit"
L["NighthavenGossipA"] = "J'aimerais voler jusqu'au village de Rut'theran"
L["NighthavenGossipH"] = "J'aimerais voler jusqu'aux Pitons-du-Tonnerre"
L["Rut'theran Village"] = "Rut'theran"
L["Thunder Bluff"] = "Les Pitons-du-Tonnerre"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight_Load/locales/deDE.lua New file
0,0 → 1,8
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "deDE")
if not L then return end
 
L["Nighthaven"] = true
L["NighthavenGossipA"] = "Ich würde gerne nach Rut'theran fliegen"
L["NighthavenGossipH"] = "Ich würde gerne nach Donnerfels fliegen"
L["Rut'theran Village"] = "Rut'theran"
L["Thunder Bluff"] = "Donnerfels"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight_Load/locales/locales.xml New file
0,0 → 1,13
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="enUS.lua"/>
<Script file="deDE.lua"/>
<Script file="esES.lua"/>
<Script file="esMX.lua"/>
<Script file="frFR.lua"/>
<Script file="koKR.lua"/>
<Script file="ptBR.lua"/>
<Script file="ruRU.lua"/>
<Script file="zhTW.lua"/>
<Script file="zhCN.lua"/>
</Ui>
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight_Load/locales/zhCN.lua New file
0,0 → 1,8
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "zhCN")
if not L then return end
 
L["Nighthaven"] = "永夜港"
L["NighthavenGossipA"] = "我想飞往鲁瑟兰村"
L["NighthavenGossipH"] = "我想飞往雷霆崖"
L["Rut'theran Village"] = "鲁瑟兰村"
L["Thunder Bluff"] = "雷霆崖"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight_Load/locales/koKR.lua New file
0,0 → 1,8
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "koKR")
if not L then return end
 
L["Nighthaven"] = "나이트헤이븐"
L["NighthavenGossipA"] = "루테란 마을로 날아가고 싶어요"
L["NighthavenGossipH"] = "썬더 블러프로 날아가고 싶어요"
L["Rut'theran Village"] = "루테란 마을"
L["Thunder Bluff"] = "썬더 블러프"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight_Load/locales/ptBR.lua New file
0,0 → 1,8
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "ptBR")
if not L then return end
 
L["Nighthaven"] = "Refúgio Noturno"
L["NighthavenGossipA"] = "Eu quero voar até a Vila de Rut'theran"
L["NighthavenGossipH"] = "Eu gostaria de voar para o Penhasco do Trovão"
L["Rut'theran Village"] = "Vila de Rut'theran"
L["Thunder Bluff"] = "Penhasco do Trovão"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight_Load/locales/enUS.lua New file
0,0 → 1,8
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "enUS", true, true)
if not L then return end
 
L["Nighthaven"] = true
L["NighthavenGossipA"] = "I'd like to fly to Rut'theran Village"
L["NighthavenGossipH"] = "I'd like to fly to Thunder Bluff"
L["Rut'theran Village"] = true
L["Thunder Bluff"] = true
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight_Load/InFlight_Load.lua New file
0,0 → 1,113
local InFlight = CreateFrame("Frame", "InFlight") -- no parent is intentional
local self = InFlight
InFlight:SetScript("OnEvent", function(this, event, ...) this[event](this, ...) end)
InFlight:RegisterEvent("ADDON_LOADED")
 
-- LOCAL FUNCTIONS
local function LoadInFlight()
if not InFlight.ShowOptions then
LoadAddOn("InFlight")
end
 
return GetAddOnEnableState(UnitName("player"), "InFlight") == 2 and InFlight.ShowOptions and true or nil
end
 
-----------------------------------------
function InFlight:ADDON_LOADED(addonName)
-----------------------------------------
if addonName == "InFlight_Load" then
self:RegisterEvent("TAXIMAP_OPENED")
if self.SetupInFlight then
self:SetupInFlight()
else
self:UnregisterEvent("ADDON_LOADED")
end
elseif addonName == "InFlight" then
self:UnregisterEvent("ADDON_LOADED")
self:LoadBulk()
end
end
 
-------------------------------------
function InFlight:TAXIMAP_OPENED(...)
-------------------------------------
if LoadInFlight() then
local uiMapSystem = ...
local isTaxiMap = uiMapSystem == Enum.UIMapSystem.Taxi
self:InitSource(isTaxiMap)
end
end
 
-- maybe this stuff gets garbage collected if InFlight isn't loadable
if GetAddOnEnableState(UnitName("player"), "InFlight") == 2 then
-- GLOBALS -> LOCAL
local ipairs, strfind = ipairs, strfind
 
-- LOCALIZATION
local L = LibStub("AceLocale-3.0"):GetLocale("InFlight", true)
InFlight.L = L
 
local t
do
t = {
[L["Nighthaven"]] = {{ find = L["NighthavenGossipA"], s = "Nighthaven", d = "Rut'theran Village" },
{ find = L["NighthavenGossipH"], s = "Nighthaven", d = "Thunder Bluff" }},
}
end
 
-- support for flightpaths that are started by gossip options
hooksecurefunc("GossipTitleButton_OnClick", function(this, button)
if this.type ~= "Gossip" then
return
end
 
local subzone = GetMinimapZoneText()
local tsz = t[subzone]
if not tsz then
-- print("|cff00ff40In|cff00aaffFlight|r: zone - ", L[GetMinimapZoneText()], GetMinimapZoneText())
-- print("|cff00ff40In|cff00aaffFlight|r: gossip - ", this:GetText())
return
end
 
local text = this:GetText()
if not text or text == "" then
return
end
-- print("|cff00ff40In|cff00aaffFlight|r: gossip - ", text)
 
local source, destination
for _, sz in ipairs(tsz) do
if strfind(text, sz.find, 1, true) then
source = sz.s
destination = sz.d
break
end
end
 
if source and destination and LoadInFlight() then
self:StartMiscFlight(source, destination)
end
end)
 
---------------------------------
function InFlight:SetupInFlight()
---------------------------------
SlashCmdList.INFLIGHT = function()
if LoadInFlight() then
self:ShowOptions()
end
end
SLASH_INFLIGHT1 = "/inflight"
 
local panel = CreateFrame("Frame")
panel.name = "InFlight"
panel:SetScript("OnShow", function(this)
if LoadInFlight() and InFlight.SetLayout then
InFlight:SetLayout(this)
end
end)
panel:Hide()
InterfaceOptions_AddCategory(panel)
InFlight.SetupInFlight = nil
end
end
tags/1.13.005_Classic/InFlight_Load/InFlight_Load.toc New file
0,0 → 1,27
## Interface: 11303
## Title: InFlight_Load
## Notes: Loader for InFlight
## Notes-deDE: Loader für InFlight
## Notes-esES: Cargador para InFlight
## Notes-esMX: Cargador para InFlight
## Notes-frFR: Loader pour InFlight
## Notes-itIT: Caricatore per InFlight
## Notes-koKR: InFlight 용 로더
## Notes-ptBR: Loader para InFlight
## Notes-ruRU: Загрузчик для InFlight
## Notes-zhCN: InFlight 的載入器
## Notes-zhTW: InFlight 的裝載機
## Author: TotalPackage
## Version: 1.13.005
 
## X-Category: Interface Enhancements
 
## OptionalDeps: Ace3
 
## LoadManagers: AddonLoader
## X-LoadOn-Always: delayed
 
embeds.xml
 
locales\locales.xml
InFlight_Load.lua
tags/1.13.005_Classic/InFlight/Defaults.lua New file
0,0 → 1,960
InFlight.defaults = {
profile = {
p = "BOTTOM",
rp = "TOP",
x = 0,
y = -170,
countup = true,
fill = true,
spark = true,
texture = "Blizzard",
width = 230,
height = 14,
border = "Blizzard Dialog",
barcolor = { r = 0.5, g = 0.5, b = 0.8, a = 1.0, },
unknowncolor = { r = 0.2, g = 0.2, b = 0.4, a = 1.0, },
backcolor = { r = 0.1, g = 0.1, b = 0.1, a = 0.6, },
bordercolor = { r = 0.6, g = 0.6, b = 0.6, a = 0.8, },
inline = false,
totext = "-->",
font = "2002 Bold",
fontsize = 12,
fontcolor = { r = 1.0, g = 1.0, b = 1.0, a = 1.0, },
outline = false,
outlinetime = false,
chatlog = true,
confirmflight = false,
perchar = false,
},
global = {
["Horde"] = {
["Crossroads"] = {
["Marshal's Refuge"] = 384,
["Bloodvenom Post"] = 253,
["Sun Rock Retreat"] = 150,
["Shadowprey Village"] = 292,
["Ratchet"] = 52,
["Brackenwall Village"] = 162,
["Freewind Post"] = 184,
["Orgrimmar"] = 142,
["Gadgetzan"] = 303,
["Camp Taurajo"] = 90,
["Zoram'gar Outpost"] = 231,
["Everlook"] = 297,
["Valormok"] = 168,
["Thunder Bluff"] = 182,
["Cenarion Hold"] = 382,
["Splintertree Post"] = 162,
["Camp Mojache"] = 252,
},
["Kargath"] = {
["Undercity"] = 497,
["Light's Hope Chapel"] = 491,
["Stonard"] = 280,
["Tarren Mill"] = 379,
["Grom'gol"] = 313,
["Revantusk Village"] = 352,
["Hammerfall"] = 263,
["Booty Bay"] = 417,
["The Sepulcher"] = 477,
["Flame Crest"] = 87,
["Thorium Point"] = 56,
},
["Bloodvenom Post"] = {
["Marshal's Refuge"] = 625,
["Moonglade"] = 166,
["Shadowprey Village"] = 533,
["Ratchet"] = 292,
["Brackenwall Village"] = 404,
["Everlook"] = 190,
["Orgrimmar"] = 259,
["Gadgetzan"] = 518,
["Camp Taurajo"] = 331,
["Zoram'gar Outpost"] = 471,
["Crossroads"] = 241,
["Sun Rock Retreat"] = 390,
["Valormok"] = 241,
["Thunder Bluff"] = 423,
["Cenarion Hold"] = 623,
["Splintertree Post"] = 333,
["Camp Mojache"] = 493,
},
["Sun Rock Retreat"] = {
["Crossroads"] = 150,
["Camp Mojache"] = 339,
["Gadgetzan"] = 426,
["Valormok"] = 318,
["Shadowprey Village"] = 143,
["Freewind Post"] = 333,
["Ratchet"] = 200,
["Zoram'gar Outpost"] = 380,
["Brackenwall Village"] = 312,
["Thunder Bluff"] = 175,
["Bloodvenom Post"] = 403,
["Camp Taurajo"] = 240,
["Everlook"] = 447,
["Cenarion Hold"] = 469,
["Splintertree Post"] = 311,
["Orgrimmar"] = 290,
},
["Shadowprey Village"] = {
["Marshal's Refuge"] = 417,
["Bloodvenom Post"] = 590,
["Moonglade"] = 709,
["Ratchet"] = 388,
["Brackenwall Village"] = 416,
["Freewind Post"] = 382,
["Orgrimmar"] = 385,
["Gadgetzan"] = 395,
["Camp Taurajo"] = 265,
["Zoram'gar Outpost"] = 566,
["Everlook"] = 576,
["Crossroads"] = 337,
["Sun Rock Retreat"] = 199,
["Valormok"] = 447,
["Thunder Bluff"] = 178,
["Cenarion Hold"] = 326,
["Splintertree Post"] = 474,
["Camp Mojache"] = 196,
},
["Thorium Point"] = {
["Kargath"] = 70,
["Light's Hope Chapel"] = 559,
["Stonard"] = 350,
["Tarren Mill"] = 447,
["Grom'gol"] = 382,
["Revantusk Village"] = 420,
["Hammerfall"] = 331,
["Booty Bay"] = 462,
["The Sepulcher"] = 545,
["Flame Crest"] = 77,
["Undercity"] = 566,
},
["Ratchet"] = {
["Crossroads"] = 69,
["Orgrimmar"] = 210,
["Gadgetzan"] = 345,
["Sun Rock Retreat"] = 218,
["Shadowprey Village"] = 360,
["Marshal's Refuge"] = 452,
["Camp Taurajo"] = 158,
["Zoram'gar Outpost"] = 299,
["Brackenwall Village"] = 231,
["Thunder Bluff"] = 250,
["Valormok"] = 236,
["Everlook"] = 366,
["Freewind Post"] = 252,
["Cenarion Hold"] = 450,
["Splintertree Post"] = 231,
["Camp Mojache"] = 320,
},
["Light's Hope Chapel"] = {
["Kargath"] = 492,
["Stonard"] = 773,
["Tarren Mill"] = 301,
["Grom'gol"] = 804,
["Revantusk Village"] = 141,
["Hammerfall"] = 234,
["Thorium Point"] = 547,
["Booty Bay"] = 884,
["The Sepulcher"] = 294,
["Flame Crest"] = 578,
["Undercity"] = 262,
},
["Brackenwall Village"] = {
["Marshal's Refuge"] = 329,
["Camp Mojache"] = 414,
["Gadgetzan"] = 222,
["Sun Rock Retreat"] = 311,
["Shadowprey Village"] = 383,
["Bloodvenom Post"] = 415,
["Ratchet"] = 214,
["Everlook"] = 445,
["Thunder Bluff"] = 224,
["Crossroads"] = 162,
["Camp Taurajo"] = 252,
["Valormok"] = 316,
["Freewind Post"] = 309,
["Cenarion Hold"] = 430,
["Splintertree Post"] = 306,
["Orgrimmar"] = 217,
},
["Revantusk Village"] = {
["Kargath"] = 351,
["Light's Hope Chapel"] = 139,
["Stonard"] = 631,
["Tarren Mill"] = 159,
["Grom'gol"] = 663,
["Hammerfall"] = 93,
["Thorium Point"] = 407,
["Booty Bay"] = 743,
["The Sepulcher"] = 257,
["Flame Crest"] = 437,
["Undercity"] = 284,
},
["Hammerfall"] = {
["Kargath"] = 259,
["Light's Hope Chapel"] = 229,
["Stonard"] = 539,
["Tarren Mill"] = 117,
["Grom'gol"] = 571,
["Revantusk Village"] = 91,
["Thorium Point"] = 314,
["Booty Bay"] = 651,
["The Sepulcher"] = 215,
["Flame Crest"] = 344,
["Undercity"] = 259,
},
["Booty Bay"] = {
["Kargath"] = 406,
["Light's Hope Chapel"] = 896,
["Thorium Point"] = 462,
["Tarren Mill"] = 783,
["Grom'gol"] = 102,
["Revantusk Village"] = 757,
["Hammerfall"] = 668,
["Undercity"] = 903,
["The Sepulcher"] = 882,
["Flame Crest"] = 464,
["Stonard"] = 267,
},
["Freewind Post"] = {
["Crossroads"] = 194,
["Gadgetzan"] = 93,
["Sun Rock Retreat"] = 343,
["Shadowprey Village"] = 323,
["Orgrimmar"] = 335,
["Camp Taurajo"] = 137,
["Zoram'gar Outpost"] = 424,
["Brackenwall Village"] = 315,
["Marshal's Refuge"] = 200,
["Ratchet"] = 245,
["Valormok"] = 362,
["Thunder Bluff"] = 225,
["Cenarion Hold"] = 252,
["Splintertree Post"] = 356,
["Camp Mojache"] = 124,
},
["The Sepulcher"] = {
["Kargath"] = 471,
["Light's Hope Chapel"] = 299,
["Stonard"] = 751,
["Tarren Mill"] = 95,
["Grom'gol"] = 782,
["Revantusk Village"] = 289,
["Hammerfall"] = 212,
["Booty Bay"] = 863,
["Thorium Point"] = 526,
["Flame Crest"] = 556,
["Undercity"] = 112,
},
["Flame Crest"] = {
["Undercity"] = 597,
["Light's Hope Chapel"] = 589,
["Stonard"] = 213,
["Tarren Mill"] = 477,
["Grom'gol"] = 401,
["Revantusk Village"] = 451,
["Hammerfall"] = 361,
["Booty Bay"] = 472,
["The Sepulcher"] = 576,
["Thorium Point"] = 72,
["Kargath"] = 99,
},
["Orgrimmar"] = {
["Marshal's Refuge"] = 494,
["Bloodvenom Post"] = 252,
["Moonglade"] = 361,
["Shadowprey Village"] = 385,
["Ratchet"] = 161,
["Brackenwall Village"] = 229,
["Freewind Post"] = 294,
["Gadgetzan"] = 417,
["Camp Taurajo"] = 200,
["Zoram'gar Outpost"] = 250,
["Everlook"] = 319,
["Crossroads"] = 110,
["Sun Rock Retreat"] = 260,
["Valormok"] = 99,
["Thunder Bluff"] = 224,
["Cenarion Hold"] = 492,
["Splintertree Post"] = 89,
["Camp Mojache"] = 361,
},
["Everlook"] = {
["Crossroads"] = 307,
["Bloodvenom Post"] = 195,
["Sun Rock Retreat"] = 456,
["Shadowprey Village"] = 550,
["Ratchet"] = 357,
["Brackenwall Village"] = 470,
["Orgrimmar"] = 304,
["Gadgetzan"] = 584,
["Camp Taurajo"] = 397,
["Zoram'gar Outpost"] = 388,
["Marshal's Refuge"] = 691,
["Moonglade"] = 134,
["Valormok"] = 135,
["Thunder Bluff"] = 392,
["Cenarion Hold"] = 688,
["Splintertree Post"] = 228,
["Camp Mojache"] = 558,
},
["Undercity"] = {
["Kargath"] = 488,
["Light's Hope Chapel"] = 261,
["Thorium Point"] = 543,
["Tarren Mill"] = 141,
["Grom'gol"] = 800,
["Revantusk Village"] = 284,
["Hammerfall"] = 301,
["Booty Bay"] = 880,
["The Sepulcher"] = 106,
["Flame Crest"] = 573,
["Stonard"] = 768,
},
["Gadgetzan"] = {
["Crossroads"] = 301,
["Bloodvenom Post"] = 532,
["Moonglade"] = 653,
["Shadowprey Village"] = 400,
["Ratchet"] = 331,
["Brackenwall Village"] = 222,
["Freewind Post"] = 87,
["Orgrimmar"] = 350,
["Camp Taurajo"] = 223,
["Zoram'gar Outpost"] = 510,
["Sun Rock Retreat"] = 429,
["Marshal's Refuge"] = 108,
["Everlook"] = 577,
["Thunder Bluff"] = 304,
["Valormok"] = 448,
["Cenarion Hold"] = 233,
["Splintertree Post"] = 439,
["Camp Mojache"] = 200,
},
["Thunder Bluff"] = {
["Marshal's Refuge"] = 397,
["Bloodvenom Post"] = 411,
["Sun Rock Retreat"] = 182,
["Shadowprey Village"] = 159,
["Ratchet"] = 210,
["Brackenwall Village"] = 239,
["Freewind Post"] = 204,
["Orgrimmar"] = 207,
["Gadgetzan"] = 290,
["Camp Taurajo"] = 87,
["Zoram'gar Outpost"] = 389,
["Everlook"] = 398,
["Moonglade"] = 532,
["Crossroads"] = 159,
["Valormok"] = 269,
["Cenarion Hold"] = 381,
["Splintertree Post"] = 296,
["Camp Mojache"] = 252,
},
["Camp Taurajo"] = {
["Marshal's Refuge"] = 325,
["Gadgetzan"] = 218,
["Sun Rock Retreat"] = 229,
["Shadowprey Village"] = 273,
["Ratchet"] = 130,
["Brackenwall Village"] = 242,
["Camp Mojache"] = 248,
["Crossroads"] = 79,
["Freewind Post"] = 125,
["Thunder Bluff"] = 114,
["Cenarion Hold"] = 378,
["Splintertree Post"] = 242,
["Orgrimmar"] = 221,
},
["Nighthaven"] = {
["Thunder Bluff"] = 543,
},
["Tarren Mill"] = {
["Kargath"] = 376,
["Light's Hope Chapel"] = 329,
["Stonard"] = 656,
["Grom'gol"] = 688,
["Revantusk Village"] = 195,
["Hammerfall"] = 118,
["Thorium Point"] = 431,
["Booty Bay"] = 768,
["The Sepulcher"] = 99,
["Flame Crest"] = 462,
["Undercity"] = 139,
},
["Grom'gol"] = {
["Kargath"] = 327,
["Light's Hope Chapel"] = 816,
["Stonard"] = 205,
["Tarren Mill"] = 704,
["Revantusk Village"] = 677,
["Hammerfall"] = 588,
["Undercity"] = 823,
["Booty Bay"] = 81,
["The Sepulcher"] = 802,
["Flame Crest"] = 402,
["Thorium Point"] = 382,
},
["Stonard"] = {
["Undercity"] = 782,
["Light's Hope Chapel"] = 774,
["Thorium Point"] = 267,
["Tarren Mill"] = 663,
["Grom'gol"] = 189,
["Revantusk Village"] = 636,
["Hammerfall"] = 547,
["Booty Bay"] = 260,
["The Sepulcher"] = 761,
["Flame Crest"] = 197,
["Kargath"] = 285,
},
["Zoram'gar Outpost"] = {
["Crossroads"] = 228,
["Gadgetzan"] = 504,
["Sun Rock Retreat"] = 378,
["Marshal's Refuge"] = 611,
["Camp Taurajo"] = 318,
["Ratchet"] = 279,
["Brackenwall Village"] = 391,
["Bloodvenom Post"] = 481,
["Valormok"] = 256,
["Thunder Bluff"] = 410,
["Everlook"] = 384,
["Freewind Post"] = 412,
["Splintertree Post"] = 167,
["Orgrimmar"] = 256,
},
["Marshal's Refuge"] = {
["Crossroads"] = 392,
["Bloodvenom Post"] = 645,
["Sun Rock Retreat"] = 542,
["Shadowprey Village"] = 424,
["Ratchet"] = 443,
["Brackenwall Village"] = 333,
["Freewind Post"] = 200,
["Orgrimmar"] = 462,
["Gadgetzan"] = 113,
["Camp Taurajo"] = 336,
["Everlook"] = 689,
["Moonglade"] = 766,
["Thunder Bluff"] = 416,
["Valormok"] = 559,
["Cenarion Hold"] = 100,
["Splintertree Post"] = 551,
["Camp Mojache"] = 224,
},
["Moonglade"] = {
["Crossroads"] = 353,
["Bloodvenom Post"] = 157,
["Sun Rock Retreat"] = 502,
["Shadowprey Village"] = 645,
["Ratchet"] = 404,
["Brackenwall Village"] = 515,
["Everlook"] = 142,
["Orgrimmar"] = 370,
["Gadgetzan"] = 629,
["Camp Taurajo"] = 443,
["Zoram'gar Outpost"] = 528,
["Marshal's Refuge"] = 736,
["Freewind Post"] = 537,
["Thunder Bluff"] = 532,
["Valormok"] = 275,
["Cenarion Hold"] = 734,
["Splintertree Post"] = 369,
["Camp Mojache"] = 604,
},
["Valormok"] = {
["Marshal's Refuge"] = 556,
["Bloodvenom Post"] = 232,
["Sun Rock Retreat"] = 322,
["Shadowprey Village"] = 416,
["Ratchet"] = 223,
["Brackenwall Village"] = 335,
["Everlook"] = 131,
["Orgrimmar"] = 121,
["Camp Taurajo"] = 263,
["Zoram'gar Outpost"] = 253,
["Moonglade"] = 264,
["Crossroads"] = 172,
["Freewind Post"] = 357,
["Thunder Bluff"] = 257,
["Cenarion Hold"] = 553,
["Splintertree Post"] = 94,
["Camp Mojache"] = 423,
},
["Cenarion Hold"] = {
["Marshal's Refuge"] = 97,
["Gadgetzan"] = 241,
["Moonglade"] = 768,
["Shadowprey Village"] = 330,
["Camp Taurajo"] = 373,
["Brackenwall Village"] = 425,
["Camp Mojache"] = 129,
["Crossroads"] = 394,
["Valormok"] = 562,
["Freewind Post"] = 236,
["Thunder Bluff"] = 389,
["Ratchet"] = 445,
["Orgrimmar"] = 535,
},
["Splintertree Post"] = {
["Marshal's Refuge"] = 544,
["Bloodvenom Post"] = 327,
["Moonglade"] = 356,
["Shadowprey Village"] = 453,
["Ratchet"] = 212,
["Brackenwall Village"] = 323,
["Freewind Post"] = 345,
["Orgrimmar"] = 96,
["Gadgetzan"] = 436,
["Camp Taurajo"] = 250,
["Zoram'gar Outpost"] = 166,
["Crossroads"] = 160,
["Everlook"] = 224,
["Valormok"] = 96,
["Thunder Bluff"] = 321,
["Cenarion Hold"] = 541,
["Sun Rock Retreat"] = 310,
["Camp Mojache"] = 412,
},
["Camp Mojache"] = {
["Crossroads"] = 263,
["Gadgetzan"] = 201,
["Bloodvenom Post"] = 517,
["Sun Rock Retreat"] = 400,
["Shadowprey Village"] = 201,
["Camp Taurajo"] = 244,
["Ratchet"] = 315,
["Zoram'gar Outpost"] = 494,
["Brackenwall Village"] = 421,
["Marshal's Refuge"] = 222,
["Valormok"] = 432,
["Thunder Bluff"] = 259,
["Freewind Post"] = 107,
["Cenarion Hold"] = 130,
["Splintertree Post"] = 426,
["Orgrimmar"] = 406,
},
},
["Alliance"] = {
["Marshal's Refuge"] = {
["Gadgetzan"] = 104,
["Ratchet"] = 364,
["Theramore"] = 257,
["Everlook"] = 670,
["Talonbranch Glade"] = 774,
["Astranaar"] = 856,
["Cenarion Hold"] = 94,
["Feathermoon"] = 258,
["Rut'theran Village"] = 809,
},
["Light's Hope Chapel"] = {
["Morgan's Vigil"] = 503,
["Nethergarde Keep"] = 704,
["Thorium Point"] = 417,
["Aerie Peak"] = 163,
["Menethil Harbor"] = 333,
["Ironforge"] = 369,
["Darkshire"] = 591,
["Chillwind Camp"] = 150,
["Southshore"] = 226,
},
["Ratchet"] = {
["Marshal's Refuge"] = 366,
["Gadgetzan"] = 261,
["Rut'theran Village"] = 805,
["Theramore"] = 106,
["Thalanaar"] = 268,
["Everlook"] = 310,
["Talrendis Point"] = 132,
["Talonbranch Glade"] = 415,
["Stonetalon Peak"] = 437,
["Astranaar"] = 284,
["Cenarion Hold"] = 459,
["Feathermoon"] = 446,
["Nijel's Point"] = 439,
},
["Talrendis Point"] = {
["Marshal's Refuge"] = 494,
["Gadgetzan"] = 391,
["Theramore"] = 241,
["Ratchet"] = 135,
["Auberdine"] = 301,
["Talonbranch Glade"] = 283,
["Cenarion Hold"] = 588,
["Astranaar"] = 153,
["Everlook"] = 178,
},
["Chillwind Camp"] = {
["Refuge Pointe"] = 138,
["Thorium Point"] = 309,
["Aerie Peak"] = 66,
["Morgan's Vigil"] = 395,
["Stormwind"] = 432,
["Ironforge"] = 261,
["Menethil Harbor"] = 193,
["Booty Bay"] = 662,
["Light's Hope Chapel"] = 147,
["Sentinel Hill"] = 495,
["Southshore"] = 85,
},
["Nijel's Point"] = {
["Gadgetzan"] = 464,
["Theramore"] = 308,
["Ratchet"] = 422,
["Thalanaar"] = 472,
["Stonetalon Peak"] = 120,
["Astranaar"] = 273,
["Auberdine"] = 282,
["Feathermoon"] = 232,
["Rut'theran Village"] = 367,
},
["Gadgetzan"] = {
["Marshal's Refuge"] = 104,
["Rut'theran Village"] = 772,
["Theramore"] = 154,
["Ratchet"] = 262,
["Astranaar"] = 540,
["Everlook"] = 566,
["Talrendis Point"] = 388,
["Talonbranch Glade"] = 670,
["Stonetalon Peak"] = 692,
["Thalanaar"] = 177,
["Cenarion Hold"] = 197,
["Feathermoon"] = 354,
["Nijel's Point"] = 480,
},
["Thelsamar"] = {
["Refuge Pointe"] = 164,
["Nethergarde Keep"] = 441,
["Thorium Point"] = 152,
["Darkshire"] = 326,
["Stormwind"] = 279,
["Lakeshire"] = 267,
["Menethil Harbor"] = 153,
["Sentinel Hill"] = 342,
["Ironforge"] = 109,
["Booty Bay"] = 508,
["Chillwind Camp"] = 285,
["Southshore"] = 250,
},
["Thalanaar"] = {
["Marshal's Refuge"] = 274,
["Gadgetzan"] = 171,
["Nijel's Point"] = 405,
["Theramore"] = 159,
["Feathermoon"] = 179,
["Ratchet"] = 274,
["Rut'theran Village"] = 729,
},
["Feathermoon"] = {
["Gadgetzan"] = 326,
["Moonglade"] = 619,
["Auberdine"] = 468,
["Rut'theran Village"] = 551,
["Everlook"] = 748,
["Stonetalon Peak"] = 648,
["Astranaar"] = 500,
["Thalanaar"] = 155,
["Theramore"] = 314,
["Nijel's Point"] = 227,
},
["Southshore"] = {
["Refuge Pointe"] = 74,
["Thelsamar"] = 244,
["Aerie Peak"] = 71,
["Darkshire"] = 468,
["Stormwind"] = 367,
["Menethil Harbor"] = 110,
["Sentinel Hill"] = 430,
["Ironforge"] = 206,
["Booty Bay"] = 597,
["Chillwind Camp"] = 81,
["Light's Hope Chapel"] = 219,
},
["Refuge Pointe"] = {
["Light's Hope Chapel"] = 233,
["Nethergarde Keep"] = 547,
["Aerie Peak"] = 72,
["Darkshire"] = 485,
["Booty Bay"] = 614,
["Menethil Harbor"] = 126,
["Ironforge"] = 271,
["Thelsamar"] = 171,
["Chillwind Camp"] = 122,
["Southshore"] = 86,
},
["Thorium Point"] = {
["Morgan's Vigil"] = 96,
["Thelsamar"] = 152,
["Light's Hope Chapel"] = 398,
["Nethergarde Keep"] = 265,
["Ironforge"] = 94,
["Chillwind Camp"] = 342,
["Menethil Harbor"] = 178,
},
["Theramore"] = {
["Marshal's Refuge"] = 261,
["Gadgetzan"] = 157,
["Moonglade"] = 535,
["Nijel's Point"] = 334,
["Auberdine"] = 620,
["Ratchet"] = 115,
["Talonbranch Glade"] = 518,
["Astranaar"] = 387,
["Talrendis Point"] = 235,
["Everlook"] = 414,
["Stonetalon Peak"] = 801,
["Thalanaar"] = 162,
["Cenarion Hold"] = 354,
["Feathermoon"] = 341,
["Rut'theran Village"] = 619,
},
["Aerie Peak"] = {
["Refuge Pointe"] = 75,
["Nethergarde Keep"] = 591,
["Light's Hope Chapel"] = 164,
["Darkshire"] = 531,
["Thelsamar"] = 245,
["Stormwind"] = 429,
["Ironforge"] = 256,
["Menethil Harbor"] = 176,
["Booty Bay"] = 658,
["Sentinel Hill"] = 492,
["Chillwind Camp"] = 54,
["Southshore"] = 68,
},
["Lakeshire"] = {
["Morgan's Vigil"] = 61,
["Thorium Point"] = 153,
["Light's Hope Chapel"] = 540,
["Stormwind"] = 113,
["Thelsamar"] = 415,
["Sentinel Hill"] = 133,
["Booty Bay"] = 227,
["Ironforge"] = 357,
["Menethil Harbor"] = 441,
["Darkshire"] = 60,
},
["Menethil Harbor"] = {
["Light's Hope Chapel"] = 324,
["Thelsamar"] = 163,
["Darkshire"] = 309,
["Nethergarde Keep"] = 423,
["Thorium Point"] = 135,
["Refuge Pointe"] = 113,
["Aerie Peak"] = 176,
["Booty Bay"] = 490,
["Lakeshire"] = 250,
["Morgan's Vigil"] = 221,
["Sentinel Hill"] = 324,
["Ironforge"] = 89,
["Stormwind"] = 261,
["Chillwind Camp"] = 186,
["Southshore"] = 107,
},
["Everlook"] = {
["Gadgetzan"] = 564,
["Moonglade"] = 122,
["Auberdine"] = 262,
["Astranaar"] = 327,
["Rut'theran Village"] = 346,
["Theramore"] = 408,
["Ratchet"] = 309,
["Thalanaar"] = 572,
["Talonbranch Glade"] = 122,
["Talrendis Point"] = 176,
["Feathermoon"] = 734,
["Nijel's Point"] = 553,
},
["Rut'theran Village"] = {
["Marshal's Refuge"] = 797,
["Gadgetzan"] = 774,
["Moonglade"] = 236,
["Talrendis Point"] = 385,
["Auberdine"] = 86,
["Ratchet"] = 519,
["Theramore"] = 617,
["Astranaar"] = 261,
["Thalanaar"] = 711,
["Talonbranch Glade"] = 274,
["Stonetalon Peak"] = 267,
["Everlook"] = 365,
["Cenarion Hold"] = 714,
["Feathermoon"] = 557,
["Nijel's Point"] = 376,
},
["Ironforge"] = {
["Light's Hope Chapel"] = 349,
["Refuge Pointe"] = 253,
["Morgan's Vigil"] = 173,
["Nethergarde Keep"] = 373,
["Thorium Point"] = 87,
["Thelsamar"] = 101,
["Aerie Peak"] = 298,
["Stormwind"] = 210,
["Lakeshire"] = 201,
["Menethil Harbor"] = 128,
["Sentinel Hill"] = 274,
["Booty Bay"] = 440,
["Darkshire"] = 260,
["Chillwind Camp"] = 294,
["Southshore"] = 265,
},
["Darkshire"] = {
["Refuge Pointe"] = 524,
["Nethergarde Keep"] = 97,
["Thorium Point"] = 212,
["Aerie Peak"] = 582,
["Thelsamar"] = 391,
["Lakeshire"] = 60,
["Booty Bay"] = 171,
["Sentinel Hill"] = 93,
["Ironforge"] = 333,
["Stormwind"] = 88,
["Menethil Harbor"] = 417,
["Southshore"] = 517,
},
["Nethergarde Keep"] = {
["Darkshire"] = 91,
["Thorium Point"] = 300,
["Light's Hope Chapel"] = 687,
["Stormwind"] = 189,
["Ironforge"] = 382,
["Menethil Harbor"] = 467,
["Booty Bay"] = 260,
["Morgan's Vigil"] = 207,
["Chillwind Camp"] = 631,
["Lakeshire"] = 150,
},
["Nighthaven"] = {
["Rut'theran Village"] = 152,
},
["Booty Bay"] = {
["Darkshire"] = 175,
["Nethergarde Keep"] = 266,
["Morgan's Vigil"] = 291,
["Thelsamar"] = 523,
["Refuge Pointe"] = 655,
["Lakeshire"] = 230,
["Menethil Harbor"] = 548,
["Sentinel Hill"] = 181,
["Ironforge"] = 464,
["Stormwind"] = 220,
["Chillwind Camp"] = 712,
["Southshore"] = 649,
},
["Astranaar"] = {
["Auberdine"] = 148,
["Rut'theran Village"] = 231,
["Ratchet"] = 283,
["Talonbranch Glade"] = 337,
["Stonetalon Peak"] = 153,
["Talrendis Point"] = 150,
["Theramore"] = 381,
["Feathermoon"] = 511,
["Nijel's Point"] = 279,
},
["Auberdine"] = {
["Gadgetzan"] = 689,
["Moonglade"] = 151,
["Theramore"] = 675,
["Rut'theran Village"] = 84,
["Ratchet"] = 435,
["Everlook"] = 281,
["Talrendis Point"] = 301,
["Stonetalon Peak"] = 181,
["Talonbranch Glade"] = 190,
["Astranaar"] = 176,
["Feathermoon"] = 473,
["Nijel's Point"] = 291,
},
["Stormwind"] = {
["Thelsamar"] = 317,
["Darkshire"] = 116,
["Light's Hope Chapel"] = 563,
["Nethergarde Keep"] = 176,
["Thorium Point"] = 247,
["Refuge Pointe"] = 450,
["Aerie Peak"] = 508,
["Booty Bay"] = 245,
["Lakeshire"] = 113,
["Menethil Harbor"] = 343,
["Sentinel Hill"] = 78,
["Ironforge"] = 259,
["Morgan's Vigil"] = 157,
["Chillwind Camp"] = 506,
["Southshore"] = 443,
},
["Stonetalon Peak"] = {
["Rut'theran Village"] = 261,
["Astranaar"] = 154,
["Theramore"] = 434,
["Auberdine"] = 177,
["Nijel's Point"] = 126,
},
["Sentinel Hill"] = {
["Thelsamar"] = 389,
["Nethergarde Keep"] = 186,
["Thorium Point"] = 282,
["Stormwind"] = 86,
["Menethil Harbor"] = 414,
["Booty Bay"] = 185,
["Lakeshire"] = 130,
["Ironforge"] = 331,
["Darkshire"] = 97,
},
["Talonbranch Glade"] = {
["Marshal's Refuge"] = 776,
["Gadgetzan"] = 671,
["Auberdine"] = 188,
["Astranaar"] = 363,
["Rut'theran Village"] = 272,
["Everlook"] = 121,
["Talrendis Point"] = 282,
["Feathermoon"] = 660,
["Nijel's Point"] = 478,
},
["Cenarion Hold"] = {
["Marshal's Refuge"] = 92,
["Talrendis Point"] = 576,
["Theramore"] = 342,
["Talonbranch Glade"] = 831,
["Thalanaar"] = 329,
["Feathermoon"] = 175,
["Rut'theran Village"] = 726,
},
["Moonglade"] = {
["Gadgetzan"] = 694,
["Auberdine"] = 142,
["Nijel's Point"] = 433,
["Theramore"] = 537,
["Talrendis Point"] = 305,
["Talonbranch Glade"] = 61,
["Astranaar"] = 318,
["Everlook"] = 131,
["Cenarion Hold"] = 771,
["Feathermoon"] = 614,
["Rut'theran Village"] = 226,
},
["Morgan's Vigil"] = {
["Darkshire"] = 121,
["Thelsamar"] = 245,
["Nethergarde Keep"] = 210,
["Thorium Point"] = 104,
["Refuge Pointe"] = 378,
["Aerie Peak"] = 436,
["Stormwind"] = 151,
["Lakeshire"] = 64,
["Booty Bay"] = 288,
["Sentinel Hill"] = 195,
["Ironforge"] = 187,
["Menethil Harbor"] = 270,
["Chillwind Camp"] = 435,
["Light's Hope Chapel"] = 491,
},
},
},
}
tags/1.13.005_Classic/InFlight/InFlight.toc New file
0,0 → 1,27
## Interface: 11303
## Title: InFlight
## Notes: Status bar timer for your flight paths
## Notes-deDE: Statusleisten-Zeitanzeige für Ihre Flugrouten
## Notes-esES: Temporizador barra de estado para sus rutas de vuelo
## Notes-esMX: Temporizador barra de estado para sus rutas de vuelo
## Notes-frFR: Minuterie de barre d'état pour vos trajectoires de vol
## Notes-itIT: Timer della barra di stato per le tue traiettorie di volo
## Notes-koKR: 비행 경로에 대한 상태 표시 줄 타이머
## Notes-ptBR: Temporizador da barra de status para suas rotas de voo
## Notes-ruRU: Таймер строки состояния для ваших маршрутов полета
## Notes-zhCN: 您的航班路径的状态栏计时器
## Notes-zhTW: 您的航班路徑的狀態欄計時器
## Author: TotalPackage
## Version: 1.13.005
 
## SavedVariables: InFlightDB
## Dependencies: InFlight_Load
## OptionalDeps: Ace3, LibSharedMedia-3.0
 
## LoadOnDemand: 1
 
embeds.xml
 
locales\locales.xml
Defaults.lua
InFlight.lua
tags/1.13.005_Classic/InFlight/libs/LibStub/LibStub.lua New file
0,0 → 1,30
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
local LibStub = _G[LIBSTUB_MAJOR]
 
if not LibStub or LibStub.minor < LIBSTUB_MINOR then
LibStub = LibStub or {libs = {}, minors = {} }
_G[LIBSTUB_MAJOR] = LibStub
LibStub.minor = LIBSTUB_MINOR
 
function LibStub:NewLibrary(major, minor)
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
 
local oldminor = self.minors[major]
if oldminor and oldminor >= minor then return nil end
self.minors[major], self.libs[major] = minor, self.libs[major] or {}
return self.libs[major], oldminor
end
 
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)
end
return self.libs[major], self.minors[major]
end
 
function LibStub:IterateLibraries() return pairs(self.libs) end
setmetatable(LibStub, { __call = LibStub.GetLibrary })
end
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/libs/AceLocale-3.0/AceLocale-3.0.xml New file
0,0 → 1,4
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="AceLocale-3.0.lua"/>
</Ui>
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/libs/AceLocale-3.0/AceLocale-3.0.lua New file
0,0 → 1,137
--- **AceLocale-3.0** manages localization in addons, allowing for multiple locale to be registered with fallback to the base locale for untranslated strings.
-- @class file
-- @name AceLocale-3.0
-- @release $Id: AceLocale-3.0.lua 1035 2011-07-09 03:20:13Z kaelten $
local MAJOR,MINOR = "AceLocale-3.0", 6
 
local AceLocale, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceLocale then return end -- no upgrade needed
 
-- Lua APIs
local assert, tostring, error = assert, tostring, error
local getmetatable, setmetatable, rawset, rawget = getmetatable, setmetatable, rawset, rawget
 
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
-- List them here for Mikk's FindGlobals script
-- GLOBALS: GAME_LOCALE, geterrorhandler
 
local gameLocale = GetLocale()
if gameLocale == "enGB" then
gameLocale = "enUS"
end
 
AceLocale.apps = AceLocale.apps or {} -- array of ["AppName"]=localetableref
AceLocale.appnames = AceLocale.appnames or {} -- array of [localetableref]="AppName"
 
-- This metatable is used on all tables returned from GetLocale
local readmeta = {
__index = function(self, key) -- requesting totally unknown entries: fire off a nonbreaking error and return key
rawset(self, key, key) -- only need to see the warning once, really
geterrorhandler()(MAJOR..": "..tostring(AceLocale.appnames[self])..": Missing entry for '"..tostring(key).."'")
return key
end
}
 
-- This metatable is used on all tables returned from GetLocale if the silent flag is true, it does not issue a warning on unknown keys
local readmetasilent = {
__index = function(self, key) -- requesting totally unknown entries: return key
rawset(self, key, key) -- only need to invoke this function once
return key
end
}
 
-- Remember the locale table being registered right now (it gets set by :NewLocale())
-- NOTE: Do never try to register 2 locale tables at once and mix their definition.
local registering
 
-- local assert false function
local assertfalse = function() assert(false) end
 
-- This metatable proxy is used when registering nondefault locales
local writeproxy = setmetatable({}, {
__newindex = function(self, key, value)
rawset(registering, key, value == true and key or value) -- assigning values: replace 'true' with key string
end,
__index = assertfalse
})
 
-- This metatable proxy is used when registering the default locale.
-- It refuses to overwrite existing values
-- Reason 1: Allows loading locales in any order
-- Reason 2: If 2 modules have the same string, but only the first one to be
-- loaded has a translation for the current locale, the translation
-- doesn't get overwritten.
--
local writedefaultproxy = setmetatable({}, {
__newindex = function(self, key, value)
if not rawget(registering, key) then
rawset(registering, key, value == true and key or value)
end
end,
__index = assertfalse
})
 
--- Register a new locale (or extend an existing one) for the specified application.
-- :NewLocale will return a table you can fill your locale into, or nil if the locale isn't needed for the players
-- game locale.
-- @paramsig application, locale[, isDefault[, silent]]
-- @param application Unique name of addon / module
-- @param locale Name of the locale to register, e.g. "enUS", "deDE", etc.
-- @param isDefault If this is the default locale being registered (your addon is written in this language, generally enUS)
-- @param silent If true, the locale will not issue warnings for missing keys. Must be set on the first locale registered. If set to "raw", nils will be returned for unknown keys (no metatable used).
-- @usage
-- -- enUS.lua
-- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "enUS", true)
-- L["string1"] = true
--
-- -- deDE.lua
-- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "deDE")
-- if not L then return end
-- L["string1"] = "Zeichenkette1"
-- @return Locale Table to add localizations to, or nil if the current locale is not required.
function AceLocale:NewLocale(application, locale, isDefault, silent)
 
-- GAME_LOCALE allows translators to test translations of addons without having that wow client installed
local gameLocale = GAME_LOCALE or gameLocale
 
local app = AceLocale.apps[application]
 
if silent and app and getmetatable(app) ~= readmetasilent then
geterrorhandler()("Usage: NewLocale(application, locale[, isDefault[, silent]]): 'silent' must be specified for the first locale registered")
end
 
if not app then
if silent=="raw" then
app = {}
else
app = setmetatable({}, silent and readmetasilent or readmeta)
end
AceLocale.apps[application] = app
AceLocale.appnames[app] = application
end
 
if locale ~= gameLocale and not isDefault then
return -- nop, we don't need these translations
end
 
registering = app -- remember globally for writeproxy and writedefaultproxy
 
if isDefault then
return writedefaultproxy
end
 
return writeproxy
end
 
--- Returns localizations for the current locale (or default locale if translations are missing).
-- Errors if nothing is registered (spank developer, not just a missing translation)
-- @param application Unique name of addon / module
-- @param silent If true, the locale is optional, silently return nil if it's not found (defaults to false, optional)
-- @return The locale table for the current language.
function AceLocale:GetLocale(application, silent)
if not silent and not AceLocale.apps[application] then
error("Usage: GetLocale(application[, silent]): 'application' - No locales registered for '"..tostring(application).."'", 2)
end
return AceLocale.apps[application]
end
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/libs/CallbackHandler-1.0/CallbackHandler-1.0.xml New file
0,0 → 1,4
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="CallbackHandler-1.0.lua"/>
</Ui>
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua New file
0,0 → 1,212
--[[ $Id: CallbackHandler-1.0.lua 1186 2018-07-21 14:19:18Z nevcairiel $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 7
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
 
if not CallbackHandler then return end -- No upgrade needed
 
local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
 
-- Lua APIs
local tconcat = table.concat
local assert, error, loadstring = assert, error, loadstring
local setmetatable, rawset, rawget = setmetatable, rawset, rawget
local next, select, pairs, type, tostring = next, select, pairs, type, tostring
 
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
-- List them here for Mikk's FindGlobals script
-- GLOBALS: geterrorhandler
 
local xpcall = xpcall
 
local function errorhandler(err)
return geterrorhandler()(err)
end
 
local function Dispatch(handlers, ...)
local index, method = next(handlers)
if not method then return end
repeat
xpcall(method, errorhandler, ...)
index, method = next(handlers, index)
until not method
end
 
--------------------------------------------------------------------------
-- CallbackHandler:New
--
-- target - target object to embed public APIs in
-- RegisterName - name of the callback registration API, default "RegisterCallback"
-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback"
-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
 
function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName)
 
RegisterName = RegisterName or "RegisterCallback"
UnregisterName = UnregisterName or "UnregisterCallback"
if UnregisterAllName==nil then -- false is used to indicate "don't want this method"
UnregisterAllName = "UnregisterAllCallbacks"
end
 
-- we declare all objects and exported APIs inside this closure to quickly gain access
-- to e.g. function names, the "target" parameter, etc
 
 
-- Create the registry object
local events = setmetatable({}, meta)
local registry = { recurse=0, events=events }
 
-- registry:Fire() - fires the given event/message into the registry
function registry:Fire(eventname, ...)
if not rawget(events, eventname) or not next(events[eventname]) then return end
local oldrecurse = registry.recurse
registry.recurse = oldrecurse + 1
 
Dispatch(events[eventname], eventname, ...)
 
registry.recurse = oldrecurse
 
if registry.insertQueue and oldrecurse==0 then
-- Something in one of our callbacks wanted to register more callbacks; they got queued
for eventname,callbacks in pairs(registry.insertQueue) do
local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
for self,func in pairs(callbacks) do
events[eventname][self] = func
-- fire OnUsed callback?
if first and registry.OnUsed then
registry.OnUsed(registry, target, eventname)
first = nil
end
end
end
registry.insertQueue = nil
end
end
 
-- Registration of a callback, handles:
-- self["method"], leads to self["method"](self, ...)
-- self with function ref, leads to functionref(...)
-- "addonId" (instead of self) with function ref, leads to functionref(...)
-- all with an optional arg, which, if present, gets passed as first argument (after self if present)
target[RegisterName] = function(self, eventname, method, ... --[[actually just a single arg]])
if type(eventname) ~= "string" then
error("Usage: "..RegisterName.."(eventname, method[, arg]): 'eventname' - string expected.", 2)
end
 
method = method or eventname
 
local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
 
if type(method) ~= "string" and type(method) ~= "function" then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - string or function expected.", 2)
end
 
local regfunc
 
if type(method) == "string" then
-- self["method"] calling style
if type(self) ~= "table" then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): self was not a table?", 2)
elseif self==target then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): do not use Library:"..RegisterName.."(), use your own 'self'", 2)
elseif type(self[method]) ~= "function" then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - method '"..tostring(method).."' not found on self.", 2)
end
 
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
local arg=select(1,...)
regfunc = function(...) self[method](self,arg,...) end
else
regfunc = function(...) self[method](self,...) end
end
else
-- function ref with self=object or self="addonId" or self=thread
if type(self)~="table" and type(self)~="string" and type(self)~="thread" then
error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2)
end
 
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
local arg=select(1,...)
regfunc = function(...) method(arg,...) end
else
regfunc = method
end
end
 
 
if events[eventname][self] or registry.recurse<1 then
-- if registry.recurse<1 then
-- we're overwriting an existing entry, or not currently recursing. just set it.
events[eventname][self] = regfunc
-- fire OnUsed callback?
if registry.OnUsed and first then
registry.OnUsed(registry, target, eventname)
end
else
-- we're currently processing a callback in this registry, so delay the registration of this new entry!
-- yes, we're a bit wasteful on garbage, but this is a fringe case, so we're picking low implementation overhead over garbage efficiency
registry.insertQueue = registry.insertQueue or setmetatable({},meta)
registry.insertQueue[eventname][self] = regfunc
end
end
 
-- Unregister a callback
target[UnregisterName] = function(self, eventname)
if not self or self==target then
error("Usage: "..UnregisterName.."(eventname): bad 'self'", 2)
end
if type(eventname) ~= "string" then
error("Usage: "..UnregisterName.."(eventname): 'eventname' - string expected.", 2)
end
if rawget(events, eventname) and events[eventname][self] then
events[eventname][self] = nil
-- Fire OnUnused callback?
if registry.OnUnused and not next(events[eventname]) then
registry.OnUnused(registry, target, eventname)
end
end
if registry.insertQueue and rawget(registry.insertQueue, eventname) and registry.insertQueue[eventname][self] then
registry.insertQueue[eventname][self] = nil
end
end
 
-- OPTIONAL: Unregister all callbacks for given selfs/addonIds
if UnregisterAllName then
target[UnregisterAllName] = function(...)
if select("#",...)<1 then
error("Usage: "..UnregisterAllName.."([whatFor]): missing 'self' or \"addonId\" to unregister events for.", 2)
end
if select("#",...)==1 and ...==target then
error("Usage: "..UnregisterAllName.."([whatFor]): supply a meaningful 'self' or \"addonId\"", 2)
end
 
 
for i=1,select("#",...) do
local self = select(i,...)
if registry.insertQueue then
for eventname, callbacks in pairs(registry.insertQueue) do
if callbacks[self] then
callbacks[self] = nil
end
end
end
for eventname, callbacks in pairs(events) do
if callbacks[self] then
callbacks[self] = nil
-- Fire OnUnused callback?
if registry.OnUnused and not next(callbacks) then
registry.OnUnused(registry, target, eventname)
end
end
end
end
end
end
 
return registry
end
 
 
-- CallbackHandler purposefully does NOT do explicit embedding. Nor does it
-- try to upgrade old implicit embeds since the system is selfcontained and
-- relies on closures to work.
 
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/libs/LibSharedMedia-3.0/lib.xml New file
0,0 → 1,4
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="LibSharedMedia-3.0.lua" />
</Ui>
tags/1.13.005_Classic/InFlight/libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua New file
0,0 → 1,298
--[[
Name: LibSharedMedia-3.0
Revision: $Revision: 112 $
Author: Elkano (elkano@gmx.de)
Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com)
Website: http://www.wowace.com/projects/libsharedmedia-3-0/
Description: Shared handling of media data (fonts, sounds, textures, ...) between addons.
Dependencies: LibStub, CallbackHandler-1.0
License: LGPL v2.1
]]
 
local MAJOR, MINOR = "LibSharedMedia-3.0", 8020001 -- 8.2.0 v1 / increase manually on changes
local lib = LibStub:NewLibrary(MAJOR, MINOR)
 
if not lib then return end
 
local _G = getfenv(0)
 
local pairs = _G.pairs
local type = _G.type
 
local band = _G.bit.band
local table_sort = _G.table.sort
 
local locale = GetLocale()
local locale_is_western
local LOCALE_MASK = 0
lib.LOCALE_BIT_koKR = 1
lib.LOCALE_BIT_ruRU = 2
lib.LOCALE_BIT_zhCN = 4
lib.LOCALE_BIT_zhTW = 8
lib.LOCALE_BIT_western = 128
 
local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")
 
lib.callbacks = lib.callbacks or CallbackHandler:New(lib)
 
lib.DefaultMedia = lib.DefaultMedia or {}
lib.MediaList = lib.MediaList or {}
lib.MediaTable = lib.MediaTable or {}
lib.MediaType = lib.MediaType or {}
lib.OverrideMedia = lib.OverrideMedia or {}
 
local defaultMedia = lib.DefaultMedia
local mediaList = lib.MediaList
local mediaTable = lib.MediaTable
local overrideMedia = lib.OverrideMedia
 
 
-- create mediatype constants
lib.MediaType.BACKGROUND = "background" -- background textures
lib.MediaType.BORDER = "border" -- border textures
lib.MediaType.FONT = "font" -- fonts
lib.MediaType.STATUSBAR = "statusbar" -- statusbar textures
lib.MediaType.SOUND = "sound" -- sound files
 
-- populate lib with default Blizzard data
-- BACKGROUND
if not lib.MediaTable.background then lib.MediaTable.background = {} end
lib.MediaTable.background["None"] = [[]]
lib.MediaTable.background["Blizzard Collections Background"] = [[Interface\Collections\CollectionsBackgroundTile]]
lib.MediaTable.background["Blizzard Dialog Background"] = [[Interface\DialogFrame\UI-DialogBox-Background]]
lib.MediaTable.background["Blizzard Dialog Background Dark"] = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]]
lib.MediaTable.background["Blizzard Dialog Background Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]]
lib.MediaTable.background["Blizzard Garrison Background"] = [[Interface\Garrison\GarrisonUIBackground]]
lib.MediaTable.background["Blizzard Garrison Background 2"] = [[Interface\Garrison\GarrisonUIBackground2]]
lib.MediaTable.background["Blizzard Garrison Background 3"] = [[Interface\Garrison\GarrisonMissionUIInfoBoxBackgroundTile]]
lib.MediaTable.background["Blizzard Low Health"] = [[Interface\FullScreenTextures\LowHealth]]
lib.MediaTable.background["Blizzard Marble"] = [[Interface\FrameGeneral\UI-Background-Marble]]
lib.MediaTable.background["Blizzard Out of Control"] = [[Interface\FullScreenTextures\OutOfControl]]
lib.MediaTable.background["Blizzard Parchment"] = [[Interface\AchievementFrame\UI-Achievement-Parchment-Horizontal]]
lib.MediaTable.background["Blizzard Parchment 2"] = [[Interface\AchievementFrame\UI-GuildAchievement-Parchment-Horizontal]]
lib.MediaTable.background["Blizzard Rock"] = [[Interface\FrameGeneral\UI-Background-Rock]]
lib.MediaTable.background["Blizzard Tabard Background"] = [[Interface\TabardFrame\TabardFrameBackground]]
lib.MediaTable.background["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Background]]
lib.MediaTable.background["Solid"] = [[Interface\Buttons\WHITE8X8]]
lib.DefaultMedia.background = "None"
 
-- BORDER
if not lib.MediaTable.border then lib.MediaTable.border = {} end
lib.MediaTable.border["None"] = [[]]
lib.MediaTable.border["Blizzard Achievement Wood"] = [[Interface\AchievementFrame\UI-Achievement-WoodBorder]]
lib.MediaTable.border["Blizzard Chat Bubble"] = [[Interface\Tooltips\ChatBubble-Backdrop]]
lib.MediaTable.border["Blizzard Dialog"] = [[Interface\DialogFrame\UI-DialogBox-Border]]
lib.MediaTable.border["Blizzard Dialog Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Border]]
lib.MediaTable.border["Blizzard Party"] = [[Interface\CHARACTERFRAME\UI-Party-Border]]
lib.MediaTable.border["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Border]]
lib.DefaultMedia.border = "None"
 
-- FONT
if not lib.MediaTable.font then lib.MediaTable.font = {} end
local SML_MT_font = lib.MediaTable.font
--[[
All font files are currently in all clients, the following table depicts which font supports which charset as of 5.0.4
Fonts were checked using langcover.pl from DejaVu fonts (http://sourceforge.net/projects/dejavu/) and FontForge (http://fontforge.org/)
latin means check for: de, en, es, fr, it, pt
 
file name latin koKR ruRU zhCN zhTW
2002.ttf 2002 X X X - -
2002B.ttf 2002 Bold X X X - -
ARHei.ttf AR CrystalzcuheiGBK Demibold X - X X X
ARIALN.TTF Arial Narrow X - X - -
ARKai_C.ttf AR ZhongkaiGBK Medium (Combat) X - X X X
ARKai_T.ttf AR ZhongkaiGBK Medium X - X X X
bHEI00M.ttf AR Heiti2 Medium B5 - - - - X
bHEI01B.ttf AR Heiti2 Bold B5 - - - - X
bKAI00M.ttf AR Kaiti Medium B5 - - - - X
bLEI00D.ttf AR Leisu Demi B5 - - - - X
FRIZQT__.TTF Friz Quadrata TT X - - - -
FRIZQT___CYR.TTF FrizQuadrataCTT x - X - -
K_Damage.TTF YDIWingsM - X X - -
K_Pagetext.TTF MoK X X X - -
MORPHEUS.TTF Morpheus X - - - -
MORPHEUS_CYR.TTF Morpheus X - X - -
NIM_____.ttf Nimrod MT X - X - -
SKURRI.TTF Skurri X - - - -
SKURRI_CYR.TTF Skurri X - X - -
 
WARNING: Although FRIZQT___CYR is available on western clients, it doesn't support special European characters e.g. é, ï, ö
Due to this, we cannot use it as a replacement for FRIZQT__.TTF
]]
 
if locale == "koKR" then
LOCALE_MASK = lib.LOCALE_BIT_koKR
--
SML_MT_font["굵은 글꼴"] = [[Fonts\2002B.TTF]]
SML_MT_font["기본 글꼴"] = [[Fonts\2002.TTF]]
SML_MT_font["데미지 글꼴"] = [[Fonts\K_Damage.TTF]]
SML_MT_font["퀘스트 글꼴"] = [[Fonts\K_Pagetext.TTF]]
--
lib.DefaultMedia["font"] = "기본 글꼴" -- someone from koKR please adjust if needed
--
elseif locale == "zhCN" then
LOCALE_MASK = lib.LOCALE_BIT_zhCN
--
SML_MT_font["伤害数字"] = [[Fonts\ARKai_C.ttf]]
SML_MT_font["默认"] = [[Fonts\ARKai_T.ttf]]
SML_MT_font["聊天"] = [[Fonts\ARHei.ttf]]
--
lib.DefaultMedia["font"] = "默认" -- someone from zhCN please adjust if needed
--
elseif locale == "zhTW" then
LOCALE_MASK = lib.LOCALE_BIT_zhTW
--
SML_MT_font["提示訊息"] = [[Fonts\bHEI00M.ttf]]
SML_MT_font["聊天"] = [[Fonts\bHEI01B.ttf]]
SML_MT_font["傷害數字"] = [[Fonts\bKAI00M.ttf]]
SML_MT_font["預設"] = [[Fonts\bLEI00D.ttf]]
--
lib.DefaultMedia["font"] = "預設" -- someone from zhTW please adjust if needed
 
elseif locale == "ruRU" then
LOCALE_MASK = lib.LOCALE_BIT_ruRU
--
SML_MT_font["2002"] = [[Fonts\2002.TTF]]
SML_MT_font["2002 Bold"] = [[Fonts\2002B.TTF]]
SML_MT_font["AR CrystalzcuheiGBK Demibold"] = [[Fonts\ARHei.TTF]]
SML_MT_font["AR ZhongkaiGBK Medium (Combat)"] = [[Fonts\ARKai_C.TTF]]
SML_MT_font["AR ZhongkaiGBK Medium"] = [[Fonts\ARKai_T.TTF]]
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT___CYR.TTF]]
SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]]
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]]
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]]
--
lib.DefaultMedia.font = "Friz Quadrata TT"
--
else
LOCALE_MASK = lib.LOCALE_BIT_western
locale_is_western = true
--
SML_MT_font["2002"] = [[Fonts\2002.TTF]]
SML_MT_font["2002 Bold"] = [[Fonts\2002B.TTF]]
SML_MT_font["AR CrystalzcuheiGBK Demibold"] = [[Fonts\ARHei.TTF]]
SML_MT_font["AR ZhongkaiGBK Medium (Combat)"] = [[Fonts\ARKai_C.TTF]]
SML_MT_font["AR ZhongkaiGBK Medium"] = [[Fonts\ARKai_T.TTF]]
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]]
SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]]
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]]
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]]
--
lib.DefaultMedia.font = "Friz Quadrata TT"
--
end
 
-- STATUSBAR
if not lib.MediaTable.statusbar then lib.MediaTable.statusbar = {} end
lib.MediaTable.statusbar["Blizzard"] = [[Interface\TargetingFrame\UI-StatusBar]]
lib.MediaTable.statusbar["Blizzard Character Skills Bar"] = [[Interface\PaperDollInfoFrame\UI-Character-Skills-Bar]]
lib.MediaTable.statusbar["Blizzard Raid Bar"] = [[Interface\RaidFrame\Raid-Bar-Hp-Fill]]
lib.MediaTable.statusbar["Solid"] = [[Interface\Buttons\WHITE8X8]]
lib.DefaultMedia.statusbar = "Blizzard"
 
-- SOUND
if not lib.MediaTable.sound then lib.MediaTable.sound = {} end
lib.MediaTable.sound["None"] = 1 -- Relies on the fact that PlaySound[File] doesn't error on existing invalid input files.
lib.DefaultMedia.sound = "None"
 
local function rebuildMediaList(mediatype)
local mtable = mediaTable[mediatype]
if not mtable then return end
if not mediaList[mediatype] then mediaList[mediatype] = {} end
local mlist = mediaList[mediatype]
-- list can only get larger, so simply overwrite it
local i = 0
for k in pairs(mtable) do
i = i + 1
mlist[i] = k
end
table_sort(mlist)
end
 
function lib:Register(mediatype, key, data, langmask)
if type(mediatype) ~= "string" then
error(MAJOR..":Register(mediatype, key, data, langmask) - mediatype must be string, got "..type(mediatype))
end
if type(key) ~= "string" then
error(MAJOR..":Register(mediatype, key, data, langmask) - key must be string, got "..type(key))
end
mediatype = mediatype:lower()
if mediatype == lib.MediaType.FONT and ((langmask and band(langmask, LOCALE_MASK) == 0) or not (langmask or locale_is_western)) then
-- ignore fonts that aren't flagged as supporting local glyphs on non-western clients
return false
end
if type(data) == "string" and (mediatype == lib.MediaType.BACKGROUND or mediatype == lib.MediaType.BORDER or mediatype == lib.MediaType.STATUSBAR or mediatype == lib.MediaType.SOUND) then
local path = data:lower()
if not path:find("^interface") then
-- files accessed via path only allowed from interface folder
return false
end
if mediatype == lib.MediaType.SOUND and not (path:find(".ogg", nil, true) or not path:find(".mp3", nil, true)) then
-- Only ogg and mp3 are valid sounds.
return false
end
end
if not mediaTable[mediatype] then mediaTable[mediatype] = {} end
local mtable = mediaTable[mediatype]
if mtable[key] then return false end
 
mtable[key] = data
rebuildMediaList(mediatype)
self.callbacks:Fire("LibSharedMedia_Registered", mediatype, key)
return true
end
 
function lib:Fetch(mediatype, key, noDefault)
local mtt = mediaTable[mediatype]
local overridekey = overrideMedia[mediatype]
local result = mtt and ((overridekey and mtt[overridekey] or mtt[key]) or (not noDefault and defaultMedia[mediatype] and mtt[defaultMedia[mediatype]])) or nil
return result ~= "" and result or nil
end
 
function lib:IsValid(mediatype, key)
return mediaTable[mediatype] and (not key or mediaTable[mediatype][key]) and true or false
end
 
function lib:HashTable(mediatype)
return mediaTable[mediatype]
end
 
function lib:List(mediatype)
if not mediaTable[mediatype] then
return nil
end
if not mediaList[mediatype] then
rebuildMediaList(mediatype)
end
return mediaList[mediatype]
end
 
function lib:GetGlobal(mediatype)
return overrideMedia[mediatype]
end
 
function lib:SetGlobal(mediatype, key)
if not mediaTable[mediatype] then
return false
end
overrideMedia[mediatype] = (key and mediaTable[mediatype][key]) and key or nil
self.callbacks:Fire("LibSharedMedia_SetGlobal", mediatype, overrideMedia[mediatype])
return true
end
 
function lib:GetDefault(mediatype)
return defaultMedia[mediatype]
end
 
function lib:SetDefault(mediatype, key)
if mediaTable[mediatype] and mediaTable[mediatype][key] and not defaultMedia[mediatype] then
defaultMedia[mediatype] = key
return true
else
return false
end
end
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/libs/AceDB-3.0/AceDB-3.0.xml New file
0,0 → 1,4
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="AceDB-3.0.lua"/>
</Ui>
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/libs/AceDB-3.0/AceDB-3.0.lua New file
0,0 → 1,744
--- **AceDB-3.0** manages the SavedVariables of your addon.
-- It offers profile management, smart defaults and namespaces for modules.\\
-- Data can be saved in different data-types, depending on its intended usage.
-- The most common data-type is the `profile` type, which allows the user to choose
-- the active profile, and manage the profiles of all of his characters.\\
-- The following data types are available:
-- * **char** Character-specific data. Every character has its own database.
-- * **realm** Realm-specific data. All of the players characters on the same realm share this database.
-- * **class** Class-specific data. All of the players characters of the same class share this database.
-- * **race** Race-specific data. All of the players characters of the same race share this database.
-- * **faction** Faction-specific data. All of the players characters of the same faction share this database.
-- * **factionrealm** Faction and realm specific data. All of the players characters on the same realm and of the same faction share this database.
-- * **locale** Locale specific data, based on the locale of the players game client.
-- * **global** Global Data. All characters on the same account share this database.
-- * **profile** Profile-specific data. All characters using the same profile share this database. The user can control which profile should be used.
--
-- Creating a new Database using the `:New` function will return a new DBObject. A database will inherit all functions
-- of the DBObjectLib listed here. \\
-- If you create a new namespaced child-database (`:RegisterNamespace`), you'll get a DBObject as well, but note
-- that the child-databases cannot individually change their profile, and are linked to their parents profile - and because of that,
-- the profile related APIs are not available. Only `:RegisterDefaults` and `:ResetProfile` are available on child-databases.
--
-- For more details on how to use AceDB-3.0, see the [[AceDB-3.0 Tutorial]].
--
-- You may also be interested in [[libdualspec-1-0|LibDualSpec-1.0]] to do profile switching automatically when switching specs.
--
-- @usage
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("DBExample")
--
-- -- declare defaults to be used in the DB
-- local defaults = {
-- profile = {
-- setting = true,
-- }
-- }
--
-- function MyAddon:OnInitialize()
-- -- Assuming the .toc says ## SavedVariables: MyAddonDB
-- self.db = LibStub("AceDB-3.0"):New("MyAddonDB", defaults, true)
-- end
-- @class file
-- @name AceDB-3.0.lua
-- @release $Id: AceDB-3.0.lua 1217 2019-07-11 03:06:18Z funkydude $
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 27
local AceDB = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
 
if not AceDB then return end -- No upgrade needed
 
-- Lua APIs
local type, pairs, next, error = type, pairs, next, error
local setmetatable, rawset, rawget = setmetatable, rawset, rawget
 
-- WoW APIs
local _G = _G
 
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
-- List them here for Mikk's FindGlobals script
-- GLOBALS: LibStub
 
AceDB.db_registry = AceDB.db_registry or {}
AceDB.frame = AceDB.frame or CreateFrame("Frame")
 
local CallbackHandler
local CallbackDummy = { Fire = function() end }
 
local DBObjectLib = {}
 
--[[-------------------------------------------------------------------------
AceDB Utility Functions
---------------------------------------------------------------------------]]
 
-- Simple shallow copy for copying defaults
local function copyTable(src, dest)
if type(dest) ~= "table" then dest = {} end
if type(src) == "table" then
for k,v in pairs(src) do
if type(v) == "table" then
-- try to index the key first so that the metatable creates the defaults, if set, and use that table
v = copyTable(v, dest[k])
end
dest[k] = v
end
end
return dest
end
 
-- Called to add defaults to a section of the database
--
-- When a ["*"] default section is indexed with a new key, a table is returned
-- and set in the host table. These tables must be cleaned up by removeDefaults
-- in order to ensure we don't write empty default tables.
local function copyDefaults(dest, src)
-- this happens if some value in the SV overwrites our default value with a non-table
--if type(dest) ~= "table" then return end
for k, v in pairs(src) do
if k == "*" or k == "**" then
if type(v) == "table" then
-- This is a metatable used for table defaults
local mt = {
-- This handles the lookup and creation of new subtables
__index = function(t,k)
if k == nil then return nil end
local tbl = {}
copyDefaults(tbl, v)
rawset(t, k, tbl)
return tbl
end,
}
setmetatable(dest, mt)
-- handle already existing tables in the SV
for dk, dv in pairs(dest) do
if not rawget(src, dk) and type(dv) == "table" then
copyDefaults(dv, v)
end
end
else
-- Values are not tables, so this is just a simple return
local mt = {__index = function(t,k) return k~=nil and v or nil end}
setmetatable(dest, mt)
end
elseif type(v) == "table" then
if not rawget(dest, k) then rawset(dest, k, {}) end
if type(dest[k]) == "table" then
copyDefaults(dest[k], v)
if src['**'] then
copyDefaults(dest[k], src['**'])
end
end
else
if rawget(dest, k) == nil then
rawset(dest, k, v)
end
end
end
end
 
-- Called to remove all defaults in the default table from the database
local function removeDefaults(db, defaults, blocker)
-- remove all metatables from the db, so we don't accidentally create new sub-tables through them
setmetatable(db, nil)
-- loop through the defaults and remove their content
for k,v in pairs(defaults) do
if k == "*" or k == "**" then
if type(v) == "table" then
-- Loop through all the actual k,v pairs and remove
for key, value in pairs(db) do
if type(value) == "table" then
-- if the key was not explicitly specified in the defaults table, just strip everything from * and ** tables
if defaults[key] == nil and (not blocker or blocker[key] == nil) then
removeDefaults(value, v)
-- if the table is empty afterwards, remove it
if next(value) == nil then
db[key] = nil
end
-- if it was specified, only strip ** content, but block values which were set in the key table
elseif k == "**" then
removeDefaults(value, v, defaults[key])
end
end
end
elseif k == "*" then
-- check for non-table default
for key, value in pairs(db) do
if defaults[key] == nil and v == value then
db[key] = nil
end
end
end
elseif type(v) == "table" and type(db[k]) == "table" then
-- if a blocker was set, dive into it, to allow multi-level defaults
removeDefaults(db[k], v, blocker and blocker[k])
if next(db[k]) == nil then
db[k] = nil
end
else
-- check if the current value matches the default, and that its not blocked by another defaults table
if db[k] == defaults[k] and (not blocker or blocker[k] == nil) then
db[k] = nil
end
end
end
end
 
-- This is called when a table section is first accessed, to set up the defaults
local function initSection(db, section, svstore, key, defaults)
local sv = rawget(db, "sv")
 
local tableCreated
if not sv[svstore] then sv[svstore] = {} end
if not sv[svstore][key] then
sv[svstore][key] = {}
tableCreated = true
end
 
local tbl = sv[svstore][key]
 
if defaults then
copyDefaults(tbl, defaults)
end
rawset(db, section, tbl)
 
return tableCreated, tbl
end
 
-- Metatable to handle the dynamic creation of sections and copying of sections.
local dbmt = {
__index = function(t, section)
local keys = rawget(t, "keys")
local key = keys[section]
if key then
local defaultTbl = rawget(t, "defaults")
local defaults = defaultTbl and defaultTbl[section]
 
if section == "profile" then
local new = initSection(t, section, "profiles", key, defaults)
if new then
-- Callback: OnNewProfile, database, newProfileKey
t.callbacks:Fire("OnNewProfile", t, key)
end
elseif section == "profiles" then
local sv = rawget(t, "sv")
if not sv.profiles then sv.profiles = {} end
rawset(t, "profiles", sv.profiles)
elseif section == "global" then
local sv = rawget(t, "sv")
if not sv.global then sv.global = {} end
if defaults then
copyDefaults(sv.global, defaults)
end
rawset(t, section, sv.global)
else
initSection(t, section, section, key, defaults)
end
end
 
return rawget(t, section)
end
}
 
local function validateDefaults(defaults, keyTbl, offset)
if not defaults then return end
offset = offset or 0
for k in pairs(defaults) do
if not keyTbl[k] or k == "profiles" then
error(("Usage: AceDBObject:RegisterDefaults(defaults): '%s' is not a valid datatype."):format(k), 3 + offset)
end
end
end
 
local preserve_keys = {
["callbacks"] = true,
["RegisterCallback"] = true,
["UnregisterCallback"] = true,
["UnregisterAllCallbacks"] = true,
["children"] = true,
}
 
local realmKey = GetRealmName()
local charKey = UnitName("player") .. " - " .. realmKey
local _, classKey = UnitClass("player")
local _, raceKey = UnitRace("player")
local factionKey = UnitFactionGroup("player")
local factionrealmKey = factionKey .. " - " .. realmKey
local localeKey = GetLocale():lower()
 
local regionTable = { "US", "KR", "EU", "TW", "CN" }
local regionKey = regionTable[GetCurrentRegion()]
local factionrealmregionKey = factionrealmKey .. " - " .. regionKey
 
-- Actual database initialization function
local function initdb(sv, defaults, defaultProfile, olddb, parent)
-- Generate the database keys for each section
 
-- map "true" to our "Default" profile
if defaultProfile == true then defaultProfile = "Default" end
 
local profileKey
if not parent then
-- Make a container for profile keys
if not sv.profileKeys then sv.profileKeys = {} end
 
-- Try to get the profile selected from the char db
profileKey = sv.profileKeys[charKey] or defaultProfile or charKey
 
-- save the selected profile for later
sv.profileKeys[charKey] = profileKey
else
-- Use the profile of the parents DB
profileKey = parent.keys.profile or defaultProfile or charKey
 
-- clear the profileKeys in the DB, namespaces don't need to store them
sv.profileKeys = nil
end
 
-- This table contains keys that enable the dynamic creation
-- of each section of the table. The 'global' and 'profiles'
-- have a key of true, since they are handled in a special case
local keyTbl= {
["char"] = charKey,
["realm"] = realmKey,
["class"] = classKey,
["race"] = raceKey,
["faction"] = factionKey,
["factionrealm"] = factionrealmKey,
["factionrealmregion"] = factionrealmregionKey,
["profile"] = profileKey,
["locale"] = localeKey,
["global"] = true,
["profiles"] = true,
}
 
validateDefaults(defaults, keyTbl, 1)
 
-- This allows us to use this function to reset an entire database
-- Clear out the old database
if olddb then
for k,v in pairs(olddb) do if not preserve_keys[k] then olddb[k] = nil end end
end
 
-- Give this database the metatable so it initializes dynamically
local db = setmetatable(olddb or {}, dbmt)
 
if not rawget(db, "callbacks") then
-- try to load CallbackHandler-1.0 if it loaded after our library
if not CallbackHandler then CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0", true) end
db.callbacks = CallbackHandler and CallbackHandler:New(db) or CallbackDummy
end
 
-- Copy methods locally into the database object, to avoid hitting
-- the metatable when calling methods
 
if not parent then
for name, func in pairs(DBObjectLib) do
db[name] = func
end
else
-- hack this one in
db.RegisterDefaults = DBObjectLib.RegisterDefaults
db.ResetProfile = DBObjectLib.ResetProfile
end
 
-- Set some properties in the database object
db.profiles = sv.profiles
db.keys = keyTbl
db.sv = sv
--db.sv_name = name
db.defaults = defaults
db.parent = parent
 
-- store the DB in the registry
AceDB.db_registry[db] = true
 
return db
end
 
-- handle PLAYER_LOGOUT
-- strip all defaults from all databases
-- and cleans up empty sections
local function logoutHandler(frame, event)
if event == "PLAYER_LOGOUT" then
for db in pairs(AceDB.db_registry) do
db.callbacks:Fire("OnDatabaseShutdown", db)
db:RegisterDefaults(nil)
 
-- cleanup sections that are empty without defaults
local sv = rawget(db, "sv")
for section in pairs(db.keys) do
if rawget(sv, section) then
-- global is special, all other sections have sub-entrys
-- also don't delete empty profiles on main dbs, only on namespaces
if section ~= "global" and (section ~= "profiles" or rawget(db, "parent")) then
for key in pairs(sv[section]) do
if not next(sv[section][key]) then
sv[section][key] = nil
end
end
end
if not next(sv[section]) then
sv[section] = nil
end
end
end
end
end
end
 
AceDB.frame:RegisterEvent("PLAYER_LOGOUT")
AceDB.frame:SetScript("OnEvent", logoutHandler)
 
 
--[[-------------------------------------------------------------------------
AceDB Object Method Definitions
---------------------------------------------------------------------------]]
 
--- Sets the defaults table for the given database object by clearing any
-- that are currently set, and then setting the new defaults.
-- @param defaults A table of defaults for this database
function DBObjectLib:RegisterDefaults(defaults)
if defaults and type(defaults) ~= "table" then
error(("Usage: AceDBObject:RegisterDefaults(defaults): 'defaults' - table or nil expected, got %q."):format(type(defaults)), 2)
end
 
validateDefaults(defaults, self.keys)
 
-- Remove any currently set defaults
if self.defaults then
for section,key in pairs(self.keys) do
if self.defaults[section] and rawget(self, section) then
removeDefaults(self[section], self.defaults[section])
end
end
end
 
-- Set the DBObject.defaults table
self.defaults = defaults
 
-- Copy in any defaults, only touching those sections already created
if defaults then
for section,key in pairs(self.keys) do
if defaults[section] and rawget(self, section) then
copyDefaults(self[section], defaults[section])
end
end
end
end
 
--- Changes the profile of the database and all of it's namespaces to the
-- supplied named profile
-- @param name The name of the profile to set as the current profile
function DBObjectLib:SetProfile(name)
if type(name) ~= "string" then
error(("Usage: AceDBObject:SetProfile(name): 'name' - string expected, got %q."):format(type(name)), 2)
end
 
-- changing to the same profile, dont do anything
if name == self.keys.profile then return end
 
local oldProfile = self.profile
local defaults = self.defaults and self.defaults.profile
 
-- Callback: OnProfileShutdown, database
self.callbacks:Fire("OnProfileShutdown", self)
 
if oldProfile and defaults then
-- Remove the defaults from the old profile
removeDefaults(oldProfile, defaults)
end
 
self.profile = nil
self.keys["profile"] = name
 
-- if the storage exists, save the new profile
-- this won't exist on namespaces.
if self.sv.profileKeys then
self.sv.profileKeys[charKey] = name
end
 
-- populate to child namespaces
if self.children then
for _, db in pairs(self.children) do
DBObjectLib.SetProfile(db, name)
end
end
 
-- Callback: OnProfileChanged, database, newProfileKey
self.callbacks:Fire("OnProfileChanged", self, name)
end
 
--- Returns a table with the names of the existing profiles in the database.
-- You can optionally supply a table to re-use for this purpose.
-- @param tbl A table to store the profile names in (optional)
function DBObjectLib:GetProfiles(tbl)
if tbl and type(tbl) ~= "table" then
error(("Usage: AceDBObject:GetProfiles(tbl): 'tbl' - table or nil expected, got %q."):format(type(tbl)), 2)
end
 
-- Clear the container table
if tbl then
for k,v in pairs(tbl) do tbl[k] = nil end
else
tbl = {}
end
 
local curProfile = self.keys.profile
 
local i = 0
for profileKey in pairs(self.profiles) do
i = i + 1
tbl[i] = profileKey
if curProfile and profileKey == curProfile then curProfile = nil end
end
 
-- Add the current profile, if it hasn't been created yet
if curProfile then
i = i + 1
tbl[i] = curProfile
end
 
return tbl, i
end
 
--- Returns the current profile name used by the database
function DBObjectLib:GetCurrentProfile()
return self.keys.profile
end
 
--- Deletes a named profile. This profile must not be the active profile.
-- @param name The name of the profile to be deleted
-- @param silent If true, do not raise an error when the profile does not exist
function DBObjectLib:DeleteProfile(name, silent)
if type(name) ~= "string" then
error(("Usage: AceDBObject:DeleteProfile(name): 'name' - string expected, got %q."):format(type(name)), 2)
end
 
if self.keys.profile == name then
error(("Cannot delete the active profile (%q) in an AceDBObject."):format(name), 2)
end
 
if not rawget(self.profiles, name) and not silent then
error(("Cannot delete profile %q as it does not exist."):format(name), 2)
end
 
self.profiles[name] = nil
 
-- populate to child namespaces
if self.children then
for _, db in pairs(self.children) do
DBObjectLib.DeleteProfile(db, name, true)
end
end
 
-- switch all characters that use this profile back to the default
if self.sv.profileKeys then
for key, profile in pairs(self.sv.profileKeys) do
if profile == name then
self.sv.profileKeys[key] = nil
end
end
end
 
-- Callback: OnProfileDeleted, database, profileKey
self.callbacks:Fire("OnProfileDeleted", self, name)
end
 
--- Copies a named profile into the current profile, overwriting any conflicting
-- settings.
-- @param name The name of the profile to be copied into the current profile
-- @param silent If true, do not raise an error when the profile does not exist
function DBObjectLib:CopyProfile(name, silent)
if type(name) ~= "string" then
error(("Usage: AceDBObject:CopyProfile(name): 'name' - string expected, got %q."):format(type(name)), 2)
end
 
if name == self.keys.profile then
error(("Cannot have the same source and destination profiles (%q)."):format(name), 2)
end
 
if not rawget(self.profiles, name) and not silent then
error(("Cannot copy profile %q as it does not exist."):format(name), 2)
end
 
-- Reset the profile before copying
DBObjectLib.ResetProfile(self, nil, true)
 
local profile = self.profile
local source = self.profiles[name]
 
copyTable(source, profile)
 
-- populate to child namespaces
if self.children then
for _, db in pairs(self.children) do
DBObjectLib.CopyProfile(db, name, true)
end
end
 
-- Callback: OnProfileCopied, database, sourceProfileKey
self.callbacks:Fire("OnProfileCopied", self, name)
end
 
--- Resets the current profile to the default values (if specified).
-- @param noChildren if set to true, the reset will not be populated to the child namespaces of this DB object
-- @param noCallbacks if set to true, won't fire the OnProfileReset callback
function DBObjectLib:ResetProfile(noChildren, noCallbacks)
local profile = self.profile
 
for k,v in pairs(profile) do
profile[k] = nil
end
 
local defaults = self.defaults and self.defaults.profile
if defaults then
copyDefaults(profile, defaults)
end
 
-- populate to child namespaces
if self.children and not noChildren then
for _, db in pairs(self.children) do
DBObjectLib.ResetProfile(db, nil, noCallbacks)
end
end
 
-- Callback: OnProfileReset, database
if not noCallbacks then
self.callbacks:Fire("OnProfileReset", self)
end
end
 
--- Resets the entire database, using the string defaultProfile as the new default
-- profile.
-- @param defaultProfile The profile name to use as the default
function DBObjectLib:ResetDB(defaultProfile)
if defaultProfile and type(defaultProfile) ~= "string" then
error(("Usage: AceDBObject:ResetDB(defaultProfile): 'defaultProfile' - string or nil expected, got %q."):format(type(defaultProfile)), 2)
end
 
local sv = self.sv
for k,v in pairs(sv) do
sv[k] = nil
end
 
initdb(sv, self.defaults, defaultProfile, self)
 
-- fix the child namespaces
if self.children then
if not sv.namespaces then sv.namespaces = {} end
for name, db in pairs(self.children) do
if not sv.namespaces[name] then sv.namespaces[name] = {} end
initdb(sv.namespaces[name], db.defaults, self.keys.profile, db, self)
end
end
 
-- Callback: OnDatabaseReset, database
self.callbacks:Fire("OnDatabaseReset", self)
-- Callback: OnProfileChanged, database, profileKey
self.callbacks:Fire("OnProfileChanged", self, self.keys["profile"])
 
return self
end
 
--- Creates a new database namespace, directly tied to the database. This
-- is a full scale database in it's own rights other than the fact that
-- it cannot control its profile individually
-- @param name The name of the new namespace
-- @param defaults A table of values to use as defaults
function DBObjectLib:RegisterNamespace(name, defaults)
if type(name) ~= "string" then
error(("Usage: AceDBObject:RegisterNamespace(name, defaults): 'name' - string expected, got %q."):format(type(name)), 2)
end
if defaults and type(defaults) ~= "table" then
error(("Usage: AceDBObject:RegisterNamespace(name, defaults): 'defaults' - table or nil expected, got %q."):format(type(defaults)), 2)
end
if self.children and self.children[name] then
error(("Usage: AceDBObject:RegisterNamespace(name, defaults): 'name' - a namespace called %q already exists."):format(name), 2)
end
 
local sv = self.sv
if not sv.namespaces then sv.namespaces = {} end
if not sv.namespaces[name] then
sv.namespaces[name] = {}
end
 
local newDB = initdb(sv.namespaces[name], defaults, self.keys.profile, nil, self)
 
if not self.children then self.children = {} end
self.children[name] = newDB
return newDB
end
 
--- Returns an already existing namespace from the database object.
-- @param name The name of the new namespace
-- @param silent if true, the addon is optional, silently return nil if its not found
-- @usage
-- local namespace = self.db:GetNamespace('namespace')
-- @return the namespace object if found
function DBObjectLib:GetNamespace(name, silent)
if type(name) ~= "string" then
error(("Usage: AceDBObject:GetNamespace(name): 'name' - string expected, got %q."):format(type(name)), 2)
end
if not silent and not (self.children and self.children[name]) then
error(("Usage: AceDBObject:GetNamespace(name): 'name' - namespace %q does not exist."):format(name), 2)
end
if not self.children then self.children = {} end
return self.children[name]
end
 
--[[-------------------------------------------------------------------------
AceDB Exposed Methods
---------------------------------------------------------------------------]]
 
--- Creates a new database object that can be used to handle database settings and profiles.
-- By default, an empty DB is created, using a character specific profile.
--
-- You can override the default profile used by passing any profile name as the third argument,
-- or by passing //true// as the third argument to use a globally shared profile called "Default".
--
-- Note that there is no token replacement in the default profile name, passing a defaultProfile as "char"
-- will use a profile named "char", and not a character-specific profile.
-- @param tbl The name of variable, or table to use for the database
-- @param defaults A table of database defaults
-- @param defaultProfile The name of the default profile. If not set, a character specific profile will be used as the default.
-- You can also pass //true// to use a shared global profile called "Default".
-- @usage
-- -- Create an empty DB using a character-specific default profile.
-- self.db = LibStub("AceDB-3.0"):New("MyAddonDB")
-- @usage
-- -- Create a DB using defaults and using a shared default profile
-- self.db = LibStub("AceDB-3.0"):New("MyAddonDB", defaults, true)
function AceDB:New(tbl, defaults, defaultProfile)
if type(tbl) == "string" then
local name = tbl
tbl = _G[name]
if not tbl then
tbl = {}
_G[name] = tbl
end
end
 
if type(tbl) ~= "table" then
error(("Usage: AceDB:New(tbl, defaults, defaultProfile): 'tbl' - table expected, got %q."):format(type(tbl)), 2)
end
 
if defaults and type(defaults) ~= "table" then
error(("Usage: AceDB:New(tbl, defaults, defaultProfile): 'defaults' - table expected, got %q."):format(type(defaults)), 2)
end
 
if defaultProfile and type(defaultProfile) ~= "string" and defaultProfile ~= true then
error(("Usage: AceDB:New(tbl, defaults, defaultProfile): 'defaultProfile' - string or true expected, got %q."):format(type(defaultProfile)), 2)
end
 
return initdb(tbl, defaults, defaultProfile)
end
 
-- upgrade existing databases
for db in pairs(AceDB.db_registry) do
if not db.parent then
for name,func in pairs(DBObjectLib) do
db[name] = func
end
else
db.RegisterDefaults = DBObjectLib.RegisterDefaults
db.ResetProfile = DBObjectLib.ResetProfile
end
end
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/embeds.xml New file
0,0 → 1,7
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Script file="libs\LibStub\LibStub.lua"/>
<Include file="libs\CallbackHandler-1.0\CallbackHandler-1.0.xml"/>
<Include file="libs\AceDB-3.0\AceDB-3.0.xml"/>
<Include file="libs\AceLocale-3.0\AceLocale-3.0.xml"/>
<Include file="libs\LibSharedMedia-3.0\lib.xml"/>
</Ui>
\ No newline at end of file
tags/1.13.005_Classic/InFlight/locales/deDE.lua New file
0,0 → 1,97
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "deDE")
if not L then return end
 
L["AddonDisabled"] = "Falsche Client-Version erkannt: Addon wird deaktiviert"
L["BackgroundColor"] = "Hintergrundfarbe"
L["BarColor"] = "Farbe der Leiste"
L["BarOptions"] = "Leisteneinstellungen"
L["Border"] = "Rand"
L["BorderColor"] = "Randfarbe"
L["CompactMode"] = "Kompaktmodus"
L["ConfirmFlight"] = "Flug bestätigen"
L["ConfirmPopup"] = "Flug nehmen zu %s?"
L["CountUp"] = "Hochzählen"
L["DefaultsUpdated"] = "Standarddaten aktualisiert."
L["DestParse"] = ", .+"
L["Duration"] = "Flugdauer: "
L["FillUp"] = "Auffüllen"
L["FlightTimeAdded"] = "Flugzeit hinzugefügt:"
L["FlightTimeContribute"] = "Es stehen %s Flugzeiten zur Verfügung die zur Verbesserung des Addons beitragen."
L["FlightTimeUpdated"] = "Flugzeit aktualisiert:"
L["Font"] = "Schriftart"
L["FontColor"] = "Schriftfarbe"
L["Height"] = "Höhe"
L["OutlineInfo"] = "Kontur-Info"
L["OutlineTime"] = "Kontur-Zeitangabe"
L["PerCharOptions"] = "Charakterspezifische Einstellungen"
L["ResetFlightTimes"] = "Flugzeiten zurücksetzen"
L["ResetOptions"] = "Einstellungen zurücksetzen"
L["ShowChat"] = "Chat-Nachrichten"
L["ShowSpark"] = "Funken anzeigen"
L["TextOptions"] = "Texteinstellungen"
L["Texture"] = "Textur"
L["TooltipOption1"] = "<Umschalttaste+Linksklick> zum Bewegen"
L["TooltipOption2"] = "<Rechtsklick> für Einstellungen"
L["TooltipOption3"] = "<Strg+Linksklick> schließen erzwingen"
L["ToText"] = "\"Nach\" Text"
L["UnknownColor"] = "Unbekannt-Farbe"
L["Width"] = "Breite"
 
-- Flight point localisations
local FL = LibStub("AceLocale-3.0"):NewLocale("InFlightLoc", "deDE")
if not FL then return end
 
FL["Aerie Peak"] = true
FL["Astranaar"] = true
FL["Auberdine"] = true
FL["Bloodvenom Post"] = "Blutgiftposten"
FL["Booty Bay"] = true
FL["Brackenwall Village"] = "Brackenwall"
FL["Camp Mojache"] = true
FL["Camp Taurajo"] = true
FL["Cenarion Hold"] = "Burg Cenarius"
FL["Chillwind Camp"] = "Chillwind-Lager"
FL["Crossroads"] = "Das Wegekreuz"
FL["Darkshire"] = "Dunkelhain"
FL["Everlook"] = true
FL["Feathermoon"] = true
FL["Flame Crest"] = "Flammenkamm"
FL["Freewind Post"] = "Freiwindposten"
FL["Gadgetzan"] = true
FL["Grom'gol"] = true
FL["Hammerfall"] = true
FL["Ironforge"] = true
FL["Kargath"] = true
FL["Lakeshire"] = "Seenhain"
FL["Light's Hope Chapel"] = "Kapelle des hoffnungsvollen Lichts"
FL["Marshal's Refuge"] = "Marshals Zuflucht"
FL["Menethil Harbor"] = "Hafen von Menethil"
FL["Moonglade"] = true
FL["Morgan's Vigil"] = "Morgans Wacht"
FL["Nethergarde Keep"] = "Burg Nethergarde"
FL["Nijel's Point"] = "Die Nijelspitze"
FL["Orgrimmar"] = true
FL["Ratchet"] = true
FL["Refuge Pointe"] = "Die Zuflucht"
FL["Revantusk Village"] = "Dorf der Bruchhauer"
FL["Rut'theran Village"] = "Rut'theran"
FL["Sentinel Hill"] = "Späherkuppe"
FL["Shadowprey Village"] = "Schattenflucht"
FL["Southshore"] = true
FL["Splintertree Post"] = "Splintertreeposten"
FL["Stonard"] = "Steinard"
FL["Stonetalon Peak"] = "Steinkrallengipfel"
FL["Stormwind"] = true
FL["Sun Rock Retreat"] = "Sonnenfels"
FL["Talonbranch Glade"] = "Nachtlaublichtung"
FL["Talrendis Point"] = "Talrendisspitze"
FL["Tarren Mill"] = "Tarrens Mühle"
FL["Thalanaar"] = true
FL["The Sepulcher"] = "Das Grabmal"
FL["Thelsamar"] = true
FL["Theramore"] = true
FL["Thorium Point"] = "Thoriumspitze"
FL["Thunder Bluff"] = "Donnerfels"
FL["Undercity"] = "Unterstadt"
FL["Valormok"] = true
FL["Zoram'gar Outpost"] = "Zoram'gar-Außenposten"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/locales/locales.xml New file
0,0 → 1,13
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="enUS.lua"/>
<Script file="deDE.lua"/>
<Script file="esES.lua"/>
<Script file="esMX.lua"/>
<Script file="frFR.lua"/>
<Script file="koKR.lua"/>
<Script file="ptBR.lua"/>
<Script file="ruRU.lua"/>
<Script file="zhTW.lua"/>
<Script file="zhCN.lua"/>
</Ui>
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/locales/zhCN.lua New file
0,0 → 1,97
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "zhCN")
if not L then return end
 
L["AddonDisabled"] = "检测到错误的客户端版本:禁用插件"
L["BackgroundColor"] = "背景颜色"
L["BarColor"] = "时间条颜色"
L["BarOptions"] = "时间条选项"
L["Border"] = "边框"
L["BorderColor"] = "边框颜色"
L["CompactMode"] = "紧凑模式"
L["ConfirmFlight"] = "确认飞行"
L["ConfirmPopup"] = "乘坐航班到%s?"
L["CountUp"] = "计数"
L["DefaultsUpdated"] = "默认数据已更新。"
L["DestParse"] = ",.+"
L["Duration"] = "持续时间:"
L["FillUp"] = "填充"
L["FlightTimeAdded"] = "飞行时间补充:"
L["FlightTimeContribute"] = "%s 飞行时间可供贡献。"
L["FlightTimeUpdated"] = "飞行时间更新:"
L["Font"] = "字体"
L["FontColor"] = "字体颜色"
L["Height"] = "高度"
L["OutlineInfo"] = "描边信息文本"
L["OutlineTime"] = "描边时间文本"
L["PerCharOptions"] = "字符特定选项"
L["ResetFlightTimes"] = "重置飞行时间"
L["ResetOptions"] = "重置选项"
L["ShowChat"] = "聊天信息"
L["ShowSpark"] = "显示闪光"
L["TextOptions"] = "文字选项"
L["Texture"] = "时间条纹理"
L["TooltipOption1"] = "<Shift左键单击>移动"
L["TooltipOption2"] = "<点击右键>的选项"
L["TooltipOption3"] = "<Ctrl键左键单击>将强制关闭"
L["ToText"] = "\"到\" 文字"
L["UnknownColor"] = "未知的颜色"
L["Width"] = "宽度"
 
-- Flight point localisations
local FL = LibStub("AceLocale-3.0"):NewLocale("InFlightLoc", "zhCN")
if not FL then return end
 
FL["Aerie Peak"] = "鹰巢山"
FL["Astranaar"] = "阿斯特兰纳"
FL["Auberdine"] = "奥伯丁"
FL["Bloodvenom Post"] = "血毒岗哨"
FL["Booty Bay"] = "藏宝海湾"
FL["Brackenwall Village"] = "蕨墙村"
FL["Camp Mojache"] = "莫沙彻营地"
FL["Camp Taurajo"] = "陶拉霍营"
FL["Cenarion Hold"] = "塞纳里奥要塞"
FL["Chillwind Camp"] = "冰风岗"
FL["Crossroads"] = "十字路口"
FL["Darkshire"] = "夜色镇"
FL["Everlook"] = "永望镇"
FL["Feathermoon"] = "羽月要塞"
FL["Flame Crest"] = "烈焰峰"
FL["Freewind Post"] = "乱风岗"
FL["Gadgetzan"] = "加基森"
FL["Grom'gol"] = "格罗姆高"
FL["Hammerfall"] = "落锤镇"
FL["Ironforge"] = "铁炉堡"
FL["Kargath"] = "卡加斯"
FL["Lakeshire"] = "湖畔镇"
FL["Light's Hope Chapel"] = "圣光之愿礼拜堂"
FL["Marshal's Refuge"] = "马绍尔营地"
FL["Menethil Harbor"] = "米奈希尔港"
FL["Moonglade"] = "月光林地"
FL["Morgan's Vigil"] = "摩根的岗哨"
FL["Nethergarde Keep"] = "守望堡"
FL["Nijel's Point"] = "尼耶尔前哨站"
FL["Orgrimmar"] = "奥格瑞玛"
FL["Ratchet"] = "棘齿城"
FL["Refuge Pointe"] = "避难谷地"
FL["Revantusk Village"] = "恶齿村"
FL["Rut'theran Village"] = "鲁瑟兰村"
FL["Sentinel Hill"] = "哨兵岭"
FL["Shadowprey Village"] = "葬影村"
FL["Southshore"] = "南海镇"
FL["Splintertree Post"] = "碎木岗哨"
FL["Stonard"] = "斯通纳德"
FL["Stonetalon Peak"] = "石爪峰"
FL["Stormwind"] = "暴风城"
FL["Sun Rock Retreat"] = "烈日石居"
FL["Talonbranch Glade"] = "刺枝林地"
FL["Talrendis Point"] = "塔伦迪斯营地"
FL["Tarren Mill"] = "塔伦米尔"
FL["Thalanaar"] = "萨兰纳尔"
FL["The Sepulcher"] = "瑟伯切尔"
FL["Thelsamar"] = "塞尔萨玛"
FL["Theramore"] = "塞拉摩"
FL["Thorium Point"] = "瑟银哨塔"
FL["Thunder Bluff"] = "雷霆崖"
FL["Undercity"] = "幽暗城"
FL["Valormok"] = "瓦罗莫克"
FL["Zoram'gar Outpost"] = "佐拉姆加前哨站"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/locales/koKR.lua New file
0,0 → 1,97
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "koKR")
if not L then return end
 
L["AddonDisabled"] = "클라이언트 버전이 잘못 감지되었습니다 : 애드온 비활성화"
L["BackgroundColor"] = "배경 색상"
L["BarColor"] = "바 색상"
L["BarOptions"] = "바 설정"
L["Border"] = "테두리"
L["BorderColor"] = "테두리 색상"
L["CompactMode"] = "간단 모드"
L["ConfirmFlight"] = "경로 확인"
L["ConfirmPopup"] = "%s로 비행할까요?"
L["CountUp"] = "카운트 업"
L["DefaultsUpdated"] = "기본값이 업데이트되었습니다."
L["DestParse"] = " %(.+%)"
L["Duration"] = "지속시간: "
L["FillUp"] = "바 채우기"
L["FlightTimeAdded"] = "추가 비행 시간 :"
L["FlightTimeContribute"] = "%s 비행 시간 업로드 할 수는."
L["FlightTimeUpdated"] = "업데이트 된 비행 시간 :"
L["Font"] = "글꼴"
L["FontColor"] = "글꼴 색상"
L["Height"] = "높이"
L["OutlineInfo"] = "정보 윤곽선"
L["OutlineTime"] = "시간 윤곽선"
L["PerCharOptions"] = "캐릭터별 설정"
L["ResetFlightTimes"] = "비행 시간 초기화"
L["ResetOptions"] = "설정 초기화"
L["ShowChat"] = "채팅 메시지"
L["ShowSpark"] = "불꽃 표시"
L["TextOptions"] = "글자 설정"
L["Texture"] = "바 텍스처"
L["TooltipOption1"] = "<쉬프트+클릭> 하면 이동합니다"
L["TooltipOption2"] = "<오른쪽-클릭> 하면 설정을 엽니다"
L["TooltipOption3"] = "<Ctrl+클릭> 하면 강제로 닫습니다"
L["ToText"] = "\"~\"숙어"
L["UnknownColor"] = "모르는 경로 색상"
L["Width"] = "길이"
 
-- Flight point localisations
local FL = LibStub("AceLocale-3.0"):NewLocale("InFlightLoc", "koKR")
if not FL then return end
 
FL["Aerie Peak"] = "맹금의 봉우리"
FL["Astranaar"] = "아스트라나르"
FL["Auberdine"] = "아우버다인"
FL["Bloodvenom Post"] = "피멍울 초소"
FL["Booty Bay"] = "무법항"
FL["Brackenwall Village"] = "담쟁이 마을"
FL["Camp Mojache"] = "모자케 야영지"
FL["Camp Taurajo"] = "타우라조 야영지"
FL["Cenarion Hold"] = "세나리온 요새"
FL["Chillwind Camp"] = "서리바람 야영지"
FL["Crossroads"] = "십자로"
FL["Darkshire"] = "다크샤이어"
FL["Everlook"] = "눈망루 마을"
FL["Feathermoon"] = "페더문 요새"
FL["Flame Crest"] = "화염 마루"
FL["Freewind Post"] = "높새바람 봉우리"
FL["Gadgetzan"] = "가젯잔"
FL["Grom'gol"] = "그롬골"
FL["Hammerfall"] = "망치 주둔지"
FL["Ironforge"] = "아이언포지"
FL["Kargath"] = "카르가스"
FL["Lakeshire"] = "레이크샤이어"
FL["Light's Hope Chapel"] = "희망의 빛 예배당"
FL["Marshal's Refuge"] = "마샬의 야영지"
FL["Menethil Harbor"] = "메네실 항구"
FL["Moonglade"] = "달의 숲"
FL["Morgan's Vigil"] = "모건의 망루"
FL["Nethergarde Keep"] = "네더가드 요새"
FL["Nijel's Point"] = "나이젤의 야영지"
FL["Orgrimmar"] = "오그리마"
FL["Ratchet"] = "톱니항"
FL["Refuge Pointe"] = "임시 주둔지"
FL["Revantusk Village"] = "깨진엄니 마을"
FL["Rut'theran Village"] = "루테란 마을"
FL["Sentinel Hill"] = "감시의 언덕"
FL["Shadowprey Village"] = "그늘수렵 마을"
FL["Southshore"] = "사우스쇼어"
FL["Splintertree Post"] = "토막나무 주둔지"
FL["Stonard"] = "스토나드"
FL["Stonetalon Peak"] = "돌발톱 봉우리"
FL["Stormwind"] = "스톰윈드"
FL["Sun Rock Retreat"] = "해바위 야영지"
FL["Talonbranch Glade"] = "갈퀴가지 숲"
FL["Talrendis Point"] = "탈렌디스 초소"
FL["Tarren Mill"] = "타렌 제분소"
FL["Thalanaar"] = "탈라나르"
FL["The Sepulcher"] = "공동묘지"
FL["Thelsamar"] = "텔사마"
FL["Theramore"] = "테라모어 섬"
FL["Thorium Point"] = "토륨 거점"
FL["Thunder Bluff"] = "썬더 블러프"
FL["Undercity"] = "언더시티"
FL["Valormok"] = "발로르모크"
FL["Zoram'gar Outpost"] = "조람가르 전초기지"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/locales/ptBR.lua New file
0,0 → 1,97
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "ptBR")
if not L then return end
 
L["AddonDisabled"] = "Versão incorreta do cliente detectada: desativando o complemento"
L["BackgroundColor"] = "Cor de Fundo"
L["BarColor"] = "Cor da Barra"
L["BarOptions"] = "Opções de Bar"
L["Border"] = "Borda"
L["BorderColor"] = "Cor da Borda"
L["CompactMode"] = "Modo Compacto"
L["ConfirmFlight"] = "Confirmar Vôo"
L["ConfirmPopup"] = "Tome o vôo para %s?"
L["CountUp"] = "Contagem"
L["DefaultsUpdated"] = "Dados padrão atualizados."
L["DestParse"] = ", .+"
L["Duration"] = "Duração: "
L["FillUp"] = "Encher"
L["FlightTimeAdded"] = "tempo de vôo acrescentou:"
L["FlightTimeContribute"] = "%s tempos de voo disponíveis para contribuir."
L["FlightTimeUpdated"] = "tempo de vôo atualização:"
L["Font"] = "Fonte"
L["FontColor"] = "Cor da Fonte"
L["Height"] = "Altura"
L["OutlineInfo"] = "Delinear as Informações"
L["OutlineTime"] = "Delinear o Tempo"
L["PerCharOptions"] = "Opções Específicas de Caracteres"
L["ResetFlightTimes"] = "Redefinir o vôo Tempos"
L["ResetOptions"] = "Redefinir as Opções"
L["ShowChat"] = "Mensagens de Chat"
L["ShowSpark"] = "Mostrar Faísca"
L["TextOptions"] = "Opções de Texto"
L["Texture"] = "Textura"
L["TooltipOption1"] = "<Shift Clique-Esquerdo> para mover"
L["TooltipOption2"] = "<Clique-Direito> para Opções"
L["TooltipOption3"] = "<Ctrl Clique-Esquerda> para forçar perto"
L["ToText"] = "\"Para\" Texto"
L["UnknownColor"] = "Cor Desconhecida"
L["Width"] = "Largura"
 
-- Flight point localisations
local FL = LibStub("AceLocale-3.0"):NewLocale("InFlightLoc", "ptBR")
if not FL then return end
 
FL["Aerie Peak"] = "Ninho da Águia"
FL["Astranaar"] = true
FL["Auberdine"] = true
FL["Bloodvenom Post"] = "Posto Peçonha"
FL["Booty Bay"] = "Angra do Butim"
FL["Brackenwall Village"] = "Aldeia Muralha Verde"
FL["Camp Mojache"] = "Aldeia Mojache"
FL["Camp Taurajo"] = "Aldeia Taurajo"
FL["Cenarion Hold"] = "Forte Cenariano"
FL["Chillwind Camp"] = "Acampamento Ventogelante"
FL["Crossroads"] = "Encruzilhada"
FL["Darkshire"] = "Vila Sombria"
FL["Everlook"] = "Visteterna"
FL["Feathermoon"] = "Plumaluna"
FL["Flame Crest"] = "Monte Candente"
FL["Freewind Post"] = "Aldeia Vento Livre"
FL["Gadgetzan"] = "Geringontzan"
FL["Grom'gol"] = true
FL["Hammerfall"] = "Ruína do Martelo"
FL["Ironforge"] = "Altaforja"
FL["Kargath"] = "Karrath"
FL["Lakeshire"] = "Vila Plácida"
FL["Light's Hope Chapel"] = "Capela Esperança da Luz"
FL["Marshal's Refuge"] = "Refúgio do Marshal"
FL["Menethil Harbor"] = "Porto de Menethil"
FL["Moonglade"] = "Clareira da Lua"
FL["Morgan's Vigil"] = "Vigia de Morgan"
FL["Nethergarde Keep"] = "Bastilha de Etergarde"
FL["Nijel's Point"] = "Posto do Nijel"
FL["Orgrimmar"] = true
FL["Ratchet"] = "Vila Catraca"
FL["Refuge Pointe"] = "Ponta do Refúgio"
FL["Revantusk Village"] = "Aldeia Revatusco"
FL["Rut'theran Village"] = "Vila de Rut'theran"
FL["Sentinel Hill"] = "Morro da Sentinela"
FL["Shadowprey Village"] = "Aldeia Pescassombra"
FL["Southshore"] = "Costa Sul"
FL["Splintertree Post"] = "Posto Machadada"
FL["Stonard"] = "Pedregal"
FL["Stonetalon Peak"] = "Morro das Torres de Pedra"
FL["Stormwind"] = "Ventobravo"
FL["Sun Rock Retreat"] = "Retiro Rocha do Sol"
FL["Talonbranch Glade"] = "Clareira da Galhaça"
FL["Talrendis Point"] = "Campo Talrendis"
FL["Tarren Mill"] = "Serraria Tarren"
FL["Thalanaar"] = true
FL["The Sepulcher"] = "O Sepulcro"
FL["Thelsamar"] = true
FL["Theramore"] = true
FL["Thorium Point"] = "Posto de Tório"
FL["Thunder Bluff"] = "Penhasco do Trovão"
FL["Undercity"] = "Cidade Baixa"
FL["Valormok"] = true
FL["Zoram'gar Outpost"] = "Assentamento Zoram'gar"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/locales/enUS.lua New file
0,0 → 1,97
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "enUS", true, true)
if not L then return end
 
L["AddonDisabled"] = "Wrong client version detected: disabling addon"
L["BackgroundColor"] = "Background Color"
L["BarColor"] = "Bar Color"
L["BarOptions"] = "Bar Options"
L["Border"] = true
L["BorderColor"] = "Border Color"
L["CompactMode"] = "Compact Mode"
L["ConfirmFlight"] = "Confirm Flight"
L["ConfirmPopup"] = "Take flight to %s?"
L["CountUp"] = "Count Up"
L["DefaultsUpdated"] = "Default data updated."
L["DestParse"] = ", .+"
L["Duration"] = "Duration: "
L["FillUp"] = "Fill Up"
L["FlightTimeAdded"] = "flight time added:"
L["FlightTimeContribute"] = "%s flight times available to contribute."
L["FlightTimeUpdated"] = "flight time updated:"
L["Font"] = true
L["FontColor"] = "Font Color"
L["Height"] = true
L["OutlineInfo"] = "Outline Info"
L["OutlineTime"] = "Outline Time"
L["PerCharOptions"] = "Character Specific Options"
L["ResetFlightTimes"] = "Reset Flight Times"
L["ResetOptions"] = "Reset Options"
L["ShowChat"] = "Chat Messages"
L["ShowSpark"] = "Show Spark"
L["TextOptions"] = "Text Options"
L["Texture"] = true
L["TooltipOption1"] = "<Shift Left-Click> to move"
L["TooltipOption2"] = "<Right-Click> for Options"
L["TooltipOption3"] = "<Ctrl Left-Click> to force close"
L["ToText"] = "\"To\" Text"
L["UnknownColor"] = "Unknown Color"
L["Width"] = true
 
-- Flight point localisations
local FL = LibStub("AceLocale-3.0"):NewLocale("InFlightLoc", "enUS", true, true)
if not FL then return end
 
FL["Aerie Peak"] = true
FL["Astranaar"] = true
FL["Auberdine"] = true
FL["Bloodvenom Post"] = true
FL["Booty Bay"] = true
FL["Brackenwall Village"] = true
FL["Camp Mojache"] = true
FL["Camp Taurajo"] = true
FL["Cenarion Hold"] = true
FL["Chillwind Camp"] = true
FL["Crossroads"] = true
FL["Darkshire"] = true
FL["Everlook"] = true
FL["Feathermoon"] = true
FL["Flame Crest"] = true
FL["Freewind Post"] = true
FL["Gadgetzan"] = true
FL["Grom'gol"] = true
FL["Hammerfall"] = true
FL["Ironforge"] = true
FL["Kargath"] = true
FL["Lakeshire"] = true
FL["Light's Hope Chapel"] = true
FL["Marshal's Refuge"] = true
FL["Menethil Harbor"] = true
FL["Moonglade"] = true
FL["Morgan's Vigil"] = true
FL["Nethergarde Keep"] = true
FL["Nijel's Point"] = true
FL["Orgrimmar"] = true
FL["Ratchet"] = true
FL["Refuge Pointe"] = true
FL["Revantusk Village"] = true
FL["Rut'theran Village"] = true
FL["Sentinel Hill"] = true
FL["Shadowprey Village"] = true
FL["Southshore"] = true
FL["Splintertree Post"] = true
FL["Stonard"] = true
FL["Stonetalon Peak"] = true
FL["Stormwind"] = true
FL["Sun Rock Retreat"] = true
FL["Talonbranch Glade"] = true
FL["Talrendis Point"] = true
FL["Tarren Mill"] = true
FL["Thalanaar"] = true
FL["The Sepulcher"] = true
FL["Thelsamar"] = true
FL["Theramore"] = true
FL["Thorium Point"] = true
FL["Thunder Bluff"] = true
FL["Undercity"] = true
FL["Valormok"] = true
FL["Zoram'gar Outpost"] = true
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/locales/esMX.lua New file
0,0 → 1,97
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "esMX")
if not L then return end
 
L["AddonDisabled"] = "Se detectó una versión incorrecta del cliente: deshabilitar el complemento"
L["BackgroundColor"] = "Color del fondo"
L["BarColor"] = "Color de la barra"
L["BarOptions"] = "Opciones de la barra"
L["Border"] = "Borde"
L["BorderColor"] = "Color del borde"
L["CompactMode"] = "Modo compacto"
L["ConfirmFlight"] = "Confirmar Vuelo"
L["ConfirmPopup"] = "Tomar vuelo a %s?"
L["CountUp"] = "Contar hasta"
L["DefaultsUpdated"] = "Datos por defecto actualizados."
L["DestParse"] = ", .+"
L["Duration"] = "Duración: "
L["FillUp"] = "Rellenar"
L["FlightTimeAdded"] = "tiempo de vuelo añadido:"
L["FlightTimeContribute"] = "%s tiempos de vuelo disponibles para contribuir."
L["FlightTimeUpdated"] = "tiempo de vuelo actualizado:"
L["Font"] = "Fuente"
L["FontColor"] = "Color de la fuente"
L["Height"] = "Alto"
L["OutlineInfo"] = "Delinear la Fuente"
L["OutlineTime"] = "Delinear el Tiempo"
L["PerCharOptions"] = "Opciones especificas del personaje"
L["ResetFlightTimes"] = "Restablecer tiempos de vuelo"
L["ResetOptions"] = "Restablecer las opciones"
L["ShowChat"] = "Mensajes de chat"
L["ShowSpark"] = "Mostrar Chispa"
L["TextOptions"] = "Opciones de texto"
L["Texture"] = "Textura"
L["TooltipOption1"] = "<Shift Clic-Izquierdo> para mover"
L["TooltipOption2"] = "<Clic-Derecho> para Opciones"
L["TooltipOption3"] = "<Ctrl+clic izquierdo> para forzar el cierre"
L["ToText"] = "Texto \"Hacia\""
L["UnknownColor"] = "Color de desconocido"
L["Width"] = "Ancho"
 
-- Flight point localisations
local FL = LibStub("AceLocale-3.0"):NewLocale("InFlightLoc", "esMX")
if not FL then return end
 
FL["Aerie Peak"] = "Pico Nidal"
FL["Astranaar"] = true
FL["Auberdine"] = true
FL["Bloodvenom Post"] = "Puesto del Veneno"
FL["Booty Bay"] = "Bahía del Botín"
FL["Brackenwall Village"] = "Poblado Murohelecho"
FL["Camp Mojache"] = "Campamento Mojache"
FL["Camp Taurajo"] = "Campamento Taurajo"
FL["Cenarion Hold"] = "Fuerte Cenarion"
FL["Chillwind Camp"] = "Campamento del Orvallo"
FL["Crossroads"] = "El Cruce"
FL["Darkshire"] = "Villa Oscura"
FL["Everlook"] = "Vista Eterna"
FL["Feathermoon"] = "Plumaluna"
FL["Flame Crest"] = "Peñasco Llamarada"
FL["Freewind Post"] = "Poblado Viento Libre"
FL["Gadgetzan"] = true
FL["Grom'gol"] = true
FL["Hammerfall"] = "Sentencia"
FL["Ironforge"] = "Forjaz"
FL["Kargath"] = true
FL["Lakeshire"] = "Villa del Lago"
FL["Light's Hope Chapel"] = "Capilla de la Esperanza de la Luz"
FL["Marshal's Refuge"] = "Refugio de Marshal"
FL["Menethil Harbor"] = "Puerto de Menethil"
FL["Moonglade"] = "Claro de la Luna"
FL["Morgan's Vigil"] = "Vigilia de Morgan"
FL["Nethergarde Keep"] = "Castillo de Nethergarde"
FL["Nijel's Point"] = "Punta de Nijel"
FL["Orgrimmar"] = true
FL["Ratchet"] = "Trinquete"
FL["Refuge Pointe"] = "Refugio de la Zaga"
FL["Revantusk Village"] = "Poblado Sañadiente"
FL["Rut'theran Village"] = "Aldea Rut'theran"
FL["Sentinel Hill"] = "Colina del Centinela"
FL["Shadowprey Village"] = "Aldea Cazasombras"
FL["Southshore"] = "Costasur"
FL["Splintertree Post"] = "Puesto del Hachazo"
FL["Stonard"] = "Rocal"
FL["Stonetalon Peak"] = "Cima del Espolón"
FL["Stormwind"] = "Ventormenta"
FL["Sun Rock Retreat"] = "Refugio Roca del Sol"
FL["Talonbranch Glade"] = "Claro Ramaespolón"
FL["Talrendis Point"] = "Punta Talrendis"
FL["Tarren Mill"] = "Molino Tarren"
FL["Thalanaar"] = true
FL["The Sepulcher"] = "El Sepulcro"
FL["Thelsamar"] = true
FL["Theramore"] = true
FL["Thorium Point"] = "Puesto del Torio"
FL["Thunder Bluff"] = "Cima del Trueno"
FL["Undercity"] = "Entrañas"
FL["Valormok"] = true
FL["Zoram'gar Outpost"] = "Avanzada de Zoram'gar"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/locales/zhTW.lua New file
0,0 → 1,97
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "zhTW")
if not L then return end
 
L["AddonDisabled"] = "檢測到錯誤的客戶端版本:禁用插件"
L["BackgroundColor"] = "背景顏色"
L["BarColor"] = "時間條顏色"
L["BarOptions"] = "外觀"
L["Border"] = "邊框"
L["BorderColor"] = "邊框顏色"
L["CompactMode"] = "內嵌模式"
L["ConfirmFlight"] = "確定飛行"
L["ConfirmPopup"] = "你確定你要飛到%s?"
L["CountUp"] = "計數"
L["DefaultsUpdated"] = "默認數據已更新。"
L["DestParse"] = ",.+"
L["Duration"] = "時間:"
L["FillUp"] = "遞增"
L["FlightTimeAdded"] = "飛行時間補充:"
L["FlightTimeContribute"] = "%s 飛行時間可供貢獻。"
L["FlightTimeUpdated"] = "航班時間更新:"
L["Font"] = "字形"
L["FontColor"] = "字形顏色"
L["Height"] = "高度"
L["OutlineInfo"] = "輪廓信息文本"
L["OutlineTime"] = "輪廓 時間文本"
L["PerCharOptions"] = "字符特定選項"
L["ResetFlightTimes"] = "重置飛行時間"
L["ResetOptions"] = "重置選項"
L["ShowChat"] = "顯示聊天消息"
L["ShowSpark"] = "顯示火花"
L["TextOptions"] = "字形"
L["Texture"] = "時間條紋理"
L["TooltipOption1"] = "Shift-左擊: 移動"
L["TooltipOption2"] = "右擊: 打開設定選單"
L["TooltipOption3"] = "<Ctrl鍵左鍵單擊>將強制關閉"
L["ToText"] = "「到」文字"
L["UnknownColor"] = "未知顏色"
L["Width"] = "寬度"
 
-- Flight point localisations
local FL = LibStub("AceLocale-3.0"):NewLocale("InFlightLoc", "zhTW")
if not FL then return end
 
FL["Aerie Peak"] = "鷹巢山"
FL["Astranaar"] = "阿斯特蘭納"
FL["Auberdine"] = "奧伯丁"
FL["Bloodvenom Post"] = "血毒崗哨"
FL["Booty Bay"] = "藏寶海灣"
FL["Brackenwall Village"] = "蕨牆村"
FL["Camp Mojache"] = "莫沙徹營地"
FL["Camp Taurajo"] = "陶拉祖營地"
FL["Cenarion Hold"] = "塞納里奧城堡"
FL["Chillwind Camp"] = "冰風崗"
FL["Crossroads"] = "十字路口"
FL["Darkshire"] = "夜色鎮"
FL["Everlook"] = "永望鎮"
FL["Feathermoon"] = "羽月要塞"
FL["Flame Crest"] = "烈焰峰"
FL["Freewind Post"] = "亂風崗"
FL["Gadgetzan"] = "加基森"
FL["Grom'gol"] = "格羅姆高"
FL["Hammerfall"] = "落錘鎮"
FL["Ironforge"] = "鐵爐堡"
FL["Kargath"] = "卡加斯"
FL["Lakeshire"] = "湖畔鎮"
FL["Light's Hope Chapel"] = "聖光之願禮拜堂"
FL["Marshal's Refuge"] = "馬紹爾營地"
FL["Menethil Harbor"] = "米奈希爾港"
FL["Moonglade"] = "月光林地"
FL["Morgan's Vigil"] = "摩根的崗哨"
FL["Nethergarde Keep"] = "守望堡"
FL["Nijel's Point"] = "尼耶爾前哨站"
FL["Orgrimmar"] = "奧格瑪"
FL["Ratchet"] = "棘齒城"
FL["Refuge Pointe"] = "避難谷地"
FL["Revantusk Village"] = "惡齒村"
FL["Rut'theran Village"] = "魯瑟蘭村"
FL["Sentinel Hill"] = "哨兵嶺"
FL["Shadowprey Village"] = "葬影村"
FL["Southshore"] = "南海鎮"
FL["Splintertree Post"] = "碎木崗哨"
FL["Stonard"] = "斯通納德"
FL["Stonetalon Peak"] = "石爪峰"
FL["Stormwind"] = "暴風城"
FL["Sun Rock Retreat"] = "烈日石居"
FL["Talonbranch Glade"] = "刺枝林地"
FL["Talrendis Point"] = "塔倫迪斯營地"
FL["Tarren Mill"] = "塔倫米爾"
FL["Thalanaar"] = "薩蘭納爾"
FL["The Sepulcher"] = "瑟伯切爾"
FL["Thelsamar"] = "塞爾薩瑪"
FL["Theramore"] = "塞拉摩"
FL["Thorium Point"] = "瑟銀哨塔"
FL["Thunder Bluff"] = "雷霆崖"
FL["Undercity"] = "幽暗城"
FL["Valormok"] = "瓦羅莫克"
FL["Zoram'gar Outpost"] = "左拉姆加前哨站"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/locales/ruRU.lua New file
0,0 → 1,97
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "ruRU")
if not L then return end
 
L["AddonDisabled"] = "Обнаружена неверная версия клиента: отключение аддона"
L["BackgroundColor"] = "Цвет фона"
L["BarColor"] = "Цвет заполнения"
L["BarOptions"] = "Опции полосы"
L["Border"] = "Края"
L["BorderColor"] = "Цвет края"
L["CompactMode"] = "Компактный режим"
L["ConfirmFlight"] = "Подтверждать полет"
L["ConfirmPopup"] = "Лететь в %s?"
L["CountUp"] = "Посчитать"
L["DefaultsUpdated"] = "Данные по умолчанию обновлены."
L["DestParse"] = ", .+"
L["Duration"] = "Продолжительность полета: "
L["FillUp"] = "Заполнять"
L["FlightTimeAdded"] = "добавлено время полета:"
L["FlightTimeContribute"] = "%s раз полета доступны внести свой вклад."
L["FlightTimeUpdated"] = "Время полета обновлено:"
L["Font"] = "Шрифт"
L["FontColor"] = "Цвет шрифта"
L["Height"] = "Высота"
L["OutlineInfo"] = "Обрисовать информация"
L["OutlineTime"] = "Обрисуйте время"
L["PerCharOptions"] = "Символьные Конкретные опции"
L["ResetFlightTimes"] = "Сброс Время полета"
L["ResetOptions"] = "Сброс опций"
L["ShowChat"] = "Сообщения чата"
L["ShowSpark"] = "Показать Спарк"
L["TextOptions"] = "Опции текста"
L["Texture"] = "Текстура"
L["TooltipOption1"] = "<Shift левый-клик> для перемещения"
L["TooltipOption2"] = "<Правый-клик> для опций"
L["TooltipOption3"] = "<Ctrl левый-клик> чтобы заставить близко"
L["ToText"] = "\"в\" Текст"
L["UnknownColor"] = "Неизвестный цвет"
L["Width"] = "Ширина"
 
-- Flight point localisations
local FL = LibStub("AceLocale-3.0"):NewLocale("InFlightLoc", "ruRU")
if not FL then return end
 
FL["Aerie Peak"] = "Заоблачный пик"
FL["Astranaar"] = "Астранаар"
FL["Auberdine"] = "Аубердин"
FL["Bloodvenom Post"] = "Застава Отравленной Крови"
FL["Booty Bay"] = "Пиратская бухта"
FL["Brackenwall Village"] = "Деревня Гиблотопь"
FL["Camp Mojache"] = "Лагерь Мохаче"
FL["Camp Taurajo"] = "Лагерь Таурахо"
FL["Cenarion Hold"] = "Крепость Кенария"
FL["Chillwind Camp"] = "Лагерь Промозглого Ветра"
FL["Crossroads"] = "Перекресток"
FL["Darkshire"] = "Темнолесье"
FL["Everlook"] = "Круговзор"
FL["Feathermoon"] = "Лунное Перо"
FL["Flame Crest"] = "Пламенеющий Стяг"
FL["Freewind Post"] = "Застава Вольного Ветра"
FL["Gadgetzan"] = "Прибамбасск"
FL["Grom'gol"] = "Лагерь Гром'гол"
FL["Hammerfall"] = "Павший Молот"
FL["Ironforge"] = "Стальгорн"
FL["Kargath"] = "Каргат"
FL["Lakeshire"] = "Приозерье"
FL["Light's Hope Chapel"] = "Часовня Последней Надежды"
FL["Marshal's Refuge"] = "Укрытие Маршалла"
FL["Menethil Harbor"] = "Гавань Менетилов"
FL["Moonglade"] = "Лунная поляна"
FL["Morgan's Vigil"] = "Дозор Моргана"
FL["Nethergarde Keep"] = "Крепость Стражей Пустоты"
FL["Nijel's Point"] = "Высота Найджела"
FL["Orgrimmar"] = "Оргриммар"
FL["Ratchet"] = "Кабестан"
FL["Refuge Pointe"] = "Опорный пункт"
FL["Revantusk Village"] = "Деревня Сломанного Клыка"
FL["Rut'theran Village"] = "Деревня Рут'теран"
FL["Sentinel Hill"] = "Сторожевой холм"
FL["Shadowprey Village"] = "Деревня Ночных Охотников"
FL["Southshore"] = "Южнобережье"
FL["Splintertree Post"] = "Застава Расщепленного Дерева"
FL["Stonard"] = "Каменор"
FL["Stonetalon Peak"] = "Пик Каменного Когтя"
FL["Stormwind"] = "Штормград"
FL["Sun Rock Retreat"] = "Приют у Солнечного Камня"
FL["Talonbranch Glade"] = "Поляна Когтистых Ветвей"
FL["Talrendis Point"] = "Застава Талрендис"
FL["Tarren Mill"] = "Мельница Таррен"
FL["Thalanaar"] = "Таланаар"
FL["The Sepulcher"] = "Гробница"
FL["Thelsamar"] = "Телcамар"
FL["Theramore"] = "Терамор"
FL["Thorium Point"] = "Лагерь Братства Тория"
FL["Thunder Bluff"] = "Громовой Утес"
FL["Undercity"] = "Подгород"
FL["Valormok"] = "Храбростан"
FL["Zoram'gar Outpost"] = "Застава Зорам'гар"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/locales/esES.lua New file
0,0 → 1,97
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "esES")
if not L then return end
 
L["AddonDisabled"] = "Se detectó una versión incorrecta del cliente: deshabilitar el complemento"
L["BackgroundColor"] = "Color del fondo"
L["BarColor"] = "Color de la barra"
L["BarOptions"] = "Opciones de la barra"
L["Border"] = "Borde"
L["BorderColor"] = "Color del borde"
L["CompactMode"] = "Modo compacto"
L["ConfirmFlight"] = "Confirmar Vuelo"
L["ConfirmPopup"] = "¿Coger un vuelo hacia %s?"
L["CountUp"] = "Contar hasta"
L["DefaultsUpdated"] = "Datos por defecto actualizados."
L["DestParse"] = ", .+"
L["Duration"] = "Duración: "
L["FillUp"] = "Rellenar"
L["FlightTimeAdded"] = "tiempo de vuelo añadido:"
L["FlightTimeContribute"] = "%s tiempos de vuelo disponibles para contribuir."
L["FlightTimeUpdated"] = "tiempo de vuelo actualizado:"
L["Font"] = "Fuente"
L["FontColor"] = "Color de la fuente"
L["Height"] = "Alto"
L["OutlineInfo"] = "Delinear la Fuente"
L["OutlineTime"] = "Delinear el Tiempo"
L["PerCharOptions"] = "Opciones especificas del personaje"
L["ResetFlightTimes"] = "Restablecer tiempos de vuelo"
L["ResetOptions"] = "Restablecer las opciones"
L["ShowChat"] = "Mensajes de chat"
L["ShowSpark"] = "Mostrar Chispa"
L["TextOptions"] = "Opciones de texto"
L["Texture"] = "Textura"
L["TooltipOption1"] = "<Shift Clic-Izquierdo> para mover"
L["TooltipOption2"] = "<Clic-Derecho> para Opciones"
L["TooltipOption3"] = "<Ctrl+clic izquierdo> para forzar el cierre"
L["ToText"] = "Texto \"Hacia\""
L["UnknownColor"] = "Color de desconocido"
L["Width"] = "Ancho"
 
-- Flight point localisations
local FL = LibStub("AceLocale-3.0"):NewLocale("InFlightLoc", "esES")
if not FL then return end
 
FL["Aerie Peak"] = "Pico Nidal"
FL["Astranaar"] = true
FL["Auberdine"] = true
FL["Bloodvenom Post"] = "Puesto del Veneno"
FL["Booty Bay"] = "Bahía del Botín"
FL["Brackenwall Village"] = "Poblado Murohelecho"
FL["Camp Mojache"] = "Campamento Mojache"
FL["Camp Taurajo"] = "Campamento Taurajo"
FL["Cenarion Hold"] = "Fuerte Cenarion"
FL["Chillwind Camp"] = "Campamento del Orvallo"
FL["Crossroads"] = "El Cruce"
FL["Darkshire"] = "Villa Oscura"
FL["Everlook"] = "Vista Eterna"
FL["Feathermoon"] = "Plumaluna"
FL["Flame Crest"] = "Peñasco Llamarada"
FL["Freewind Post"] = "Poblado Viento Libre"
FL["Gadgetzan"] = true
FL["Grom'gol"] = true
FL["Hammerfall"] = "Sentencia"
FL["Ironforge"] = "Forjaz"
FL["Kargath"] = true
FL["Lakeshire"] = "Villa del Lago"
FL["Light's Hope Chapel"] = "Capilla de la Esperanza de la Luz"
FL["Marshal's Refuge"] = "Refugio de Marshal"
FL["Menethil Harbor"] = "Puerto de Menethil"
FL["Moonglade"] = "Claro de la Luna"
FL["Morgan's Vigil"] = "Vigilia de Morgan"
FL["Nethergarde Keep"] = "Castillo de Nethergarde"
FL["Nijel's Point"] = "Punta de Nijel"
FL["Orgrimmar"] = true
FL["Ratchet"] = "Trinquete"
FL["Refuge Pointe"] = "Refugio de la Zaga"
FL["Revantusk Village"] = "Poblado Sañadiente"
FL["Rut'theran Village"] = "Aldea Rut'theran"
FL["Sentinel Hill"] = "Colina del Centinela"
FL["Shadowprey Village"] = "Aldea Cazasombras"
FL["Southshore"] = "Costasur"
FL["Splintertree Post"] = "Puesto del Hachazo"
FL["Stonard"] = "Rocal"
FL["Stonetalon Peak"] = "Cima del Espolón"
FL["Stormwind"] = "Ventormenta"
FL["Sun Rock Retreat"] = "Refugio Roca del Sol"
FL["Talonbranch Glade"] = "Claro Ramaespolón"
FL["Talrendis Point"] = "Punta Talrendis"
FL["Tarren Mill"] = "Molino Tarren"
FL["Thalanaar"] = true
FL["The Sepulcher"] = "El Sepulcro"
FL["Thelsamar"] = true
FL["Theramore"] = true
FL["Thorium Point"] = "Puesto del Torio"
FL["Thunder Bluff"] = "Cima del Trueno"
FL["Undercity"] = "Entrañas"
FL["Valormok"] = true
FL["Zoram'gar Outpost"] = "Avanzada de Zoram'gar"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/locales/frFR.lua New file
0,0 → 1,97
local L = LibStub("AceLocale-3.0"):NewLocale("InFlight", "frFR")
if not L then return end
 
L["AddonDisabled"] = "Mauvaise version du client détectée: désactivation de l'addon"
L["BackgroundColor"] = "Couleur de Fond"
L["BarColor"] = "Couleur de Remplissage"
L["BarOptions"] = "Status Options"
L["Border"] = "Bordure"
L["BorderColor"] = "Couleur de la Bordure"
L["CompactMode"] = "Mode Compact"
L["ConfirmFlight"] = "Confirmer votre vol"
L["ConfirmPopup"] = "Prenez votre envol pour %s?"
L["CountUp"] = "Compter jusqu'à"
L["DefaultsUpdated"] = "Données par défaut mises à jour."
L["DestParse"] = ", .+"
L["Duration"] = "Durée: "
L["FillUp"] = "Compléter"
L["FlightTimeAdded"] = "temps de vol ajouté:"
L["FlightTimeContribute"] = "%s temps de vol disponibles pour contribuer."
L["FlightTimeUpdated"] = "temps de vol mis à jour:"
L["Font"] = true
L["FontColor"] = "Couleur de Font"
L["Height"] = "Hauteur"
L["OutlineInfo"] = "Contour du Texte"
L["OutlineTime"] = "Contour le Time"
L["PerCharOptions"] = "Options Spécifiques aux Personnages"
L["ResetFlightTimes"] = "Réinitialiser les Temps de Vol"
L["ResetOptions"] = "Réinitialiser les Options"
L["ShowChat"] = "Messages de Chat"
L["ShowSpark"] = "Montrer l'étincelle"
L["TextOptions"] = "Options du Texte"
L["Texture"] = true
L["TooltipOption1"] = "<Shift Clic-Gauche> pour se déplacer"
L["TooltipOption2"] = "<Clic-Droit> pour les Options"
L["TooltipOption3"] = "<Ctrl Clic-Gauche> pour forcer la fermeture"
L["ToText"] = "\"Après\" Text"
L["UnknownColor"] = "Couleur Inconnu"
L["Width"] = "Largeur"
 
-- Flight point localisations
local FL = LibStub("AceLocale-3.0"):NewLocale("InFlightLoc", "frFR")
if not FL then return end
 
FL["Aerie Peak"] = "Nid-de-l'Aigle"
FL["Astranaar"] = true
FL["Auberdine"] = true
FL["Bloodvenom Post"] = "Poste de la Vénéneuse"
FL["Booty Bay"] = "Baie-du-Butin"
FL["Brackenwall Village"] = "Mur-de-Fougères"
FL["Camp Mojache"] = true
FL["Camp Taurajo"] = true
FL["Cenarion Hold"] = "Fort Cénarien"
FL["Chillwind Camp"] = "Camp du Noroît"
FL["Crossroads"] = "La Croisée"
FL["Darkshire"] = true
FL["Everlook"] = "Long-Guet"
FL["Feathermoon"] = true
FL["Flame Crest"] = "Corniche des Flammes"
FL["Freewind Post"] = "Poste de Librevent"
FL["Gadgetzan"] = true
FL["Grom'gol"] = true
FL["Hammerfall"] = "Trépas-d'Orgrim"
FL["Ironforge"] = true
FL["Kargath"] = true
FL["Lakeshire"] = true
FL["Light's Hope Chapel"] = "Chapelle de l'Espoir de Lumière"
FL["Marshal's Refuge"] = "Refuge des Marshal"
FL["Menethil Harbor"] = "Port de Menethil"
FL["Moonglade"] = "Reflet-de-Lune"
FL["Morgan's Vigil"] = "Veille de Morgan"
FL["Nethergarde Keep"] = "Rempart-du-Néant"
FL["Nijel's Point"] = "Combe de Nijel"
FL["Orgrimmar"] = true
FL["Ratchet"] = true
FL["Refuge Pointe"] = "Refuge de l'Ornière"
FL["Revantusk Village"] = "Village des Vengebroches"
FL["Rut'theran Village"] = "Rut'theran"
FL["Sentinel Hill"] = "Colline des sentinelles"
FL["Shadowprey Village"] = "Proie-de-l'Ombre"
FL["Southshore"] = true
FL["Splintertree Post"] = "Poste de Bois-Brisé"
FL["Stonard"] = true
FL["Stonetalon Peak"] = "Pic des Serres-Rocheuses"
FL["Stormwind"] = true
FL["Sun Rock Retreat"] = "Retraite de Roche-Soleil"
FL["Talonbranch Glade"] = "Clairière de Griffebranche"
FL["Talrendis Point"] = "Halte de Talrendis"
FL["Tarren Mill"] = "Moulin-de-Tarren"
FL["Thalanaar"] = true
FL["The Sepulcher"] = "Le Sépulcre"
FL["Thelsamar"] = true
FL["Theramore"] = true
FL["Thorium Point"] = "Halte du Thorium"
FL["Thunder Bluff"] = true
FL["Undercity"] = true
FL["Valormok"] = true
FL["Zoram'gar Outpost"] = "Avant-poste de Zoram'gar"
Property changes : Added: svn:eol-style + native
tags/1.13.005_Classic/InFlight/InFlight.lua New file
0,0 → 1,1059
-- GLOBALS -> LOCAL
local _G = getfenv(0)
local InFlight, self = InFlight, InFlight
local GetNumRoutes, GetTaxiMapID, GetTime, NumTaxiNodes, TaxiGetNodeSlot, TaxiNodeGetType, TaxiNodeName, UnitOnTaxi
= GetNumRoutes, GetTaxiMapID, GetTime, NumTaxiNodes, TaxiGetNodeSlot, TaxiNodeGetType, TaxiNodeName, UnitOnTaxi
local abs, floor, format, gsub, ipairs, pairs, print, strjoin
= abs, floor, format, gsub, ipairs, pairs, print, strjoin
local gtt = GameTooltip
local oldTakeTaxiNode
InFlight.debug = false
 
-- LIBRARIES
local smed = LibStub("LibSharedMedia-3.0")
 
-- LOCAL VARIABLES
local debug = InFlight.debug
local Print, PrintD = InFlight.Print, InFlight.PrintD
local vars, db -- addon databases
local taxiSrc, taxiSrcName, taxiDst, taxiDstName, endTime -- location data
local porttaken, takeoff, inworld, outworld, ontaxi -- flags
local ratio, endText = 0, "??" -- cache variables
local sb, spark, timeText, locText, bord -- frame elements
local totalTime, startTime, elapsed, throt = 0, 0, 0, 0 -- throttle vars
 
-- LOCALIZATION
local L = LibStub("AceLocale-3.0"):GetLocale("InFlight", not debug)
local FL = LibStub("AceLocale-3.0"):GetLocale("InFlightLoc", not debug)
InFlight.L = L
 
-- LOCAL FUNCTIONS
local function FormatTime(secs) -- simple time format
if not secs then
return "??"
end
 
return format(TIMER_MINUTES_DISPLAY, secs / 60, secs % 60)
end
 
local function ShortenName(name) -- shorten name to lighten saved vars and display
return gsub(name, L["DestParse"], "")
end
 
local function SetPoints(f, lp, lrt, lrp, lx, ly, rp, rrt, rrp, rx, ry)
f:ClearAllPoints()
f:SetPoint(lp, lrt, lrp, lx, ly)
if rp then
f:SetPoint(rp, rrt, rrp, rx, ry)
end
end
 
local function SetToUnknown() -- setup bar for flights with unknown time
sb:SetMinMaxValues(0, 1)
sb:SetValue(1)
sb:SetStatusBarColor(db.unknowncolor.r, db.unknowncolor.g, db.unknowncolor.b, db.unknowncolor.a)
spark:Hide()
end
 
local function GetEstimatedTime(slot) -- estimates flight times based on hops
local numRoutes = GetNumRoutes(slot)
if numRoutes < 2 then
return
end
 
local taxiNodes = {[1] = taxiSrc, [numRoutes + 1] = L[ShortenName(TaxiNodeName(slot))]}
for hop = 2, numRoutes, 1 do
taxiNodes[hop] = L[ShortenName(TaxiNodeName(TaxiGetNodeSlot(slot, hop, true)))]
end
 
local etimes = { 0 }
local prevNode = {}
local nextNode = {}
local srcNode = 1
local dstNode = #taxiNodes - 1
PrintD("|cff208080New Route:|r", taxiSrc, "-->", taxiNodes[#taxiNodes], "-", #taxiNodes, "hops")
while srcNode and srcNode < #taxiNodes do
while dstNode and dstNode > srcNode do
PrintD("|cff208080Node:|r", taxiNodes[srcNode], "-->", taxiNodes[dstNode])
if vars[taxiNodes[srcNode]] then
if not etimes[dstNode] and vars[taxiNodes[srcNode]][taxiNodes[dstNode]] then
etimes[dstNode] = etimes[srcNode] + vars[taxiNodes[srcNode]][taxiNodes[dstNode]]
PrintD(taxiNodes[dstNode], "time:", FormatTime(etimes[srcNode]), "+", FormatTime(vars[taxiNodes[srcNode]][taxiNodes[dstNode]]), "=", FormatTime(etimes[dstNode]))
nextNode[srcNode] = dstNode - 1
prevNode[dstNode] = srcNode
srcNode = dstNode
dstNode = #taxiNodes
else
dstNode = dstNode - 1
end
else
srcNode = prevNode[srcNode]
dstNode = nextNode[srcNode]
end
end
 
if not etimes[#taxiNodes] then
PrintD("<<")
srcNode = prevNode[srcNode]
dstNode = nextNode[srcNode]
end
end
 
PrintD(".")
return etimes[#taxiNodes]
end
 
local function addDuration(flightTime, estimated)
if flightTime > 0 then
gtt:AddLine(L["Duration"]..(estimated and "~" or "")..FormatTime(flightTime), 1, 1, 1)
else
gtt:AddLine(L["Duration"].."-:--", 0.8, 0.8, 0.8)
end
 
gtt:Show()
end
 
local function postTaxiNodeOnButtonEnter(button) -- adds duration info to taxi node tooltips
local id = button:GetID()
if TaxiNodeGetType(id) ~= "REACHABLE" then
return
end
 
local duration = vars[taxiSrc] and vars[taxiSrc][L[ShortenName(TaxiNodeName(id))]]
if duration then
addDuration(duration)
else
addDuration(GetEstimatedTime(id) or 0, true)
end
end
 
----------------------------
function InFlight.Print(...) -- prefix chat messages
----------------------------
print("|cff0040ffIn|cff00aaffFlight|r:", ...)
end
Print = InFlight.Print
 
-----------------------------
function InFlight.PrintD(...) -- debug print
-----------------------------
if debug then
print("|cff00ff40In|cff00aaffFlight|r:", ...)
end
end
PrintD = InFlight.PrintD
 
----------------------------------
function InFlight:GetDestination()
----------------------------------
return taxiDstName
end
 
---------------------------------
function InFlight:GetFlightTime()
---------------------------------
return endTime
end
 
----------------------------
function InFlight:LoadBulk() -- called from InFlight_Load
----------------------------
InFlightDB = InFlightDB or {}
 
-- Convert old saved variables
if not InFlightDB.version then
InFlightDB.perchar = nil
InFlightDB.dbinit = nil
InFlightDB.upload = nil
local tempDB = InFlightDB
InFlightDB = { profiles = { Default = tempDB }}
end
 
-- Check that this is the right version of the client
if select(4, GetBuildInfo()) > 20000 then
Print(L["AddonDisabled"])
DisableAddOn("InFlight")
return
end
 
-- Check that this is the right version of the database to avoid corruption
if InFlightDB.version ~= "classic" then
InFlightDB.global = nil
InFlightDB.version = "classic"
end
 
-- Update default data
if InFlightDB.dbinit ~= 1134 or debug then
InFlightDB.dbinit = 1134
InFlightDB.upload = nil
Print(L["DefaultsUpdated"])
 
if debug then
for faction, t in pairs(self.defaults.global) do
local count = 0
for src, dt in pairs(t) do
for dst, dtime in pairs(dt) do
count = count + 1
end
end
 
PrintD(faction, "|cff208020-|r", count, "|cff208020flights|r")
end
else
InFlightDB.global = nil
end
end
 
-- Set up flight point translations
for key, value in pairs(FL) do
L[value] = key
end
 
-- Sanitise data
if InFlightDB.global then
local defaults = self.defaults.global
for faction, t in pairs(InFlightDB.global) do
for src, dt in pairs(t) do
local lsrc = L[ShortenName(src)]
if lsrc ~= src and FL[lsrc] ~= L[src] then
InFlightDB.global[faction][lsrc] = dt
InFlightDB.global[faction][src] = nil
src = lsrc
end
 
for dst, dtime in pairs(dt) do
local ldst = L[ShortenName(dst)]
if ldst ~= dst and FL[ldst] ~= L[dst] then
InFlightDB.global[faction][src][ldst] = dtime
InFlightDB.global[faction][src][dst] = nil
dst = ldst
end
 
if defaults[faction][src] and defaults[faction][src][dst]
and abs(dtime - defaults[faction][src][dst]) < (debug and 2 or 5) then
InFlightDB.global[faction][src][dst] = defaults[faction][src][dst]
end
end
end
end
end
 
FL = nil
 
-- Check every 2 weeks if there are new flight times that could be uploaded
if not InFlightDB.upload or InFlightDB.upload < time() then
if InFlightDB.global then
local defaults = self.defaults.global
for faction, t in pairs(InFlightDB.global) do
local found = 0
for src, dt in pairs(t) do
for dst, dtime in pairs(dt) do
if not defaults[faction][src] or not defaults[faction][src][dst] then
found = found + 1
PrintD(faction, "|cff208020-|r", src, "-->", dst, "|cff208020found:|r", FormatTime(dtime))
elseif defaults[faction][src][dst] - dtime >= (debug and 2 or 5) then
found = found + 1
PrintD(faction, "|cff208020-|r", src, "-->", dst, "|cff208020updated:|r", FormatTime(defaults[faction][src][dst]), "-->", FormatTime(dtime))
end
end
end
 
if found > 0 then
Print(faction, format("|cff208020- "..L["FlightTimeContribute"].."|r", "|r"..found.."|cff208020"))
end
end
end
 
InFlightDB.upload = time() + 1209600 -- 2 weeks in seconds (60 * 60 * 24 * 14)
end
 
-- Create profile and flight time databases
local faction = UnitFactionGroup("player")
if not debug then
InFlight.defaults.global[faction == "Alliance" and "Horde" or "Alliance"] = nil
end
self.db = LibStub("AceDB-3.0"):New("InFlightDB", self.defaults, true)
db = self.db.profile
vars = self.db.global[faction]
 
oldTakeTaxiNode = TakeTaxiNode
TakeTaxiNode = function(slot)
if TaxiNodeGetType(slot) ~= "REACHABLE" then
return
end
 
-- Attempt to get source flight point if another addon auto-takes the taxi
-- which can cause this function to run before the TAXIMAP_OPENED function
if not taxiSrc then
for i = 1, NumTaxiNodes(), 1 do
if TaxiNodeGetType(i) == "CURRENT" then
taxiSrcName = ShortenName(TaxiNodeName(i))
taxiSrc = L[taxiSrcName]
break
end
end
 
if not taxiSrc then
oldTakeTaxiNode(slot)
return
end
end
 
taxiDstName = ShortenName(TaxiNodeName(slot))
taxiDst = L[taxiDstName]
local t = vars[taxiSrc]
if t and t[taxiDst] and t[taxiDst] > 0 then -- saved variables lookup
endTime = t[taxiDst]
endText = FormatTime(endTime)
else
endTime = GetEstimatedTime(slot)
endText = (endTime and "~" or "")..FormatTime(endTime)
end
 
if db.confirmflight then -- confirm flight
StaticPopupDialogs.INFLIGHTCONFIRM = StaticPopupDialogs.INFLIGHTCONFIRM or {
button1 = OKAY, button2 = CANCEL,
OnAccept = function(this, data) InFlight:StartTimer(data) end,
timeout = 0, exclusive = 1, hideOnEscape = 1,
}
StaticPopupDialogs.INFLIGHTCONFIRM.text = format(L["ConfirmPopup"], "|cffffff00"..taxiDstName..(endTime and " ("..endText..")" or "").."|r")
 
local dialog = StaticPopup_Show("INFLIGHTCONFIRM")
if dialog then
dialog.data = slot
end
else -- just take the flight
self:StartTimer(slot)
end
end
 
-- function hooks to detect if a user took a summon
hooksecurefunc("TaxiRequestEarlyLanding", function()
porttaken = true
PrintD("|cffff8080Taxi Early|cff208080, porttaken -|r", porttaken)
end)
 
hooksecurefunc("AcceptBattlefieldPort", function(index, accept)
porttaken = accept and true
PrintD("|cffff8080Battlefield port|cff208080, porttaken -|r", porttaken)
end)
 
hooksecurefunc(C_SummonInfo, "ConfirmSummon", function()
porttaken = true
PrintD("|cffff8080Summon|cff208080, porttaken -|r", porttaken)
end)
 
self:Hide()
self.LoadBulk = nil
end
 
---------------------------------------
function InFlight:InitSource(isTaxiMap) -- cache source location and hook tooltips
---------------------------------------
taxiSrcName = nil
taxiSrc = nil
 
for i = 1, NumTaxiNodes(), 1 do
local tb = _G["TaxiButton"..i]
if tb and not tb.inflighted then
tb:HookScript("OnEnter", postTaxiNodeOnButtonEnter)
tb.inflighted = true
end
 
-- PrintD(L[ShortenName(TaxiNodeName(i))], ShortenName(TaxiNodeName(i)))
if TaxiNodeGetType(i) == "CURRENT" then
taxiSrcName = ShortenName(TaxiNodeName(i))
taxiSrc = L[taxiSrcName]
end
end
end
 
----------------------------------
function InFlight:StartTimer(slot) -- lift off
----------------------------------
Dismount()
 
-- create the timer bar
if not sb then
self:CreateBar()
end
 
-- start the timers and setup statusbar
if endTime then
sb:SetMinMaxValues(0, endTime)
sb:SetValue(db.fill and 0 or endTime)
spark:SetPoint("CENTER", sb, "LEFT", db.fill and 0 or db.width, 0)
else
SetToUnknown()
end
 
InFlight:UpdateLook()
timeText:SetFormattedText("%s / %s", FormatTime(0), endText)
sb:Show()
self:Show()
 
porttaken = nil
elapsed, totalTime, startTime = 0, 0, GetTime()
takeoff, inworld = true, true
throt = min(0.2, (endTime or 50) / (db.width or 1)) -- increases updates for short flights
 
self:RegisterEvent("PLAYER_CONTROL_GAINED")
self:RegisterEvent("PLAYER_ENTERING_WORLD")
self:RegisterEvent("PLAYER_LEAVING_WORLD")
 
if slot then
oldTakeTaxiNode(slot)
end
end
 
-------------------------------------------
function InFlight:StartMiscFlight(src, dst) -- called from InFlight_Load for special flights
-------------------------------------------
taxiSrcName = L[src]
taxiSrc = src
taxiDstName = L[dst]
taxiDst = dst
endTime = vars[src] and vars[src][dst]
endText = FormatTime(endTime)
self:StartTimer()
end
 
do -- timer bar
local bdrop = { edgeSize = 16, insets = {}, }
local bdi = bdrop.insets
-----------------------------
function InFlight:CreateBar()
-----------------------------
sb = CreateFrame("StatusBar", "InFlightBar", UIParent)
sb:Hide()
sb:SetPoint(db.p, UIParent, db.rp, db.x, db.y)
sb:SetMovable(true)
sb:EnableMouse(true)
sb:SetClampedToScreen(true)
sb:SetScript("OnMouseUp", function(this, a1)
if a1 == "RightButton" then
InFlight:ShowOptions()
elseif a1 == "LeftButton" and IsControlKeyDown() then
ontaxi, porttaken = nil, true
end
end)
sb:RegisterForDrag("LeftButton")
sb:SetScript("OnDragStart", function(this)
if IsShiftKeyDown() then
this:StartMoving()
end
end)
sb:SetScript("OnDragStop", function(this)
this:StopMovingOrSizing()
local a,b,c,d,e = this:GetPoint()
db.p, db.rp, db.x, db.y = a, c, floor(d + 0.5), floor(e + 0.5)
end)
sb:SetScript("OnEnter", function(this)
gtt:SetOwner(this, "ANCHOR_RIGHT")
gtt:SetText("InFlight", 1, 1, 1)
gtt:AddLine(L["TooltipOption1"], 0, 1, 0)
gtt:AddLine(L["TooltipOption2"], 0, 1, 0)
gtt:AddLine(L["TooltipOption3"], 0, 1, 0)
gtt:Show()
end)
sb:SetScript("OnLeave", function() gtt:Hide() end)
 
timeText = sb:CreateFontString(nil, "OVERLAY")
locText = sb:CreateFontString(nil, "OVERLAY")
 
spark = sb:CreateTexture(nil, "OVERLAY")
spark:Hide()
spark:SetTexture("Interface\\CastingBar\\UI-CastingBar-Spark")
spark:SetWidth(16)
spark:SetBlendMode("ADD")
 
bord = CreateFrame("Frame", nil, sb) -- border/background
SetPoints(bord, "TOPLEFT", sb, "TOPLEFT", -5, 5, "BOTTOMRIGHT", sb, "BOTTOMRIGHT", 5, -5)
bord:SetFrameStrata("LOW")
 
local function onupdate(this, a1)
elapsed = elapsed + a1
if elapsed < throt then
return
end
 
totalTime = GetTime() - startTime
elapsed = 0
 
if takeoff then -- check if actually in flight after take off (doesn't happen immediately)
if UnitOnTaxi("player") then
takeoff, ontaxi = nil, true
elapsed, totalTime, startTime = throt - 0.01, 0, GetTime()
elseif totalTime > 5 then
sb:Hide()
this:Hide()
end
 
return
end
 
if ontaxi and not inworld then
return
end
 
if not UnitOnTaxi("player") then -- event bug fix
ontaxi = nil
end
 
if not ontaxi then -- flight ended
PrintD("|cff208080porttaken -|r", porttaken)
if not porttaken and taxiSrc then
vars[taxiSrc] = vars[taxiSrc] or {}
local oldTime = vars[taxiSrc][taxiDst]
local newTime = floor(totalTime + 0.5)
local msg = strjoin(" ", taxiSrcName, db.totext, taxiDstName, "|cff208080")
if not oldTime then
msg = msg..L["FlightTimeAdded"].."|r "..FormatTime(newTime)
elseif abs(newTime - oldTime) >= 5 then
msg = msg..L["FlightTimeUpdated"].."|r "..FormatTime(oldTime).." |cff208080"..db.totext.."|r "..FormatTime(newTime)
else
if debug then
PrintD(msg..L["FlightTimeUpdated"].."|r "..FormatTime(oldTime).." |cff208080"..db.totext.."|r "..FormatTime(newTime))
end
 
if not debug or abs(newTime - oldTime) < 2 then
newTime = oldTime
end
 
msg = nil
end
 
vars[taxiSrc][taxiDst] = newTime
if msg and db.chatlog then
Print(msg)
end
end
 
taxiSrcName = nil
taxiSrc = nil
taxiDstName = nil
taxiDst = nil
endTime = nil
endText = FormatTime(endTime)
sb:Hide()
this:Hide()
 
return
end
 
if endTime then -- update statusbar if destination time is known
if totalTime - 2 > endTime then -- in case the flight is longer than expected
SetToUnknown()
endTime = nil
endText = FormatTime(endTime)
else
local curTime = totalTime
if curTime > endTime then
curTime = endTime
elseif curTime < 0 then
curTime = 0
end
 
local value = db.fill and curTime or (endTime - curTime)
sb:SetValue(value)
spark:SetPoint("CENTER", sb, "LEFT", value * ratio, 0)
 
value = db.countup and curTime or (endTime - curTime)
timeText:SetFormattedText("%s / %s", FormatTime(value), endText)
end
else -- destination time is unknown, so show that it's timing
timeText:SetFormattedText("%s / %s", FormatTime(totalTime), endText)
end
end
 
function self:PLAYER_LEAVING_WORLD()
PrintD('PLAYER_LEAVING_WORLD')
inworld = nil
outworld = GetTime()
end
 
function self:PLAYER_ENTERING_WORLD()
PrintD('PLAYER_ENTERING_WORLD')
inworld = true
if outworld then
startTime = startTime - (outworld - GetTime())
end
 
outworld = nil
end
 
function self:PLAYER_CONTROL_GAINED()
PrintD('PLAYER_CONTROL_GAINED')
if not inworld then
return
end
 
if self:IsShown() then
ontaxi = nil
onupdate(self, 3)
end
 
self:UnregisterEvent("PLAYER_ENTERING_WORLD")
self:UnregisterEvent("PLAYER_LEAVING_WORLD")
self:UnregisterEvent("PLAYER_CONTROL_GAINED")
end
 
self:SetScript("OnUpdate", onupdate)
self.CreateBar = nil
end
 
------------------------------
function InFlight:UpdateLook()
------------------------------
if not sb then
return
end
 
sb:SetWidth(db.width)
sb:SetHeight(db.height)
 
local texture = smed:Fetch("statusbar", db.texture)
local inset = (db.border=="Textured" and 2) or 4
bdrop.bgFile = texture
bdrop.edgeFile = smed:Fetch("border", db.border)
bdi.left, bdi.right, bdi.top, bdi.bottom = inset, inset, inset, inset
bord:SetBackdrop(bdrop)
bord:SetBackdropColor(db.backcolor.r, db.backcolor.g, db.backcolor.b, db.backcolor.a)
bord:SetBackdropBorderColor(db.bordercolor.r, db.bordercolor.g, db.bordercolor.b, db.bordercolor.a)
sb:SetStatusBarTexture(texture)
if sb:GetStatusBarTexture() then
sb:GetStatusBarTexture():SetHorizTile(false)
sb:GetStatusBarTexture():SetVertTile(false)
end
 
spark:SetHeight(db.height * 2.4)
if endTime then -- in case we're in flight
ratio = db.width / endTime
sb:SetStatusBarColor(db.barcolor.r, db.barcolor.g, db.barcolor.b, db.barcolor.a)
if db.spark then
spark:Show()
else
spark:Hide()
end
else
SetToUnknown()
end
 
locText:SetFont(smed:Fetch("font", db.font), db.fontsize, db.outline and "OUTLINE" or nil)
locText:SetShadowColor(0, 0, 0, db.fontcolor.a)
locText:SetShadowOffset(1, -1)
locText:SetTextColor(db.fontcolor.r, db.fontcolor.g, db.fontcolor.b, db.fontcolor.a)
 
timeText:SetFont(smed:Fetch("font", db.font), db.fontsize, db.outlinetime and "OUTLINE" or nil)
timeText:SetShadowColor(0, 0, 0, db.fontcolor.a)
timeText:SetShadowOffset(1, -1)
timeText:SetTextColor(db.fontcolor.r, db.fontcolor.g, db.fontcolor.b, db.fontcolor.a)
 
if db.inline then
timeText:SetJustifyH("RIGHT")
timeText:SetJustifyV("CENTER")
SetPoints(timeText, "RIGHT", sb, "RIGHT", -4, 0)
locText:SetJustifyH("LEFT")
locText:SetJustifyV("CENTER")
SetPoints(locText, "LEFT", sb, "LEFT", 4, 0, "RIGHT", timeText, "LEFT", -2, 0)
locText:SetText(taxiDstName or "??")
else
timeText:SetJustifyH("CENTER")
timeText:SetJustifyV("CENTER")
SetPoints(timeText, "CENTER", sb, "CENTER", 0, 0)
locText:SetJustifyH("CENTER")
locText:SetJustifyV("BOTTOM")
SetPoints(locText, "TOPLEFT", sb, "TOPLEFT", -24, db.fontsize*2.5, "BOTTOMRIGHT", sb, "TOPRIGHT", 24, (db.border=="None" and 1) or 3)
locText:SetFormattedText("%s %s %s", taxiSrcName or "??", db.totext, taxiDstName or "??")
end
end
end
 
---------------------------------
function InFlight:SetLayout(this) -- setups the options in the default interface options
---------------------------------
local t1 = this:CreateFontString(nil, "ARTWORK")
t1:SetFontObject(GameFontNormalLarge)
t1:SetJustifyH("LEFT")
t1:SetJustifyV("TOP")
t1:SetPoint("TOPLEFT", 16, -16)
t1:SetText("|cff0040ffIn|cff00aaffFlight|r")
this.tl = t1
 
local t2 = this:CreateFontString(nil, "ARTWORK")
t2:SetFontObject(GameFontHighlight)
t2:SetJustifyH("LEFT")
t2:SetJustifyV("TOP")
SetPoints(t2, "TOPLEFT", t1, "BOTTOMLEFT", 0, -8, "RIGHT", this, "RIGHT", -32, 0)
t2:SetNonSpaceWrap(true)
local function GetInfo(field)
return GetAddOnMetadata("InFlight", field) or "N/A"
end
 
t2:SetFormattedText("|cff00aaffAuthor:|r %s\n|cff00aaffVersion:|r %s\n\n%s|r", GetInfo("Author"), GetInfo("Version"), GetInfo("Notes"))
 
local b = CreateFrame("Button", nil, this, "UIPanelButtonTemplate")
b:SetText(_G.GAMEOPTIONS_MENU)
b:SetWidth(max(120, b:GetTextWidth() + 20))
b:SetScript("OnClick", InFlight.ShowOptions)
b:SetPoint("TOPLEFT", t2, "BOTTOMLEFT", -2, -8)
 
this:SetScript("OnShow", nil)
 
self.SetLayout = nil
end
 
-- options table
smed:Register("border", "Textured", "\\Interface\\None") -- dummy border
local InFlightDD, offsetvalue, offsetcount, lastb
local info = { }
-------------------------------
function InFlight.ShowOptions()
-------------------------------
if not InFlightDD then
InFlightDD = CreateFrame("Frame", "InFlightDD", InFlight)
InFlightDD.displayMode = "MENU"
 
hooksecurefunc("ToggleDropDownMenu", function(...) lastb = select(8, ...) end)
local function Exec(b, k, value)
if k == "totext" then
StaticPopupDialogs["InFlightToText"] = StaticPopupDialogs["InFlightToText"] or {
text = "Enter your 'to' text.",
button1 = ACCEPT, button2 = CANCEL,
hasEditBox = 1, maxLetters = 12,
OnAccept = function(self)
db.totext = strtrim(self.editBox:GetText())
InFlight:UpdateLook()
end,
 
OnShow = function(self)
self.editBox:SetText(db.totext)
self.editBox:SetFocus()
end,
 
OnHide = function(self)
self.editBox:SetText("")
end,
 
EditBoxOnEnterPressed = function(self)
local parent = self:GetParent()
db.totext = strtrim(parent.editBox:GetText())
parent:Hide()
InFlight:UpdateLook()
end,
 
EditBoxOnEscapePressed = function(self)
self:GetParent():Hide()
end,
 
timeout = 0, exclusive = 1, whileDead = 1, hideOnEscape = 1,
}
StaticPopup_Show("InFlightToText")
elseif (k == "less" or k == "more") and lastb then
local off = (k == "less" and -8) or 8
if offsetvalue == value then
offsetcount = offsetcount + off
else
offsetvalue, offsetcount = value, off
end
 
local tb = _G[gsub(lastb:GetName(), "ExpandArrow", "")]
CloseDropDownMenus(b:GetParent():GetID())
ToggleDropDownMenu(b:GetParent():GetID(), tb.value, nil, nil, nil, nil, tb.menuList, tb)
elseif k == "resetoptions" then
self.db:ResetProfile()
if self.db:GetCurrentProfile() ~= "Default" then
db.perchar = true
end
elseif k == "resettimes" then
InFlightDB.dbinit = nil
InFlightDB.global = {}
ReloadUI()
end
end
 
local function Set(b, k)
if not k then
return
end
 
db[k] = not db[k]
if k == "perchar" then
local charKey = UnitName("player").." - "..GetRealmName()
if db[k] then
db[k] = false
self.db:SetProfile(charKey)
self.db:CopyProfile("Default")
db = self.db.profile
db[k] = true
else
self.db:SetProfile("Default")
db = self.db.profile
self.db:DeleteProfile(charKey)
end
end
 
InFlight:UpdateLook()
end
 
local function SetSelect(b, a1)
db[a1] = tonumber(b.value) or b.value
local level, num = strmatch(b:GetName(), "DropDownList(%d+)Button(%d+)")
level, num = tonumber(level) or 0, tonumber(num) or 0
for i = 1, UIDROPDOWNMENU_MAXBUTTONS, 1 do
local b = _G["DropDownList"..level.."Button"..i.."Check"]
if b then
b[i == num and "Show" or "Hide"](b)
end
end
 
InFlight:UpdateLook()
end
 
local function SetColor(a1)
local dbc = db[UIDROPDOWNMENU_MENU_VALUE]
if not dbc then
return
end
 
if a1 then
local pv = ColorPickerFrame.previousValues
dbc.r, dbc.g, dbc.b, dbc.a = pv.r, pv.g, pv.b, 1 - pv.opacity
else
dbc.r, dbc.g, dbc.b = ColorPickerFrame:GetColorRGB()
dbc.a = 1 - OpacitySliderFrame:GetValue()
end
 
InFlight:UpdateLook()
end
 
local function AddButton(lvl, text, keepshown)
info.text = text
info.keepShownOnClick = keepshown
UIDropDownMenu_AddButton(info, lvl)
wipe(info)
end
 
local function AddToggle(lvl, text, value)
info.arg1 = value
info.func = Set
info.checked = db[value]
info.isNotRadio = true
AddButton(lvl, text, true)
end
 
local function AddExecute(lvl, text, arg1, arg2)
info.arg1 = arg1
info.arg2 = arg2
info.func = Exec
info.notCheckable = 1
AddButton(lvl, text, true)
end
 
local function AddColor(lvl, text, value)
local dbc = db[value]
if not dbc then
return
end
 
info.hasColorSwatch = true
info.padding = 5
info.hasOpacity = 1
info.r, info.g, info.b, info.opacity = dbc.r, dbc.g, dbc.b, 1 - dbc.a
info.swatchFunc, info.opacityFunc, info.cancelFunc = SetColor, SetColor, SetColor
info.value = value
info.notCheckable = 1
info.func = UIDropDownMenuButton_OpenColorPicker
AddButton(lvl, text)
end
 
local function AddList(lvl, text, value)
info.value = value
info.hasArrow = true
info.notCheckable = 1
AddButton(lvl, text, true)
end
 
local function AddSelect(lvl, text, arg1, value)
info.arg1 = arg1
info.func = SetSelect
info.value = value
if tonumber(value) and tonumber(db[arg1] or "blah") then
if floor(100 * tonumber(value)) == floor(100 * tonumber(db[arg1])) then
info.checked = true
end
else
info.checked = (db[arg1] == value)
end
 
AddButton(lvl, text, true)
end
 
local function AddFakeSlider(lvl, value, minv, maxv, step, tbl)
local cvalue = 0
local dbv = db[value]
if type(dbv) == "string" and tbl then
for i, v in ipairs(tbl) do
if dbv == v then
cvalue = i
break
end
end
else
cvalue = dbv or ((maxv - minv) / 2)
end
 
local adj = (offsetvalue == value and offsetcount) or 0
local starti = max(minv, cvalue - (7 - adj) * step)
local endi = min(maxv, cvalue + (8 + adj) * step)
if starti == minv then
endi = min(maxv, starti + 16 * step)
elseif endi == maxv then
starti = max(minv, endi - 16 * step)
end
 
if starti > minv then
AddExecute(lvl, "--", "less", value)
end
 
if tbl then
for i = starti, endi, step do
AddSelect(lvl, tbl[i], value, tbl[i])
end
else
local fstring = (step >= 1 and "%d") or (step >= 0.1 and "%.1f") or "%.2f"
for i = starti, endi, step do
AddSelect(lvl, format(fstring, i), value, i)
end
end
 
if endi < maxv then
AddExecute(lvl, "++", "more", value)
end
end
 
InFlightDD.initialize = function(self, lvl)
if lvl == 1 then
info.isTitle = true
info.notCheckable = 1
AddButton(lvl, "|cff0040ffIn|cff00aaffFlight|r")
AddList(lvl, L["BarOptions"], "frame")
AddList(lvl, L["TextOptions"], "text")
AddList(lvl, _G.OTHER, "other")
elseif lvl == 2 then
local sub = UIDROPDOWNMENU_MENU_VALUE
if sub == "frame" then
AddToggle(lvl, L["CountUp"], "countup")
AddToggle(lvl, L["FillUp"], "fill")
AddToggle(lvl, L["ShowSpark"], "spark")
AddList(lvl, L["Height"], "height")
AddList(lvl, L["Width"], "width")
AddList(lvl, L["Texture"], "texture")
AddList(lvl, L["Border"], "border")
AddColor(lvl, L["BackgroundColor"], "backcolor")
AddColor(lvl, L["BarColor"], "barcolor")
AddColor(lvl, L["UnknownColor"], "unknowncolor")
AddColor(lvl, L["BorderColor"], "bordercolor")
elseif sub == "text" then
AddToggle(lvl, L["CompactMode"], "inline")
AddExecute(lvl, L["ToText"], "totext")
AddList(lvl, L["Font"], "font")
AddList(lvl, _G.FONT_SIZE, "fontsize")
AddColor(lvl, L["FontColor"], "fontcolor")
AddToggle(lvl, L["OutlineInfo"], "outline")
AddToggle(lvl, L["OutlineTime"], "outlinetime")
elseif sub == "other" then
AddToggle(lvl, L["ShowChat"], "chatlog")
AddToggle(lvl, L["ConfirmFlight"], "confirmflight")
AddToggle(lvl, L["PerCharOptions"], "perchar")
AddExecute(lvl, L["ResetOptions"], "resetoptions")
AddExecute(lvl, L["ResetFlightTimes"], "resettimes")
end
elseif lvl == 3 then
local sub = UIDROPDOWNMENU_MENU_VALUE
if sub == "texture" or sub == "border" or sub == "font" then
local t = smed:List(sub == "texture" and "statusbar" or sub)
AddFakeSlider(lvl, sub, 1, #t, 1, t)
elseif sub == "width" then
AddFakeSlider(lvl, sub, 40, 500, 5)
elseif sub == "height" then
AddFakeSlider(lvl, sub, 4, 100, 1)
elseif sub == "fontsize" then
AddFakeSlider(lvl, sub, 4, 30, 1)
end
end
end
end
 
ToggleDropDownMenu(1, nil, InFlightDD, "cursor")
end
 
if debug then
 
function inflightupdate(updateExistingTimes)
local updates = {}
local ownData = false
if #updates == 0 then
updates[1] = InFlightDB.global
ownData = true
end
local defaults = self.defaults.global
for _, flightPaths in ipairs(updates) do
 
-- Set updateExistingTimes to true to update and add new times (for updates based
-- on the current default db)
-- Set updateExistingTimes to false to only add new unknown times (use for updates
-- not based on current default db to avoid re-adding old/incorrect times)
if updateExistingTimes == nil then
updateExistingTimes = ownData
end
 
for faction, t in pairs(flightPaths) do
if faction == "Horde" or faction == "Alliance" then
local found = false
local updated, added = 0, 0
for src, dt in pairs(t) do
if not defaults[faction][src] then
defaults[faction][src] = {}
PrintD(faction, "|cff208080New source:|r", src)
end
 
for dst, utime in pairs(dt) do
if src ~= dst and type(utime) == "number" then
local vtime = defaults[faction][src][dst]
if utime >= 5 and (not vtime or ownData or vtime - utime >= 5) then
if vtime then
if updateExistingTimes and defaults[faction][src][dst] ~= utime then
defaults[faction][src][dst] = utime
found = true
updated = updated + 1
PrintD(faction, "|cff208020Update time:|r", src, "|cff208020-->|r", dst, "|cff208020- old:|r", vtime, "|cff208020new:|r", utime)
end
else
defaults[faction][src][dst] = utime
found = true
added = added + 1
PrintD(faction, "|cff208080New time:|r", src, "|cff208020-->|r", dst, "|cff208020- new:|r", utime)
end
end
end
end
end
 
if found then
PrintD(faction, "|cff208020-|r", updated, "|cff208020updated times.|r")
PrintD(faction, "|cff208020-|r", added, "|cff208080new times.|r")
else
PrintD(faction, "|cff208020-|r No time updates found.")
end
else
defaults[faction] = nil
Print("Unknown faction removed:", faction)
end
end
 
InFlightDB.defaults = defaults
end
end
 
end -- debug
tags/1.13.005_Classic Property changes : Added: svn:mergeinfo Merged /trunk:r118-136