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

Add NPC worldIndex to NPC update packets #433

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

charles-m-knox
Copy link
Contributor

@charles-m-knox charles-m-knox commented Sep 4, 2024

Adds 2 bytes (1 short) to the npc update packet that includes the worldIndex of the npc.

This is (currently) necessary because the client seems to typically be unable to stay synchronized (specifically, npc order) with the server's tracked NPC list.

The existing npc update packet does not include any bytes of data to indicate which npc should be updated.

Since order isn't preserved, the packet gets processed by the client and it applies the changes incrementally to whatever NPCs it's tracking in its own order.

See accompanying PR for the client: runejs/refactored-client-435#205


edit: previously I coupled a few other changes into this PR, but since this is probably an (understandably) undesirable change, I'm going to remove the other changes into other future PRs

@charles-m-knox charles-m-knox force-pushed the worldindex-npc-update-packet-announce branch from f24e4d7 to dc93764 Compare September 7, 2024 00:14
@charles-m-knox charles-m-knox changed the title Fix NPC chat, HP bars, and other NPC updates Add NPC worldIndex to NPC update packets Sep 7, 2024
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.

1 participant