Skip to content

Commit b9bee7e

Browse files
authored
Core/Aura: allow all dots to crit (#460)
1 parent ecd9870 commit b9bee7e

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

src/server/game/Spells/Auras/SpellAuras.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -490,22 +490,18 @@ void Aura::_InitEffects(uint8 effMask, Unit* caster, int32 const* baseAmount)
490490
}
491491
}
492492

493-
bool Aura::CanPeriodicTickCrit(Unit const* caster) const
493+
bool Aura::CanPeriodicTickCrit() const
494494
{
495-
if (m_spellInfo->HasAttribute(SPELL_ATTR8_PERIODIC_CAN_CRIT))
496-
return true;
497-
498495
if (m_spellInfo->HasAttribute(SPELL_ATTR2_CANT_CRIT))
499496
return false;
500497

501-
return caster->HasAuraTypeWithAffectMask(SPELL_AURA_ABILITY_PERIODIC_CRIT, GetSpellInfo());
502-
498+
return true;
503499
}
504500

505501
float Aura::CalcPeriodicCritChance(Unit const* caster) const
506502
{
507503
Player* modOwner = caster->GetSpellModOwner();
508-
if (!modOwner || !CanPeriodicTickCrit(modOwner))
504+
if (!modOwner || !CanPeriodicTickCrit())
509505
return 0.f;
510506

511507
float critChance = modOwner->SpellCritChanceDone(GetSpellInfo(), GetSpellInfo()->GetSchoolMask(), GetSpellInfo()->GetAttackType(), true);

src/server/game/Spells/Auras/SpellAuras.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ class TC_GAME_API Aura
202202
void SetLoadedState(int32 maxduration, int32 duration, int32 charges, uint8 stackamount, uint8 recalculateMask, float critChance, bool applyResilience, int32* amount);
203203

204204
// helpers for aura effects
205-
bool CanPeriodicTickCrit(Unit const* caster) const;
205+
bool CanPeriodicTickCrit() const;
206206
float CalcPeriodicCritChance(Unit const* caster) const;
207207

208208
bool HasEffect(uint8 effIndex) const { return GetEffect(effIndex) != nullptr; }

0 commit comments

Comments
 (0)