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; } } } }
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; } } } }