improved RunRate handling for players - #2417
Merged
Merged
Conversation
LtRipley36706
approved these changes
Nov 15, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
this PR builds on top of #2415
key scenario: if i cast Slowness on another player who is running, that player's RunRate should be affected immediately on both the server and client
currently in master, the player will continue to run at the same speed, until they release/re-press a movement key on their client
some temporary developer debug commands have been added to help test this, /fast and /slow, which invisibly cast QuicknessSelf8 and SlownessSelf8, respectively. The /dispel command is also useful.
Other scenarios handled: any spells which affect quickness/run/strength, and the player raising their quickness/run/strength while running/sidestepping
The previous Exhaustion detection system has been updated with this, and hooks have been added for both the player going into and out of stamina==0. The exact behavior for stamina in retail when exhausted/burdened needs to be confirmed.
Update: it appears retail had the runrate update hooks for spells which affected quickness/run/strength, and for 'exhaustion start', but it was missing the automatic hooks for 'exhaustion done' and player clicking button to raise quickness/run/strength attributes/skills while running.
The server now defaults to retail runrate hooks by default (spells and exhaustion start), and a custom server option 'runrate_add_hooks' can be enabled if the server operators wants to add the missing events.