Add NPC worldIndex to NPC update packets #205
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
worldIndex
byte pairBecause 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