fix(Core/Spells): Demonic Knowledge missing 1% per rank (#17495)
This commit is contained in:
@@ -381,8 +381,8 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS] =
|
|||||||
|
|
||||||
AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32* baseAmount, Unit* caster):
|
AuraEffect::AuraEffect(Aura* base, uint8 effIndex, int32* baseAmount, Unit* caster):
|
||||||
m_base(base), m_spellInfo(base->GetSpellInfo()),
|
m_base(base), m_spellInfo(base->GetSpellInfo()),
|
||||||
m_baseAmount(baseAmount ? * baseAmount : m_spellInfo->Effects[effIndex].BasePoints), m_critChance(0),
|
m_baseAmount(baseAmount ? * baseAmount : m_spellInfo->Effects[effIndex].BasePoints), m_dieSides(m_spellInfo->Effects[effIndex].DieSides),
|
||||||
m_oldAmount(0), m_isAuraEnabled(true), m_channelData(nullptr), m_spellmod(nullptr), m_periodicTimer(0), m_tickNumber(0), m_effIndex(effIndex),
|
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)
|
m_canBeRecalculated(true), m_isPeriodic(false)
|
||||||
{
|
{
|
||||||
CalculatePeriodic(caster, true, false);
|
CalculatePeriodic(caster, true, false);
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ public:
|
|||||||
uint32 GetId() const;
|
uint32 GetId() const;
|
||||||
uint32 GetEffIndex() const { return m_effIndex; }
|
uint32 GetEffIndex() const { return m_effIndex; }
|
||||||
int32 GetBaseAmount() const { return m_baseAmount; }
|
int32 GetBaseAmount() const { return m_baseAmount; }
|
||||||
|
int32 GetDieSides() const { return m_dieSides; }
|
||||||
int32 GetAmplitude() const { return m_amplitude; }
|
int32 GetAmplitude() const { return m_amplitude; }
|
||||||
|
|
||||||
int32 GetMiscValueB() const;
|
int32 GetMiscValueB() const;
|
||||||
@@ -121,6 +122,7 @@ private:
|
|||||||
|
|
||||||
SpellInfo const* const m_spellInfo;
|
SpellInfo const* const m_spellInfo;
|
||||||
int32 const m_baseAmount;
|
int32 const m_baseAmount;
|
||||||
|
int32 const m_dieSides;
|
||||||
|
|
||||||
bool m_applyResilience;
|
bool m_applyResilience;
|
||||||
uint8 m_casterLevel;
|
uint8 m_casterLevel;
|
||||||
|
|||||||
@@ -243,6 +243,7 @@ class spell_warl_demonic_aegis : public AuraScript
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// -35696 - Demonic Knowledge
|
||||||
class spell_warl_demonic_knowledge : public AuraScript
|
class spell_warl_demonic_knowledge : public AuraScript
|
||||||
{
|
{
|
||||||
PrepareAuraScript(spell_warl_demonic_knowledge);
|
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*/)
|
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||||
{
|
{
|
||||||
if (Unit* caster = GetCaster())
|
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)
|
void CalcPeriodic(AuraEffect const* /*aurEff*/, bool& isPeriodic, int32& amplitude)
|
||||||
|
|||||||
Reference in New Issue
Block a user