refactor(Core/Object): getLevel() -> GetLevel() (#14122)

* refactor(Core/Object): getLevel() -> GetLevel()

* fix build and sneak some doxygen in

* codeSTLE

* codestyle
This commit is contained in:
Kitzunu 2022-12-31 17:39:23 +01:00 committed by GitHub
parent 089ce9eb41
commit 4870b14b1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 326 additions and 314 deletions

View file

@ -255,11 +255,11 @@ public:
bool OnCastItemCombatSpell(Player* /*player*/, Unit* victim, SpellInfo const* /*spellInfo*/, Item* /*item*/) override
{
// spell proc chance gets severely reduced on victims > 60 (formula unknown)
if (victim->getLevel() > 60)
if (victim->GetLevel() > 60)
{
// gives ~0.1% proc chance at lvl 70
float const lvlPenaltyFactor = 9.93f;
float const failureChance = (victim->getLevel() - 60) * lvlPenaltyFactor;
float const failureChance = (victim->GetLevel() - 60) * lvlPenaltyFactor;
// base ppm chance was already rolled, only roll success chance
return !roll_chance_f(failureChance);