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

Fix clearing timeouts after auto teleport #3874

Merged
merged 2 commits into from
Aug 17, 2024
Merged

Fix clearing timeouts after auto teleport #3874

merged 2 commits into from
Aug 17, 2024

Conversation

maikelvf
Copy link
Contributor

@maikelvf maikelvf commented Aug 16, 2024

Openkore sets $ai_v{temp}{clear_aiQueue} =1 when doing any form of auto teleporting. This flag in turn clears the entire ai on map change, among which %ai_v. %ai_v contains timeouts for any item, skill or command block from config.txt. If these get cleared, Openkore uses every item or skill that only has a timeout after every auto teleport. This fix still clears the ai, but keeps any timeouts in %ai_v so Openkore doesn't spam skills or items after every auto teleport.

@alisonrag
Copy link
Contributor

did u checked if there is any other important key being deleted?
maybe revert this pull too https://github.com/OpenKore/openkore/pull/3191/files?

@maikelvf
Copy link
Contributor Author

Right now on master $ai_v just gets deleted entirely, i've only excluded any key that ends with '_time'. So far while looking through the source code and while testing i have not encountered any other key that ends with '_time' that should be deleted and is now excluded. Even if there were, i don't think it would have any implications if that doesn't get deleted on teleport.

I'm fine with reverting the PR that you linked, but you probably did that for a reason right? This way at least we're clearing anything that is not a timeout.

@alisonrag
Copy link
Contributor

alisonrag commented Aug 17, 2024

i just did thinking that it was the best at that time, but now i know that sometimes is better keep tracking.
just remove the undef %ai_v; from AI::clear and i will approve

@maikelvf
Copy link
Contributor Author

@alisonrag Done

@alisonrag alisonrag merged commit 726a805 into OpenKore:master Aug 17, 2024
9 checks passed
@maikelvf maikelvf deleted the keep_timeouts_on_auto_teleport branch August 17, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants