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

Move Jailer of Faith QM every 30 minutes #4552

Closed

Conversation

lapislosh
Copy link
Contributor

@lapislosh lapislosh commented Sep 26, 2023

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Moves the Jailer of Faith QM exactly every 30 minutes from when it lasts appears. The original implementation is completely broken, as mentioned in #3632. There is some slight contention on whether it moves every 30 minutes or 15 minutes, but as best as I can tell it was either updated in a patch to 30 minutes, or people are confusing the generic 15m (at the time) respawn on QMs vs the 30m move timer.

The code mimics Phantom Worm's movement code but requires some extra logic to track the case where JoF may pop and die before the timer triggers, requiring the timer to be reset (which is not particularly easy and instead I opted to just start a second timer and ignore the initial timer when it triggers). Phantom Worm conveniently ignores this problem because the move timer is so short it's not really noticeable.

I did not update Ix'Drk but if this PR goes through I can give it similar treatment.

Steps to test these changes

5 locations for pop:
-- North / Hume tower !pos -420 0 -157 35
-- NE / Elvaan tower !pos -157 0 -340 35
-- SE / Galka tower !pos -260 0 -643 35
-- SW / Tarutaru tower !pos -580 0 -644 35
-- NW / Mithra tower !pos -683 0 -340 35

!additem 1899 for HQ euvhi organ

  1. Find ??? and wait for it to hide
  2. Wait 60s then find ??? in new location
  3. Wait for it to hide again exactly 30m after it re-appeared (test default move logic)
  4. Spawn Jailer of Faith and kill before the 30m timer triggers (test timer overlap code)
  5. Make sure the QM moves exactly 30m from when the QM reappears after killing him
  6. Spawn Jailer of Faith, and hold it for 30 minutes, then kill it (test timer cancel code)
  7. Make sure the QM moves exactly 30m from when the QM reappears after killing him
    It's much easier to test by changing the timer to 30 seconds!

Copy link
Contributor

@zach2good zach2good left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

Is it known what happens during server restart on retail? Whether or not the previously chosen point persists, or if its rerolled?

@lapislosh
Copy link
Contributor Author

LGTM 🚀

Is it known what happens during server restart on retail? Whether or not the previously chosen point persists, or if its rerolled?

Unknown afaik, however we don't currently persist any of the randomization in Sea. Faith, Temperance, Ix'Drg, Ix'Drk, and Fortitude are all randomized on zone initialization

@lapislosh
Copy link
Contributor Author

Sorry, still learning but just found out there's a clearTimerQueue function which I can use instead of tracking the number of timers running, so I'd like to switch to that and simplify the code a bit before submitting.

@lapislosh lapislosh closed this Sep 28, 2023
@lapislosh lapislosh deleted the jailer_of_faith_qm_movement branch December 23, 2023 02:34
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.

3 participants