Core/Aura: allow all dots to crit (#460)

This commit is contained in:
sevi authored and GitHub committed 2026-02-09 13:54:15 +01:00
1 parent ecd9870ef5
commit b9bee7edac
2 files changed
+4 -8

No files matched your search

+3 -7
View File
@@ -490,22 +490,18 @@ void Aura::_InitEffects(uint8 effMask, Unit* caster, int32 const* baseAmount)
}
}
bool Aura::CanPeriodicTickCrit(Unit const* caster) const
bool Aura::CanPeriodicTickCrit() const
{
if (m_spellInfo->HasAttribute(SPELL_ATTR8_PERIODIC_CAN_CRIT))
return true;
if (m_spellInfo->HasAttribute(SPELL_ATTR2_CANT_CRIT))
return false;
return caster->HasAuraTypeWithAffectMask(SPELL_AURA_ABILITY_PERIODIC_CRIT, GetSpellInfo());
return true;
}
float Aura::CalcPeriodicCritChance(Unit const* caster) const
{
Player* modOwner = caster->GetSpellModOwner();
if (!modOwner || !CanPeriodicTickCrit(modOwner))
if (!modOwner || !CanPeriodicTickCrit())
return 0.f;
float critChance = modOwner->SpellCritChanceDone(GetSpellInfo(), GetSpellInfo()->GetSchoolMask(), GetSpellInfo()->GetAttackType(), true);
+1 -1
View File
@@ -202,7 +202,7 @@ class TC_GAME_API Aura
void SetLoadedState(int32 maxduration, int32 duration, int32 charges, uint8 stackamount, uint8 recalculateMask, float critChance, bool applyResilience, int32* amount);
// helpers for aura effects
bool CanPeriodicTickCrit(Unit const* caster) const;
bool CanPeriodicTickCrit() const;
float CalcPeriodicCritChance(Unit const* caster) const;
bool HasEffect(uint8 effIndex) const { return GetEffect(effIndex) != nullptr; }