-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathCredits.lua
72 lines (66 loc) · 2.9 KB
/
Credits.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
-- [[ Namespaces ]] --
local _, addon = ...;
addon.Credits = {};
local credits = addon.Credits;
local specialThanks = {
{Name = "Bur", Realm = "Frostmane EU", Class = "DRUID", Text = "Continuous support and helpful input and answers on questions that make this addon better; It wouldn't be as good without you :)"},
}
function credits.GetSpecialThanksAsTable()
local texts, text = {}, "";
for _, specialTnx in next, specialThanks do
local argbHex = specialTnx.Class ~= "" and select(4, GetClassColor(specialTnx.Class)) or "FFC0C0C0";
text = "|c" .. argbHex .. specialTnx.Name .. "|r";
if specialTnx.Realm then
text = text .. " - " .. specialTnx.Realm;
end
if specialTnx.Text then
text = text .. " - " .. specialTnx.Text;
end
tinsert(texts, text);
end
return texts;
end
local donations = {
{Name = "Bur", Realm = "Frostmane EU", Class = "DRUID"},
{Name = "Ta", Realm = "Der Rat von Dalaran EU", Class = "SHAMAN"},
{Name = "Estellar", Realm = "Bronze Dragonflight EU", Class = "PALADIN"},
{Name = "Seby", Realm = "TwistingNether EU", Class = "HUNTER"},
{Name = "Swiftstrider (mains everything)", Realm = "Frostmourne NA", Class = ""},
{Name = "Orderic", Realm = "Gul'dan EU", Class = "WARLOCK"},
{Name = "Ilyxiana", Realm = "Ravencrest EU", Class = "PALADIN"},
{Name = "Shizleh", Realm = "Eredar EU", Class = "WARLOCK"},
}
function credits.GetDonationsAsTable()
local texts, text = {}, "";
for _, donation in next, donations do
local argbHex = donation.Class ~= "" and select(4, GetClassColor(donation.Class)) or "FFC0C0C0";
text = "|c" .. argbHex .. donation.Name .. "|r";
if donation.Realm then
text = text .. " - " .. donation.Realm;
end
tinsert(texts, text);
end
return texts;
end
local localizations = {
{Name = "Ta", Realm = "Der Rat von Dalaran EU", Class = "SHAMAN", Language = "German"},
{Name = "牛奶斩", Realm = "格瑞姆巴托 CN", Class = "DRUID", Language = "Chinese (Simplified)"},
{Name = "Astiraïs", Realm = "Elune EU", Class = "MAGE", Language = "French"},
{Name = "Griboo", Realm = "Hyjal EU", Class = "HUNTER", Language = "French"},
{Name = "Морфей", Realm = "Борейская тундра RU", Class = "WARLOCK", Language = "Russian"},
}
function credits.GetLocalizationsAsTable()
local texts, text = {}, "";
for _, localization in next, localizations do
local argbHex = localization.Class ~= "" and select(4, GetClassColor(localization.Class)) or "FFC0C0C0";
text = "|c" .. argbHex .. localization.Name .. "|r";
if localization.Realm then
text = text .. " - " .. localization.Realm;
end
if localization.Language then
text = text .. " - " .. localization.Language;
end
tinsert(texts, text);
end
return texts;
end