// Token: 0x060020B8 RID: 8376 RVA: 0x000C12CC File Offset: 0x000BF4CC
 private void UpdateQuickSlots()
 {
     if (this.m_character != null && this.m_character.QuickSlotMngr != null)
     {
         int playerID = this.m_character.OwnerPlayerSys.PlayerID;
         if (!this.m_character.CharacterUI.IsMenuFocused)
         {
             this.m_character.QuickSlotMngr.ShowQuickSlotSection1 = ControlsInput.QuickSlotToggle1(playerID);
             this.m_character.QuickSlotMngr.ShowQuickSlotSection2 = ControlsInput.QuickSlotToggle2(playerID);
         }
         if (ControlsInput.QuickSlotInstant1(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(0);
         }
         else if (ControlsInput.QuickSlotInstant2(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(1);
         }
         else if (ControlsInput.QuickSlotInstant3(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(2);
         }
         else if (ControlsInput.QuickSlotInstant4(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(3);
         }
         else if (ControlsInput.QuickSlotInstant5(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(4);
         }
         else if (ControlsInput.QuickSlotInstant6(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(5);
         }
         else if (ControlsInput.QuickSlotInstant7(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(6);
         }
         else if (ControlsInput.QuickSlotInstant8(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(7);
         }
         else
         {
             // Loop through the 8 new slots
             for (var x = 0; x < 8; ++x)
             {
                 // See if the action for the slot is pressed
                 if (ControlsInput.QuickSlotInstantX(playerID, x + 12))
                 {
                     // If so, trigger the quick slot.
                     // The index of the slot is 1 less than it's id, as you can see above.
                     this.m_character.QuickSlotMngr.QuickSlotInput(x + 11);
                     break;
                 }
             }
         }
     }
 }
Example #2
0
 // Token: 0x060020B8 RID: 8376 RVA: 0x000C12CC File Offset: 0x000BF4CC
 private void UpdateQuickSlots()
 {
     if (this.m_character != null && this.m_character.QuickSlotMngr != null)
     {
         int playerID = this.m_character.OwnerPlayerSys.PlayerID;
         if (!this.m_character.CharacterUI.IsMenuFocused)
         {
             this.m_character.QuickSlotMngr.ShowQuickSlotSection1 = ControlsInput.QuickSlotToggle1(playerID);
             this.m_character.QuickSlotMngr.ShowQuickSlotSection2 = ControlsInput.QuickSlotToggle2(playerID);
         }
         if (ControlsInput.QuickSlotInstant1(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(0);
         }
         else if (ControlsInput.QuickSlotInstant2(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(1);
         }
         else if (ControlsInput.QuickSlotInstant3(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(2);
         }
         else if (ControlsInput.QuickSlotInstant4(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(3);
         }
         else if (ControlsInput.QuickSlotInstant5(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(4);
         }
         else if (ControlsInput.QuickSlotInstant6(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(5);
         }
         else if (ControlsInput.QuickSlotInstant7(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(6);
         }
         else if (ControlsInput.QuickSlotInstant8(playerID))
         {
             this.m_character.QuickSlotMngr.QuickSlotInput(7);
         }
     }
 }
 private bool AnyQuickSlotUsed(int playerID)
 {
     return(ControlsInput.QuickSlotInstant1(playerID) || ControlsInput.QuickSlotInstant2(playerID) || ControlsInput.QuickSlotInstant3(playerID) ||
            ControlsInput.QuickSlotInstant4(playerID) || ControlsInput.QuickSlotInstant5(playerID) || ControlsInput.QuickSlotInstant6(playerID) ||
            ControlsInput.QuickSlotInstant7(playerID) || ControlsInput.QuickSlotInstant8(playerID));
 }
Example #4
0
        public static bool UpdateQuickSlotsPrefix(LocalCharacterControl __instance)
        {
            if (__instance.Character != null && __instance.Character.QuickSlotMngr != null)
            {
                int playerID = __instance.Character.OwnerPlayerSys.PlayerID;
                if (!__instance.Character.CharacterUI.IsMenuFocused)
                {
                    __instance.Character.QuickSlotMngr.ShowQuickSlotSection1 = ControlsInput.QuickSlotToggle1(playerID);
                    __instance.Character.QuickSlotMngr.ShowQuickSlotSection2 = ControlsInput.QuickSlotToggle2(playerID);
                }

                if (m_playerInputManager[playerID].GetButtonDown("Sit_Emote"))
                {
                    __instance.Character.CastSpell(Character.SpellCastType.Sit, __instance.Character.gameObject, Character.SpellCastModifier.Immobilized, 1, -1f);
                }
                else if (m_playerInputManager[playerID].GetButtonDown("Alternate_Idle_Emote"))
                {
                    __instance.Character.CastSpell(Character.SpellCastType.IdleAlternate, __instance.Character.gameObject, Character.SpellCastModifier.Immobilized, 1, -1f);
                }
                else if (ControlsInput.QuickSlotInstant1(playerID))
                {
                    __instance.Character.QuickSlotMngr.QuickSlotInput(0);
                }
                else if (ControlsInput.QuickSlotInstant2(playerID))
                {
                    __instance.Character.QuickSlotMngr.QuickSlotInput(1);
                }
                else if (ControlsInput.QuickSlotInstant3(playerID))
                {
                    __instance.Character.QuickSlotMngr.QuickSlotInput(2);
                }
                else if (ControlsInput.QuickSlotInstant4(playerID))
                {
                    __instance.Character.QuickSlotMngr.QuickSlotInput(3);
                }
                else if (ControlsInput.QuickSlotInstant5(playerID))
                {
                    __instance.Character.QuickSlotMngr.QuickSlotInput(4);
                }
                else if (ControlsInput.QuickSlotInstant6(playerID))
                {
                    __instance.Character.QuickSlotMngr.QuickSlotInput(5);
                }
                else if (ControlsInput.QuickSlotInstant7(playerID))
                {
                    __instance.Character.QuickSlotMngr.QuickSlotInput(6);
                }
                else if (ControlsInput.QuickSlotInstant8(playerID))
                {
                    __instance.Character.QuickSlotMngr.QuickSlotInput(7);
                }
                else
                {
                    //Debug.Log("ExtendedQuickslots - UpdateQuickSlotsPatch() else");
                    for (var x = 0; x < ExtendedQuickslots.numSlots; ++x)
                    {
                        bool inputRecieved = m_playerInputManager[playerID].GetButtonDown(string.Format("QS_Instant{0}", x + 12));
                        //Debug.Log(string.Format("Checking QS_Instant{0}: {1}", x+12, inputRecieved));
                        if (inputRecieved)
                        {
                            Debug.Log("ExtendedQuickslots - UpdateQuickSlotsPatch() QS_Instant" + (x + 12));
                            __instance.Character.QuickSlotMngr.QuickSlotInput(x + 11);
                            break;
                        }
                    }
                }
            }
            return(false);
        }