Core/Misc: Reduce differences between cores
Port From (https://github.com/TrinityCore/TrinityCore/commit/ff6a107ac0e7a82d728f8fd2fd8423743233a474)
This commit is contained in:
@@ -405,6 +405,17 @@ namespace Game.Spells
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanPeriodicTickCrit()
|
||||
{
|
||||
if (GetSpellInfo().HasAttribute(SpellAttr2.CantCrit))
|
||||
return false;
|
||||
|
||||
if (GetSpellInfo().HasAttribute(SpellAttr8.PeriodicCanCrit))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual void Dispose()
|
||||
{
|
||||
// unload scripts
|
||||
|
||||
@@ -5667,20 +5667,9 @@ namespace Game.Spells
|
||||
caster.SendSpellNonMeleeDamageLog(damageInfo);
|
||||
}
|
||||
|
||||
bool CanPeriodicTickCrit()
|
||||
{
|
||||
if (GetSpellInfo().HasAttribute(SpellAttr2.CantCrit))
|
||||
return false;
|
||||
|
||||
if (GetSpellInfo().HasAttribute(SpellAttr8.PeriodicCanCrit))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
float CalcPeriodicCritChance(Unit caster)
|
||||
{
|
||||
if (caster == null || !CanPeriodicTickCrit())
|
||||
if (caster == null || !GetBase().CanPeriodicTickCrit())
|
||||
return 0.0f;
|
||||
|
||||
Player modOwner = caster.GetSpellModOwner();
|
||||
|
||||
Reference in New Issue
Block a user