-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix(Scripts/Hyjal): Fix hyjal trash #21194
base: master
Are you sure you want to change the base?
Conversation
src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
Outdated
Show resolved
Hide resolved
src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
Show resolved
Hide resolved
src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/instance_hyjal.cpp
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find any flaws with the logic 👍 I feel it should work as expected
Others have commented on formatting. I found the "Hide whitespace" button makes this much easier to review.
The original case labels are preferred https://www.azerothcore.org/wiki/cpp-code-standards
switch (spells)
{
case SPELL_1:
Could you revert the case indents and consider the other comment I left?
case NPC_WINTERCHILL: | ||
_initialWaves = false; | ||
ResetWaves(); | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you extracted and created void ResetWaves()
to avoid duplication. This feels to me like a good place to use [[fallthrough]]
instead
break; | |
[[fallthrough]]; |
I will work on it |
I replaced the static fix with a dynamic one, that only triggers for the first wave for the first boss. Which is in my understanding Winterchill. All subsequent encounters will always apply rep gain.
Changes Proposed:
This PR proposes changes to:
Issues Addressed:
SOURCE:
The changes have been validated through:
Tests Performed:
This PR has been:
How to Test the Changes:
Two ways to tests: (Both must pass)
Start a new raid, kill the first wave (No rep gain). Play until the first boss spawns, kill it. Start next wave counter. The first wave should now provide rep.
Start a new raid, kill the first wave (No rep gain). Kill the first boss. Do no start the next wave counter. Leave the raid or restart the server. The event needs to be interrupted. Restart the server, start the new wave timer. First new wave should provide rep.
Known Issues and TODO List:
How to Test AzerothCore PRs
When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].
You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:
http://www.azerothcore.org/wiki/How-to-test-a-PR
REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).
For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.