示例#1
0
文件: Main.cs 项目: neil501/UAASMods
 private static void Prefix(AdmiraltyManager __instance)
 {
     if (_settings.InfRifleStock || _settings.InfRifleStockArmory)
     {
         EPickerContent epickerContent = __instance.SelectedItem.ContentType;
         if (epickerContent != EPickerContent.Cannon)
         {
             if (epickerContent == EPickerContent.Rifle)
             {
                 StoreRecord storeRecord = (__instance.SelectedItem.ContentItem as RifleItem).StoreRecord;
                 if (_settings.InfRifleStock)
                 {
                     storeRecord.Shop = 999999;
                 }
                 if (_settings.InfRifleStockArmory)
                 {
                     storeRecord.Armory = 999999;
                 }
             }
         }
         else
         {
             CannonModule cannon      = (__instance.SelectedItem.ContentItem as CannonItem).Cannon;
             StoreModule  storeCannon = PlayerController.instance.GetStoreCannon(cannon, true);
             if (_settings.InfRifleStock)
             {
                 storeCannon.Shop = 999999;
             }
             if (_settings.InfRifleStockArmory)
             {
                 storeCannon.Armory = 999999;
             }
         }
     }
 }
示例#2
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            App_Start.WebAutomapperConfig.Inicialize();

            NinjectModule storeServise  = new StoreModule();
            NinjectModule serviseModule = new ServiceModule("DefaultConnection");
            var           kernel        = new StandardKernel(storeServise, serviseModule);

            DependencyResolver.SetResolver(new NinjectDependencyResolver(kernel));
        }
示例#3
0
            private static void Prefix(AdmiraltyManager __instance)
            {
                bool flag = Main._settings.InfRifleStock || Main._settings.InfRifleStockArmory;

                if (flag)
                {
                    EPickerContent contentType = __instance.SelectedItem.ContentType;
                    bool           flag2       = contentType != EPickerContent.Cannon;
                    if (flag2)
                    {
                        bool flag3 = contentType == EPickerContent.Rifle;
                        if (flag3)
                        {
                            StoreRecord storeRecord   = (__instance.SelectedItem.ContentItem as RifleItem).StoreRecord;
                            bool        infRifleStock = Main._settings.InfRifleStock;
                            if (infRifleStock)
                            {
                                storeRecord.Shop = 999999;
                            }
                            bool infRifleStockArmory = Main._settings.InfRifleStockArmory;
                            if (infRifleStockArmory)
                            {
                                storeRecord.Armory = 999999;
                            }
                        }
                    }
                    else
                    {
                        CannonModule cannon         = (__instance.SelectedItem.ContentItem as CannonItem).Cannon;
                        StoreModule  storeCannon    = PlayerController.instance.GetStoreCannon(cannon, true);
                        bool         infRifleStock2 = Main._settings.InfRifleStock;
                        if (infRifleStock2)
                        {
                            storeCannon.Shop = 999999;
                        }
                        bool infRifleStockArmory2 = Main._settings.InfRifleStockArmory;
                        if (infRifleStockArmory2)
                        {
                            storeCannon.Armory = 999999;
                        }
                    }
                }
            }
示例#4
0
        private void StoreModuleBtn_Click(object sender, EventArgs e)
        {
            StoreModule storeModule = new StoreModule();

            storeModule.ShowDialog();
        }