Skip to content

fix(Core/Spells): simplify and fix Blood-Caked Strike calculation #22243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/server/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3342,6 +3342,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
float totalDamagePercentMod = 100.0f; // applied to final bonus+weapon damage
int32 spell_bonus = 0; // bonus specific for spell
bool normalized = false;
float weaponDamagePercentMod = 0.0f;

switch (m_spellInfo->SpellFamilyName)
{
Expand Down Expand Up @@ -3532,9 +3533,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
// Blood-Caked Strike - Blood-Caked Blade
if (m_spellInfo->SpellIconID == 1736)
{
int32 weaponDamage = m_caster->CalculateDamage(m_attackType, false, true);
ApplyPct(weaponDamage, std::min(uint32(3), unitTarget->GetDiseasesByCaster(m_caster->GetGUID())) * 12.5f);
spell_bonus = weaponDamage;
weaponDamagePercentMod += std::min(uint32(3), unitTarget->GetDiseasesByCaster(m_caster->GetGUID())) * 12.5f;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the Blood-Caked Strike - Blood-Caked Blade spell require different handling than the ones above? Judging from the tooltips, they can be handled similarly

// Plague Strike
// Obliterate (12.5% more damage per disease)

If not, the same calcs should be done like below

AddPct(totalDamagePercentMod, disease_amt * unitTarget->GetDiseasesByCaster(m_caster->GetGUID());

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very different. Obliterate increases the total damage per disease, Blood-Caked Strike adds straight 12.5% of the weapon percent per disease (or 50% total damage per disease)

break;
}
// Heart Strike
Expand All @@ -3558,7 +3557,6 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
}
}

float weaponDamagePercentMod = 100.0f;
int32 fixed_bonus = 0;

for (int j = 0; j < MAX_SPELL_EFFECTS; ++j)
Expand All @@ -3574,7 +3572,7 @@ void Spell::EffectWeaponDmg(SpellEffIndex effIndex)
normalized = true;
break;
case SPELL_EFFECT_WEAPON_PERCENT_DAMAGE:
ApplyPct(weaponDamagePercentMod, CalculateSpellDamage(j, unitTarget));
weaponDamagePercentMod += CalculateSpellDamage(j, unitTarget);
break;
default:
break; // not weapon damage effect, just skip
Expand Down