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 #205

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

Conversation

charles-m-knox
Copy link
Contributor

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

NPC chat messages and health bars (and possibly other things) currently seem to only show on the first NPC in the client's list of tracked NPC's within player view. This PR fixes that:

  • Updates NPC update packet handling to include a new worldIndex byte pair

Because this changes the packet structure, older clients won't work after this change if they're using the my code in runejs/server#433.

Code quality note: If there are any suggestions on a good way to refactor the lines of code that I repeated multiple times in src/main/java/org/runejs/client/media/renderable/actor/Npc.java, please feel free to suggest it.

See accompanying PR for the client: runejs/server#433


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 marked this pull request as ready for review September 4, 2024 04:14
@charles-m-knox charles-m-knox force-pushed the worldindex-npc-update-packet-announce branch 2 times, most recently from 0159ac2 to 91960c3 Compare September 4, 2024 04:53
@Promises
Copy link
Collaborator

Promises commented Sep 4, 2024

@charles-m-knox yeah updating the prebuild might be a good idea :D

@charles-m-knox
Copy link
Contributor Author

charles-m-knox commented Sep 4, 2024

@charles-m-knox yeah updating the prebuild might be a good idea :D

As discussed in Discord, I've added a commit to update the readme and removed the prebuilt dir in favor of using releases with attached jar files. This PR is all good from my end 👍 This will be addressed elsewhere since I've now updated this PR to only be concerned with the packet change.

@charles-m-knox charles-m-knox force-pushed the worldindex-npc-update-packet-announce branch from e612fcc to 9b38f2e Compare September 7, 2024 00:22
@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.

2 participants