fix(Core/Spells): Demonic Knowledge missing 1% per rank (#17495)

This commit is contained in:
avarishd
2023-10-19 01:21:46 +03:00
committed by GitHub
parent 12189ffc4b
commit a39175bc3b
3 changed files with 9 additions and 3 deletions

View File

@@ -381,8 +381,8 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS] =
AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32* baseAmount, Unit* caster):
m_base(base), m_spellInfo(base->GetSpellInfo()),
m_baseAmount(baseAmount ? * baseAmount : m_spellInfo->Effects[effIndex].BasePoints), m_critChance(0),
m_oldAmount(0), m_isAuraEnabled(true), m_channelData(nullptr), m_spellmod(nullptr), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex),
m_baseAmount(baseAmount ? * baseAmount : m_spellInfo->Effects[effIndex].BasePoints), m_dieSides(m_spellInfo->Effects[effIndex].DieSides),
m_critChance(0), m_oldAmount(0), m_isAuraEnabled(true), m_channelData(nullptr), m_spellmod(nullptr), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex),
m_canBeRecalculated(true), m_isPeriodic(false)
{
CalculatePeriodic(caster, true, false);

View File

@@ -55,6 +55,7 @@ public:
uint32 GetId() const;
uint32 GetEffIndex() const { return m_effIndex; }
int32 GetBaseAmount() const { return m_baseAmount; }
int32 GetDieSides() const { return m_dieSides; }
int32 GetAmplitude() const { return m_amplitude; }
int32 GetMiscValueB() const;
@@ -121,6 +122,7 @@ private:
SpellInfo const* const m_spellInfo;
int32 const m_baseAmount;
int32 const m_dieSides;
bool m_applyResilience;
uint8 m_casterLevel;

View File

@@ -243,6 +243,7 @@ class spell_warl_demonic_aegis : public AuraScript
}
};
// -35696 - Demonic Knowledge
class spell_warl_demonic_knowledge : public AuraScript
{
PrepareAuraScript(spell_warl_demonic_knowledge);
@@ -250,7 +251,10 @@ class spell_warl_demonic_knowledge : public AuraScript
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
{
if (Unit* caster = GetCaster())
amount = CalculatePct(caster->GetStat(STAT_STAMINA) + caster->GetStat(STAT_INTELLECT), aurEff->GetBaseAmount());
{
uint8 pct = aurEff->GetBaseAmount() + aurEff->GetDieSides();
amount = CalculatePct(caster->GetStat(STAT_STAMINA) + caster->GetStat(STAT_INTELLECT), pct);
}
}
void CalcPeriodic(AuraEffect const* /*aurEff*/, bool& isPeriodic, int32& amplitude)