File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -629,7 +629,18 @@ class SolocraftPlayerInstanceHandler : public PlayerScript
629
629
// Debuffed characters do not get spellpower
630
630
if (difficulty > 0 )
631
631
{
632
- SpellPowerBonus = static_cast <int >((player->GetBaseSpellPowerBonus () * SoloCraftSpellMult) * difficulty);
632
+ int32 maxBonus = 0 ;
633
+ for (uint8 school = SPELL_SCHOOL_NORMAL; school <= MAX_SPELL_SCHOOL; ++school) {
634
+ // SpellSchools spellSchool = static_cast<SpellSchools>(school);
635
+
636
+ int32 damage = player->SpellBaseDamageBonusDone (SpellSchoolMask (1 << school));
637
+ int32 healing = player->SpellBaseHealingBonusDone (SpellSchoolMask (1 << school));
638
+
639
+ maxBonus = std::max (maxBonus, damage);
640
+ maxBonus = std::max (maxBonus, healing);
641
+
642
+ }
643
+ SpellPowerBonus = static_cast <int >((maxBonus * SoloCraftSpellMult) * difficulty);
633
644
player->ApplySpellPowerBonus (SpellPowerBonus, true );
634
645
}
635
646
}
You can’t perform that action at this time.
0 commit comments