Revisit Faction Reputation
GetFactionInfoByID(id) now provides localized faction names directly from the client, making external localization or libraries like LibBabble-Faction unnecessary. This is the first implementation that i ever saw to fully eliminate LibBabble-Faction dependency, simplifying the codebase by a ton. It seems that Creature Type and Familys are saved also inside that function, making this function really powerful, im going to take a look at that too for sure. Race Localisation we also take already out of this function.
This commit is contained in:
+14
-78
@@ -3751,84 +3751,20 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
Private.faction_to_id = {
|
||||
[L["Booty Bay"]] = 21,
|
||||
[L["Ironforge"]] = 47,
|
||||
[L["Gnomeregan Exiles"]] = 54,
|
||||
[L["Thorium Brotherhood"]] = 59,
|
||||
[L["Horde"]] = 67,
|
||||
[L["Undercity"]] = 68,
|
||||
[L["Darnassus"]] = 69,
|
||||
[L["Syndicate"]] = 70,
|
||||
[L["Stormwind"]] = 72,
|
||||
[L["Orgrimmar"]] = 76,
|
||||
[L["Thunder Bluff"]] = 81,
|
||||
[L["Bloodsail Buccaneers"]] = 87,
|
||||
[L["Gelkis Clan Centaur"]] = 92,
|
||||
[L["Magram Clan Centaur"]] = 93,
|
||||
[L["Zandalar Tribe"]] = 270,
|
||||
[L["Ravenholdt"]] = 349,
|
||||
[L["Gadgetzan"]] = 369,
|
||||
[L["Alliance"]] = 469,
|
||||
[L["Ratchet"]] = 470,
|
||||
[L["The League of Arathor"]] = 509,
|
||||
[L["The Defilers"]] = 510,
|
||||
[L["Argent Dawn"]] = 529,
|
||||
[L["Darkspear Trolls"]] = 530,
|
||||
[L["Timbermaw Hold"]] = 576,
|
||||
[L["Everlook"]] = 577,
|
||||
[L["Wintersaber Trainers"]] = 589,
|
||||
[L["Cenarion Circle"]] = 609,
|
||||
[L["Frostwolf Clan"]] = 729,
|
||||
[L["Stormpike Guard"]] = 730,
|
||||
[L["Hydraxian Waterlords"]] = 749,
|
||||
[L["Shen'dralar"]] = 809,
|
||||
[L["Warsong Outriders"]] = 889,
|
||||
[L["Silverwing Sentinels"]] = 890,
|
||||
[L["Darkmoon Faire"]] = 909,
|
||||
[L["Brood of Nozdormu"]] = 910,
|
||||
[L["Silvermoon City"]] = 911,
|
||||
[L["Tranquillien"]] = 922,
|
||||
[L["Exodar"]] = 930,
|
||||
[L["The Aldor"]] = 932,
|
||||
[L["The Consortium"]] = 933,
|
||||
[L["The Scryers"]] = 934,
|
||||
[L["The Sha'tar"]] = 935,
|
||||
[L["The Mag'har"]] = 941,
|
||||
[L["Cenarion Expedition"]] = 942,
|
||||
[L["Honor Hold"]] = 946,
|
||||
[L["Thrallmar"]] = 947,
|
||||
[L["The Violet Eye"]] = 967,
|
||||
[L["Sporeggar"]] = 970,
|
||||
[L["Kurenai"]] = 978,
|
||||
[L["Keepers of Time"]] = 989,
|
||||
[L["The Scale of the Sands"]] = 990,
|
||||
[L["Lower City"]] = 1011,
|
||||
[L["Ashtongue Deathsworn"]] = 1012,
|
||||
[L["Netherwing"]] = 1015,
|
||||
[L["Sha'tari Skyguard"]] = 1031,
|
||||
[L["Alliance Vanguard"]] = 1037,
|
||||
[L["Ogri'la"]] = 1038,
|
||||
[L["Valiance Expedition"]] = 1050,
|
||||
[L["Horde Expedition"]] = 1052,
|
||||
[L["The Taunka"]] = 1064,
|
||||
[L["The Hand of Vengeance"]] = 1067,
|
||||
[L["Explorers' League"]] = 1068,
|
||||
[L["The Kalu'ak"]] = 1073,
|
||||
[L["Shattered Sun Offensive"]] = 1077,
|
||||
[L["Warsong Offensive"]] = 1085,
|
||||
[L["Kirin Tor"]] = 1090,
|
||||
[L["The Wyrmrest Accord"]] = 1091,
|
||||
[L["The Silver Covenant"]] = 1094,
|
||||
[L["Knights of the Ebon Blade"]] = 1098,
|
||||
[L["Frenzyheart Tribe"]] = 1104,
|
||||
[L["The Oracles"]] = 1105,
|
||||
[L["Argent Crusade"]] = 1106,
|
||||
[L["The Sons of Hodir"]] = 1119,
|
||||
[L["The Sunreavers"]] = 1124,
|
||||
[L["The Frostborn"]] = 1126,
|
||||
[L["The Ashen Verdict"]] = 1156,
|
||||
}
|
||||
Private.faction_to_id = {}
|
||||
do
|
||||
local factionIDs = {
|
||||
21, 47, 54, 59, 67, 68, 69, 70, 72, 76, 81, 87, 92, 93, 270, 349,
|
||||
369, 469, 470, 509, 510, 529, 530, 576, 577, 589, 609, 729, 730, 749,
|
||||
809, 889, 890, 909, 910, 911, 922, 930, 932, 933, 934, 935, 941, 942,
|
||||
946, 947, 967, 970, 978, 989, 990, 1011, 1012, 1015, 1031, 1037, 1038,
|
||||
1050, 1052, 1064, 1067, 1068, 1073, 1077, 1085, 1090, 1091, 1094, 1098,
|
||||
1104, 1105, 1106, 1119, 1124, 1126, 1156
|
||||
}
|
||||
for _, id in ipairs(factionIDs) do
|
||||
Private.faction_to_id[GetFactionInfoByID(id) or ""] = id
|
||||
end
|
||||
end
|
||||
|
||||
do
|
||||
local classData = {
|
||||
|
||||
Reference in New Issue
Block a user