revisit Race Table
This commit is contained in:
+15
-14
@@ -7,10 +7,9 @@ local L = WeakAuras.L;
|
|||||||
|
|
||||||
local LSM = LibStub("LibSharedMedia-3.0");
|
local LSM = LibStub("LibSharedMedia-3.0");
|
||||||
|
|
||||||
local wipe, tinsert = wipe, tinsert
|
local wipe = wipe
|
||||||
local GetNumShapeshiftForms, GetShapeshiftFormInfo = GetNumShapeshiftForms, GetShapeshiftFormInfo
|
local GetNumShapeshiftForms, GetShapeshiftFormInfo = GetNumShapeshiftForms, GetShapeshiftFormInfo
|
||||||
local WrapTextInColorCode = WrapTextInColorCode
|
local WrapTextInColorCode = WrapTextInColorCode
|
||||||
local MAX_NUM_TALENTS = MAX_NUM_TALENTS or 40
|
|
||||||
|
|
||||||
local function WA_GetClassColor(classFilename)
|
local function WA_GetClassColor(classFilename)
|
||||||
local color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[classFilename]
|
local color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[classFilename]
|
||||||
@@ -1237,19 +1236,21 @@ if WeakAuras.IsClassicPlusOrTBC() then
|
|||||||
WeakAuras.class_types["DEATHKNIGHT"] = nil
|
WeakAuras.class_types["DEATHKNIGHT"] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
-- missing localisation
|
-- Extract Race names from faction IDs
|
||||||
WeakAuras.race_types = {
|
WeakAuras.race_types = {}
|
||||||
Human = "Human",
|
local ids = {
|
||||||
Orc = "Orc",
|
[1]="Human", [2]="Orc", [3]="Dwarf", [4]="Night Elf", [5]="Undead",
|
||||||
Dwarf = "Dwarf",
|
[6]="Tauren", [8]="Gnome", [9]="Troll", [914]="BloodElf", [927]="Draenei",
|
||||||
NightElf = "Night Elf",
|
|
||||||
Scourge = "Undead",
|
|
||||||
Tauren = "Tauren",
|
|
||||||
Gnome = "Gnome",
|
|
||||||
Troll = "Troll",
|
|
||||||
BloodElf = "Blood Elf",
|
|
||||||
Draenei = "Draenei",
|
|
||||||
}
|
}
|
||||||
|
for id, key in pairs(ids) do
|
||||||
|
local raw = GetFactionInfoByID(id)
|
||||||
|
local name = type(raw) == "string"
|
||||||
|
and (raw:match("^[^,:]*[,:](.+)$") or raw)
|
||||||
|
:match("^%s*(.-)%s*$")
|
||||||
|
or key
|
||||||
|
WeakAuras.race_types[key] = (name == "" and key) or name
|
||||||
|
end
|
||||||
|
ids = nil
|
||||||
|
|
||||||
Private.faction_group = {
|
Private.faction_group = {
|
||||||
Alliance = L["Alliance"],
|
Alliance = L["Alliance"],
|
||||||
|
|||||||
Reference in New Issue
Block a user