Exemplo n.º 1
0
        public static bool Prefix(int upgradeIndex, ref PartyCharacterVM __instance)
        {
            if (!PartyManagerSettings.Settings.DisableCustomUpgradePaths && (ScreenManager.TopScreen is GauntletPartyScreen topScreen))
            {
                if (topScreen.DebugInput.IsControlDown() && topScreen.DebugInput.IsShiftDown())
                {
                    PartyController.ToggleUpgradePath(__instance, upgradeIndex, true);
                    return(false);
                }
                else if (topScreen.DebugInput.IsControlDown())
                {
                    PartyController.ToggleUpgradePath(__instance, upgradeIndex, false);
                    return(false);
                }
                return(true);
            }

            return(true);
        }
        public static bool Prefix(int upgradeIndex, ref TaleWorlds.CampaignSystem.ViewModelCollection.PartyCharacterVM __instance)
        {
            if (ScreenManager.TopScreen is GauntletPartyScreen topScreen)
            {
                if (!PartyManagerSettings.Settings.DisableCustomUpgradePaths && topScreen.DebugInput.IsControlDown() && topScreen.DebugInput.IsShiftDown())
                {
                    PartyController.ToggleUpgradePath(__instance, upgradeIndex, true);
                    return(false);
                }
                else if (!PartyManagerSettings.Settings.DisableCustomUpgradePaths && topScreen.DebugInput.IsControlDown())
                {
                    PartyController.ToggleUpgradePath(__instance, upgradeIndex, false);
                    return(false);
                }
                else if (topScreen.DebugInput.IsAltDown())
                {
                    PartyController.CurrentInstance.UpdateBlackWhiteList(__instance, BlackWhiteListType.Upgrade);
                    return(false);
                }
                return(true);
            }

            return(true);
        }