Core/Spells: Fixed spell duration scaling with combo points
Port From (https://github.com/TrinityCore/TrinityCore/commit/9e68fd1458551ab0f007b6044c9220da8f7d4199)
This commit is contained in:
@@ -742,10 +742,10 @@ namespace Game.Spells
|
||||
|
||||
public int CalcMaxDuration(Unit caster)
|
||||
{
|
||||
return CalcMaxDuration(GetSpellInfo(), caster);
|
||||
return CalcMaxDuration(GetSpellInfo(), caster, null);
|
||||
}
|
||||
|
||||
public static int CalcMaxDuration(SpellInfo spellInfo, WorldObject caster)
|
||||
public static int CalcMaxDuration(SpellInfo spellInfo, WorldObject caster, List<SpellPowerCost> powerCosts)
|
||||
{
|
||||
Player modOwner = null;
|
||||
int maxDuration;
|
||||
@@ -753,7 +753,7 @@ namespace Game.Spells
|
||||
if (caster != null)
|
||||
{
|
||||
modOwner = caster.GetSpellModOwner();
|
||||
maxDuration = caster.CalcSpellDuration(spellInfo);
|
||||
maxDuration = caster.CalcSpellDuration(spellInfo, powerCosts);
|
||||
}
|
||||
else
|
||||
maxDuration = spellInfo.GetDuration();
|
||||
|
||||
@@ -152,7 +152,7 @@ namespace Game.Spells
|
||||
|
||||
public static float CalculateEstimatedfTotalPeriodicAmount(Unit caster, Unit target, SpellInfo spellInfo, SpellEffectInfo spellEffectInfo, float amount, byte stack)
|
||||
{
|
||||
int maxDuration = Aura.CalcMaxDuration(spellInfo, caster);
|
||||
int maxDuration = Aura.CalcMaxDuration(spellInfo, caster, null);
|
||||
if (maxDuration <= 0)
|
||||
return 0.0f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user