Skip to content

Commit 5c8bf4d

Browse files
committed
Core/Players: Fixed spellpower for devourer demon hunters (currently the only intellect based spec without mana)
1 parent 9f96377 commit 5c8bf4d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/server/game/Entities/Unit/Unit.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7073,7 +7073,8 @@ int32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, int
70737073

70747074
int32 Unit::SpellBaseDamageBonusDone(SpellSchoolMask schoolMask) const
70757075
{
7076-
if (Player const* thisPlayer = ToPlayer())
7076+
Player const* thisPlayer = ToPlayer();
7077+
if (thisPlayer)
70777078
{
70787079
float overrideSP = thisPlayer->m_activePlayerData->OverrideSpellPowerByAPPercent;
70797080
if (overrideSP > 0.0f)
@@ -7082,13 +7083,12 @@ int32 Unit::SpellBaseDamageBonusDone(SpellSchoolMask schoolMask) const
70827083

70837084
int32 DoneAdvertisedBenefit = GetTotalAuraModifierByMiscMask(SPELL_AURA_MOD_DAMAGE_DONE, schoolMask);
70847085

7085-
if (GetTypeId() == TYPEID_PLAYER)
7086+
if (thisPlayer)
70867087
{
70877088
// Base value
7088-
DoneAdvertisedBenefit += ToPlayer()->GetBaseSpellPowerBonus();
7089+
DoneAdvertisedBenefit += thisPlayer->GetBaseSpellPowerBonus();
70897090

7090-
// Check if we are ever using mana - PaperDollFrame.lua
7091-
if (GetPowerIndex(POWER_MANA) != MAX_POWERS)
7091+
if (thisPlayer->GetPrimaryStat() == STAT_INTELLECT)
70927092
DoneAdvertisedBenefit += std::max(0, int32(GetStat(STAT_INTELLECT))); // spellpower from intellect
70937093

70947094
// Damage bonus from stats

0 commit comments

Comments
 (0)