private void LocalCharacterControl_UpdateInteractionHook(On.LocalCharacterControl.orig_UpdateInteraction orig, LocalCharacterControl localCharCtrl) { orig(localCharCtrl); // Do nothing if input is locked if (localCharCtrl.InputLocked) { return; } int playerID = localCharCtrl.Character.OwnerPlayerSys.PlayerID; string charID = localCharCtrl.Character.UID; var quickSlotMngr = localCharCtrl.Character.QuickSlotMngr; // AnyQuickSlotUsed checks if a quickslot is being activated bool quickSlotActivated = AnyQuickSlotUsed(playerID); // Uses the name string argument from CustomKeybindings.AddAction() // If a quickslot is NOT being used... if (!quickSlotActivated) { // ...and you actually press the button assigned to "switch quick slot bars... if (CustomKeybindings.m_playerInputManager[playerID].GetButtonDown("Switch Quick Slot Bars")) { Debug.Log("localCharacterControl character = " + localCharCtrl.Character.UID + " | " + localCharCtrl.Character.Name); // If the current BarMode is FIRST... if (charCurrentBarMode[charID] == BarMode.FIRST) { if (dev) { Debug.Log("Switching to SECOND skill bar"); } // Set barMode to SECOND charCurrentBarMode[charID] = BarMode.SECOND; // And repopulate the default-behaviour skill bar w/ entries from quickSlots2[] PopulateSkillBar(localCharCtrl.Character); } // Else if the current BarMode is SECOND... else if (charCurrentBarMode[charID] == BarMode.SECOND) { if (dev) { Debug.Log("Switching to FIRST skill bar"); } // Set barMode to FIRST charCurrentBarMode[charID] = BarMode.FIRST; // And repopulate the default-behaviour skill bar w/ entries from quickSlots1[] PopulateSkillBar(localCharCtrl.Character); } } } }
public void LocalCharacterControl_UpdateInteraction(On.LocalCharacterControl.orig_UpdateInteraction orig, LocalCharacterControl self) { orig(self); if (self.InputLocked) { return; } var localplayerID = self.Character.OwnerPlayerSys.PlayerID; if (CustomKeybindings.m_playerInputManager[localplayerID].GetButtonUp(AggroToggleKey)) { EnemiesAggressive = !EnemiesAggressive; } }