コード例 #1
0
        protected override void ClientItemUseStart(ClientItemData data)
        {
            var item = data.Item;

            var playerCharacter = Client.Characters.CurrentPlayerCharacter;

            if (ItemFuelRefillSystem.Instance.SharedGetCurrentActionState(playerCharacter)
                != null)
            {
                return;
            }

            ClientTryRefill(item);
            if (ItemFuelRefillSystem.Instance.SharedGetCurrentActionState(playerCharacter)
                != null)
            {
                return;
            }

            var inputKey = ClientInputManager.GetKeyForAbstractButton(
                WrappedButton <GameButton> .GetWrappedButton(GameButton.HeadEquipmentLightToggle));

            var key = inputKey != InputKey.None
                          ? inputKey.ToString()
                          : "<" + TitleButtonNotSet + ">";

            NotificationSystem.ClientShowNotification(
                string.Format(NotificationPressKeyToActivate, key),
                icon: this.Icon);
        }