public override void Load() { LoadSkinId = (byte)Player.Instance.SkinId; IsEnabled = true; BaseSkinNames = new Dictionary <Champion, string> { [Champion.Ashe] = "Ashe", [Champion.Caitlyn] = "Caitlyn", [Champion.Corki] = "Corki", [Champion.Draven] = "Draven", [Champion.Ezreal] = "Ezreal", [Champion.Graves] = "Graves", [Champion.Jhin] = "Jhin", [Champion.Jinx] = "Jinx", [Champion.Kalista] = "Kalista", [Champion.KogMaw] = "KogMaw", [Champion.Lucian] = "Lucian", [Champion.MissFortune] = "MissFortune", [Champion.Quinn] = "Quinn", [Champion.Sivir] = "Sivir", [Champion.Tristana] = "Tristana", [Champion.Twitch] = "Twitch", [Champion.Urgot] = "Urgot", [Champion.Varus] = "Varus", [Champion.Vayne] = "Vayne" }; Chromas = new Dictionary <KeyValuePair <Champion, byte>, Dictionary <string, byte> > { { new KeyValuePair <Champion, byte>(Champion.Ezreal, 7), new Dictionary <string, byte> { { "Amethyst", 7 }, { "Meteorite", 10 }, { "Obsidian", 11 }, { "Pearl", 12 }, { "Rose", 13 }, { "Quartz", 14 }, { "Ruby", 15 }, { "Sandstone", 16 }, { "Striped", 17 } } }, { new KeyValuePair <Champion, byte>(Champion.Caitlyn, 0), new Dictionary <string, byte> { { "Default", 0 }, { "Pink", 7 }, { "Green", 8 }, { "Blue", 9 } } }, { new KeyValuePair <Champion, byte>(Champion.Lucian, 0), new Dictionary <string, byte> { { "Default", 0 }, { "Yellow", 3 }, { "Red", 4 }, { "Blue", 5 } } }, { new KeyValuePair <Champion, byte>(Champion.MissFortune, 7), new Dictionary <string, byte> { { "Amethyst", 7 }, { "Aquamarine", 11 }, { "Citrine", 12 }, { "Peridot", 13 }, { "Ruby", 14 } } }, { new KeyValuePair <Champion, byte>(Champion.Vayne, 3), new Dictionary <string, byte> { { "Default", 3 }, { "Green", 7 }, { "Red", 8 }, { "Silver", 9 } } }, { new KeyValuePair <Champion, byte>(Champion.Tristana, 6), new Dictionary <string, byte> { { "Default", 6 }, { "Navy", 7 }, { "Purple", 8 }, { "Orange", 9 } } } }; var skin = new SkinData(Player.Instance.ChampionName); Skins = skin.ToDictionary(); if (!MenuManager.ExtensionsMenu.SubMenus.Any(x => x.UniqueMenuId.Contains("Extension.SkinHack"))) { if (!MainMenu.IsOpen) { SkinHackMenu = MenuManager.ExtensionsMenu.AddSubMenu("英雄换肤", "Extension.SkinHack"); BuildMenu(); } else { MainMenu.OnClose += MainMenu_OnClose; } } else { var subMenu = MenuManager.ExtensionsMenu.SubMenus.Find(x => x.UniqueMenuId.Contains("Extension.SkinHack")); if (subMenu?["SkinId." + Player.Instance.ChampionName] == null) { return; } SkinId = subMenu["SkinId." + Player.Instance.ChampionName].Cast <ComboBox>(); ChromaId = subMenu["ChromaId." + Player.Instance.ChampionName].Cast <Slider>(); subMenu["SkinId." + Player.Instance.ChampionName].Cast <ComboBox>().OnValueChange += SkinId_OnValueChange; subMenu["ChromaId." + Player.Instance.ChampionName].Cast <Slider>().OnValueChange += ChromaId_OnValueChange; UpdateChromaSlider(SkinId.CurrentValue); if (HasChromaPack(SkinId.CurrentValue)) { ChangeSkin(SkinId.CurrentValue, ChromaId.CurrentValue); } else { ChangeSkin(SkinId.CurrentValue); } } }
public override void Load() { this.LoadSkinId = (byte)Player.Instance.SkinId; this.IsEnabled = true; this.BaseSkinNames = new Dictionary <Champion, string> { [Champion.Ahri] = "Ahri", [Champion.Akali] = "Akali", [Champion.Anivia] = "Anivia", [Champion.Ashe] = "Ashe", [Champion.Caitlyn] = "Caitlyn", [Champion.Ezreal] = "Ezreal", [Champion.Jhin] = "Jhin", [Champion.Jinx] = "Jinx", [Champion.Sivir] = "Sivir", [Champion.Syndra] = "Syndra", [Champion.Vayne] = "Vayne", [Champion.Xayah] = "Xayah", [Champion.Yasuo] = "Yasuo", [Champion.Zed] = "Zed", [Champion.Katarina] = "Katarina", [Champion.Amumu] = "Amumu", [Champion.Maokai] = "Maokai", [Champion.Riven] = "Riven", [Champion.Orianna] = "Orianna", [Champion.Rakan] = "Rakan", [Champion.Camille] = "Camille", [Champion.Kayn] = "Kayn" }; this.Chromas = new Dictionary <KeyValuePair <Champion, byte>, Dictionary <string, byte> > { { new KeyValuePair <Champion, byte>(Champion.Ahri, 2), new Dictionary <string, byte> { { "基本", 2 }, { "明星藍", 8 }, { "亮眼粉", 9 }, { "閃耀黃", 10 }, { "治艷紅", 11 }, { "少時白", 12 }, { "奢華金", 13 } } }, { new KeyValuePair <Champion, byte>(Champion.Ezreal, 7), new Dictionary <string, byte> { { "基本", 7 }, { "殞石", 10 }, { "白雪", 11 }, { "砂棕", 12 }, { "晚宴", 13 }, { "條紋", 14 }, { "艷紅", 15 }, { "薔薇", 16 }, { "鮮紫", 17 } } }, { new KeyValuePair <Champion, byte>(Champion.Yasuo, 1), new Dictionary <string, byte> { { "基本", 1 }, { "深海藍", 4 }, { "紫晶", 5 }, { "碧玉", 6 }, { "薄荷綠", 7 }, { "墨黑", 8 } } }, { new KeyValuePair <Champion, byte>(Champion.Caitlyn, 0), new Dictionary <string, byte> { { "基本", 0 }, { "粉紅", 7 }, { "青綠", 8 }, { "寶藍", 9 } } }, { new KeyValuePair <Champion, byte>(Champion.Vayne, 3), new Dictionary <string, byte> { { "基本", 3 }, { "草綠", 7 }, { "血紅", 8 }, { "水銀", 9 } } }, { new KeyValuePair <Champion, byte>(Champion.Zed, 1), new Dictionary <string, byte> { { "基本", 1 }, { "淺緋", 4 }, { "黃金", 5 }, { "藍海", 6 }, { "暗紅", 7 }, { "深紫", 8 }, { "翠綠", 9 } } }, { new KeyValuePair <Champion, byte>(Champion.Riven, 3), new Dictionary <string, byte> { { "基本", 3 }, { "琥珀", 8 }, { "銀灰", 9 }, { "茶綠", 10 }, { "星雲", 11 }, { "芙蓉", 12 }, { "赤紅", 13 }, { "絳紫", 14 }, { "湛藍", 15 } } }, { new KeyValuePair <Champion, byte>(Champion.Amumu, 8), new Dictionary <string, byte> { { "基本", 8 }, { "克雷德氣球", 9 }, { "小惡摩氣球", 10 }, { "露璐氣球", 11 }, { "飛斯氣球", 12 }, { "吶兒氣球", 13 }, { "希格斯氣球", 14 }, { "普羅氣球", 15 }, { "甜心雄氣球", 16 } } }, { new KeyValuePair <Champion, byte>(Champion.Maokai, 6), new Dictionary <string, byte> { { "基本", 6 }, { "薔薇粉", 8 }, { "珍珠白", 9 }, { "琥珀黃", 10 }, { "丹泉藍", 11 }, { "寶石藍", 12 }, { "愛心紅", 13 }, { "橄欖綠", 14 }, { "石英紫", 15 } } }, }; var skin = new SkinData(Player.Instance.ChampionName); this.Skins = skin.ToDictionary(); if (!MenuManager.SkinMenu.SubMenus.Any(x => x.UniqueMenuId.Contains("Extensions.SkinHack"))) { if (!MainMenu.IsOpen) { this.SkinHackMenu = MenuManager.SkinMenu.AddSubMenu("造型皮膚", "Extension.SkinHack"); this.BuildMenu(); } else { MainMenu.OnClose += this.MainMenu_OnClose; } } else { var subMenu = MenuManager.SkinMenu.SubMenus.Find(x => x.UniqueMenuId.Contains("Extension.SkinHack")); if (subMenu?["SkinId." + Player.Instance.ChampionName] == null) { return; } this.SkinId = subMenu["SkinId." + Player.Instance.ChampionName].Cast <ComboBox>(); this.ChromaId = subMenu["ChromaId." + Player.Instance.ChampionName].Cast <Slider>(); subMenu["SkinId." + Player.Instance.ChampionName].Cast <ComboBox>().OnValueChange += this.SkinId_OnValueChange; subMenu["ChromaId." + Player.Instance.ChampionName].Cast <Slider>().OnValueChange += this.ChromaId_OnValueChange; this.UpdateChromaSlider(this.SkinId.CurrentValue); if (this.HasChromaPack(this.SkinId.CurrentValue)) { this.ChangeSkin(this.SkinId.CurrentValue, this.ChromaId.CurrentValue); } else { this.ChangeSkin(this.SkinId.CurrentValue); } } }