From eceecac7c5a0318a92e826a9ad5e5bc02a28c677 Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Sat, 14 Jun 2025 16:22:03 +0200 Subject: [PATCH] Core/Player: removed manual mastery aura amount calculation as it's already done within the spell effect amount --- src/server/game/Entities/Unit/StatSystem.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index 69b7570daf..a13468eb67 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -684,24 +684,17 @@ void Player::UpdateMastery() if (!talentTab) return; - for (uint32 i = 0; i < MAX_MASTERY_SPELLS; ++i) + for (uint8 i = 0; i < MAX_MASTERY_SPELLS; ++i) { if (!talentTab->MasterySpellID[i]) continue; if (Aura* aura = GetAura(talentTab->MasterySpellID[i])) { - for (uint32 j = 0; j < MAX_SPELL_EFFECTS; ++j) - { - if (!aura->HasEffect(j)) - continue; + if (!aura->GetSpellInfo()->HasAttribute(SPELL_ATTR8_MASTERY_AFFECTS_POINTS)) + continue; - float mult = aura->GetSpellInfo()->Effects[j].BonusMultiplier; - if (G3D::fuzzyEq(mult, 0.0f)) - continue; - - aura->GetEffect(j)->ChangeAmount(int32(value * aura->GetSpellInfo()->Effects[j].BonusMultiplier)); - } + aura->RecalculateAmountOfEffects(); } } }