-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Combat-Skills increasing too fast on grey mobs due to integer underflow #29983
Comments
AC fixed this in azerothcore/azerothcore-wotlk@f75aceb |
we don't really care about trashzerothcore and also this is not a big issue, if you ask me seems much more logically that the skill increase more on gray-level mobs that the other since their level is close to yours, and you also did not provide any proof. |
That's wrong, green-level mobs are closer to the player than gray-level mobs. Also in general the chance decreases the lower the mob-level is ( Some example calculation: Assume a level 60 player, a mob that is 1 level below gray-level, and the player is at 295/300 skill.
This is not the right place for childish insults.
In my opinion it is obvious from the code and the changes made in 60311e0, that the underflow is an unintended side-effect that was simply overlooked at that time (I don't blame them). But if you want more proof, I can give the same source as the issue that introduced the underflow: |
Description
Due to 60311e0 an underflow can occur here:
TrinityCore/src/server/game/Entities/Player/Player.cpp
Line 5783 in 400aef3
Player::UpdateCombatSkills
method. Before it was certain thatmoblevel >= greylevel
, but now this isn't the case. Ifgreylevel > moblevel
, thenmoblevel - greylevel
will be negative, butlvldif
is unsigned, so it wraps around, resulting in a very high chance to increase the combat-skill.Expected behaviour
Combat skills should have a low/moderate chance to increase when fighting grey mobs.
Steps to reproduce the problem
Branch
3.3.5
TC rev. hash/commit
83c403c
Operating system
Windows 11 x64
Custom changes
None
The text was updated successfully, but these errors were encountered: