private WoWVersionManager() { var vanilla = new WoWVersion() { Identity = 112, Name = "WoW 1.12.1", Version = "1.12.1", NumLocales = 8 }; var tbc = new WoWVersion() { Identity = 243, Name = "WoW 2.4.3", Version = "2.4.3", NumLocales = 15 }; // 3.3.5a actually has 15 locales and 1 flag but we load it like this for legacy backwards compatibility var wotlk = new WoWVersion() { Identity = 335, Name = "WoW 3.3.5a 12340", Version = DefaultVersionString, NumLocales = 9 }; var vanillaLookups = GenerateKeyResource(vanilla); var tbcLookups = GenerateKeyResource(tbc); var wotlkLookups = GenerateKeyResource(wotlk); _VersionList.Add(vanilla); _VersionList.Add(tbc); _VersionList.Add(wotlk); _KeyResourceLookup.Add(vanilla, vanillaLookups); _KeyResourceLookup.Add(tbc, tbcLookups); _KeyResourceLookup.Add(wotlk, wotlkLookups); }
private KeyResource GenerateKeyResource(WoWVersion version) { switch (version.Identity) { case 112: return(new KeyResource(new string[] { "PrecastKit", "CastKit", "ImpactKit", "StateKit", "StateDoneKit", "ChannelKit", }, new string[] { "HeadEffect", "ChestEffect", "BaseEffect", "LeftHandEffect", "RightHandEffect", "BreathEffect", "LeftWeaponEffect", "RightWeaponEffect" })); case 243: return(new KeyResource(new string[] { "PrecastKit", "CastKit", "ImpactKit", "StateKit", "StateDoneKit", "ChannelKit", }, new string[] { "HeadEffect", "ChestEffect", "BaseEffect", "LeftHandEffect", "RightHandEffect", "BreathEffect", "LeftWeaponEffect", "RightWeaponEffect" })); case 335: return(new KeyResource(new string[] { "PrecastKit", "CastKit", "ImpactKit", "StateKit", "StateDoneKit", "ChannelKit", "InstantAreaKit", "ImpactAreaKit" }, new string[] { "HeadEffect", "ChestEffect", "BaseEffect", "LeftHandEffect", "RightHandEffect", "BreathEffect", "LeftWeaponEffect", "RightWeaponEffect" })); default: throw new Exception($"Unknown version identity [{version.Identity}] generating WoWVersionManager.KeyResource"); } }
public KeyResource LookupKeyResource(WoWVersion version) => _KeyResourceLookup[version];