Core/Players: Fixed spellpower for devourer demon hunters (currently the only intellect based spec without mana)

This commit is contained in:
Shauren
2026-02-06 00:36:44 +01:00
parent 9f96377d59
commit 5c8bf4dfea

View File

@@ -7073,7 +7073,8 @@ int32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, int
int32 Unit::SpellBaseDamageBonusDone(SpellSchoolMask schoolMask) const
{
if (Player const* thisPlayer = ToPlayer())
Player const* thisPlayer = ToPlayer();
if (thisPlayer)
{
float overrideSP = thisPlayer->m_activePlayerData->OverrideSpellPowerByAPPercent;
if (overrideSP > 0.0f)
@@ -7082,13 +7083,12 @@ int32 Unit::SpellBaseDamageBonusDone(SpellSchoolMask schoolMask) const
int32 DoneAdvertisedBenefit = GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_DONE, schoolMask);
if (GetTypeId() == TYPEID_PLAYER)
if (thisPlayer)
{
// Base value
DoneAdvertisedBenefit += ToPlayer()->GetBaseSpellPowerBonus();
DoneAdvertisedBenefit += thisPlayer->GetBaseSpellPowerBonus();
// Check if we are ever using mana - PaperDollFrame.lua
if (GetPowerIndex(POWER_MANA) != MAX_POWERS)
if (thisPlayer->GetPrimaryStat() == STAT_INTELLECT)
DoneAdvertisedBenefit += std::max(0, int32(GetStat(STAT_INTELLECT))); // spellpower from intellect
// Damage bonus from stats