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

Core/Players: moved zone and area updating from a standalone timer into Heartbeat handling #29995

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ovahlord
Copy link
Contributor

@Ovahlord Ovahlord commented May 20, 2024

Changes proposed:

  • turns out that retail and classic update their zone data on a per-heartbeat basis as well so we move the zone and area id handling over there

Tests performed:

  • tested ingame

Is is worth noting that because of this relocation of the updating, zones, areas and consequently phasing and spell_area may take a bit longer as the old zone update timer was ticking every second while the heartbeat only fires once every 5200ms or on certain movement actions.

@Shauren
Copy link
Member

Shauren commented May 21, 2024

Actually pointless code tbh (the whole periodic update)

  • area/zone is updated on every relocation (Unit::UpdatePosition)
  • because areatrigger packet now contains entered/exited bit (unlike 335), resting is handled entirely in WorldSession::HandleAreaTriggerOpcode

@Takenbacon
Copy link
Contributor

* area/zone is updated on every relocation (Unit::UpdatePosition)

It shouldn't be, the vmap calls to get the area/zone ID from a position isn't cheap

* because areatrigger packet now contains entered/exited bit (unlike 335), resting is handled entirely in WorldSession::HandleAreaTriggerOpcode

Never trust the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants