Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action Bar does not work when you set it for first time #1000

Open
3 of 5 tasks
gesior opened this issue Dec 21, 2024 · 3 comments
Open
3 of 5 tasks

Action Bar does not work when you set it for first time #1000

gesior opened this issue Dec 21, 2024 · 3 comments
Labels
Priority: Low Minor impact Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@gesior
Copy link
Contributor

gesior commented Dec 21, 2024

Priority

Low

Area

  • Data
  • Source
  • Docker
  • Other

What happened?

When you start OTCR for first time or after clearing Windows config (%HOMEPATH%\AppData\Roaming\otcr) Action Bar hotkeys do not work.
You can add items/spells, bind hotkeys (ex. F4), but after pressing hotkey (ex. F4), it does not execute action.

I ran OTCR multiple times already, but never used Action Bar. I used it for first time and it did not work. Someone told me that I have to relog or restart client after setting first Action Bar hotkey.

If you relog or restart client, Action Bar hotkeys work fine. Problem is only on first run of OTCR without Action Bar settings, when there is no config for Action Bar 'on login'.

What OS are you seeing the problem on?

Windows

Code of Conduct

  • I agree to follow this project's Code of Conduct
@gesior gesior added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Dec 21, 2024
@github-actions github-actions bot added Priority: Low Minor impact Status: Pending Test This PR or Issue requires more testing labels Dec 21, 2024
@kokekanon
Copy link
Collaborator

kokekanon commented Dec 21, 2024

context: in commits f247211 (Jul 24, 2021) was added "Prevent executing hotkeys when windows are opened"


this modification solves this issues :
https://github.com/mehah/otclient/blob/main/modules/game_actionbar/game_actionbar.lua#L908-L916

function setActionBarVisible(visible)
    if visible then
        actionBar:setHeight(34)
-        actionBar:show()
+        actionBar:show(true)
    else
        actionBar:setHeight(0)
        actionBar:hide()
    end
end

me test :
clean cache

2024-12-21.17-26-26.mp4

this works, I don't know if this is the best solution, since there is another issue #738 associated to the same commits problem "Prevent executing hotkeys when windows are opened" .

test in windows , server 13.40

@gesior
Copy link
Contributor Author

gesior commented Dec 21, 2024

I test it on 8.6 client, but it's probably not related.
I test it with clean OTCR and with OTCR with Windows cache cleared using file system, not by clicking some option inside OTCR. Which may not really clear cache, but create 'new clear cache' (with some files existing inside OTCR folder).

I tested it on 8.6 and had this issue, I asked someone else to test it and he had same issue.

I will test it again next week and report, if it changes anything, if I use 'Clear Cache' and how 'windows cache' looks after 'clear'.

@kokekanon
Copy link
Collaborator

kokekanon commented Dec 21, 2024

I just tried deleting the %appdata%/otcr | (C:\Users\xxxxxxx\AppData\Roaming\otcr) folder and it works with the proposed modification actionBar:show(true).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Low Minor impact Status: Pending Test This PR or Issue requires more testing Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

No branches or pull requests

2 participants