Core/Auras: periodics refactor part 1:
Port From (https://github.com/TrinityCore/TrinityCore/commit/5f9e0d92d563c983c229db1569414916b3dce51e)
This commit is contained in:
@@ -455,9 +455,15 @@ namespace Scripts.Spells.Druid
|
||||
{
|
||||
void CalculateAmount(AuraEffect aurEff, ref int amount, ref bool canBeRecalculated)
|
||||
{
|
||||
if (aurEff.GetTotalTicks() == 0)
|
||||
{
|
||||
amount = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
Unit caster = GetCaster();
|
||||
if (caster)
|
||||
amount = MathFunctions.CalculatePct(caster.GetCreatePowers(PowerType.Mana), amount) / aurEff.GetTotalTicks();
|
||||
amount = MathFunctions.CalculatePct(caster.GetCreatePowers(PowerType.Mana), amount) / (int)aurEff.GetTotalTicks();
|
||||
else
|
||||
amount = 0;
|
||||
}
|
||||
|
||||
@@ -1321,7 +1321,7 @@ namespace Scripts.Spells.Generic
|
||||
{
|
||||
void CalculateAmount(AuraEffect aurEff, ref int amount, ref bool canBeRecalculated)
|
||||
{
|
||||
if (!GetCaster())
|
||||
if (!GetCaster() || aurEff.GetTotalTicks() == 0)
|
||||
return;
|
||||
|
||||
float heal = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user