Пример #1
0
        private static void AddItemstoMenu(Menu menu)
        {
            var tempMenu   = menu;
            var potionmenu = new Menu("药水", "act_potionmanager");

            PotionManager.AddtoMenusub(potionmenu);
            tempMenu.AddSubMenu(potionmenu);

            var defensivemenu = new Menu("防御用品", "act_defensiveItem");

            defensivemenu.AddSubMenu(new Menu("PUC 负面魔法", "act_debuff"));
            foreach (var buffname in BuffnamesCC)
            {
                defensivemenu.SubMenu("act_debuff").AddItem(new MenuItem("act_debuff_" + buffname, "Anti " + buffname).SetValue(true));
            }
            foreach (var buffname in BuffnamesExtendet)
            {
                defensivemenu.SubMenu("act_debuff").AddItem(new MenuItem("act_debuff_" + buffname, "Anti " + buffname).SetValue(true));
            }

            var offensivemenu = new Menu("厌恶的物品ㄧ", "act_offensiveItem");
            var onhitmenu     = new Menu("OnHit Items", "act_onhitItem");

            ItemManager.AddSupMenu(defensivemenu, offensivemenu, onhitmenu);
            tempMenu.AddSubMenu(defensivemenu);
            tempMenu.AddSubMenu(offensivemenu);
            tempMenu.AddSubMenu(onhitmenu);
        }