Core/Utilities: Use generic templates with AddPct, ApplyPct and CalculatePct

This commit is contained in:
Spp committed 2012-10-02 12:17:42 +02:00
1 parent f8846cdeaf
commit 380db44583
31 files changed
+321 -357

No files matched your search

+3 -3
View File
@@ -6365,7 +6365,7 @@ void Spell::Delayed() // only called in DealDamage()
if (delayReduce >= 100)
return;
AddPctN(delaytime, -delayReduce);
AddPct(delaytime, -delayReduce);
if (m_timer + delaytime > m_casttime)
{
@@ -6393,14 +6393,14 @@ void Spell::DelayedChannel()
return;
//check pushback reduce
int32 delaytime = CalculatePctN(m_spellInfo->GetDuration(), 25); // channeling delay is normally 25% of its time per hit
int32 delaytime = CalculatePct(m_spellInfo->GetDuration(), 25); // channeling delay is normally 25% of its time per hit
int32 delayReduce = 100; // must be initialized to 100 for percent modifiers
m_caster->ToPlayer()->ApplySpellMod(m_spellInfo->Id, SPELLMOD_NOT_LOSE_CASTING_TIME, delayReduce, this);
delayReduce += m_caster->GetTotalAuraModifier(SPELL_AURA_REDUCE_PUSHBACK) - 100;
if (delayReduce >= 100)
return;
AddPctN(delaytime, -delayReduce);
AddPct(delaytime, -delayReduce);
if (m_timer <= delaytime)
{