Skip to content

Commit f8c9005

Browse files
authored
fix: spellpower scaling to max from single schools (#61)
1 parent 7540918 commit f8c9005

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Solocraft.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,18 @@ class SolocraftPlayerInstanceHandler : public PlayerScript
629629
// Debuffed characters do not get spellpower
630630
if (difficulty > 0)
631631
{
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);
633644
player->ApplySpellPowerBonus(SpellPowerBonus, true);
634645
}
635646
}

0 commit comments

Comments
 (0)