mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Channeled spell pushback is now affected by haste
This commit is contained in:
@@ -600,7 +600,7 @@ m_caster((info->AttributesEx6 & SPELL_ATTR6_CAST_BY_CHARMER && caster->GetCharme
|
||||
m_powerCost = 0; // setup to correct value in Spell::prepare, must not be used before.
|
||||
m_casttime = 0; // setup to correct value in Spell::prepare, must not be used before.
|
||||
m_timer = 0; // will set to castime in prepare
|
||||
|
||||
m_channeledDuration = 0; // will be setup in Spell::handle_immediate
|
||||
m_immediateHandled = false;
|
||||
|
||||
m_channelTargetEffectMask = 0;
|
||||
@@ -3244,6 +3244,7 @@ void Spell::handle_immediate()
|
||||
|
||||
m_spellState = SPELL_STATE_CASTING;
|
||||
m_caster->AddInterruptMask(m_spellInfo->ChannelInterruptFlags);
|
||||
m_channeledDuration = duration;
|
||||
SendChannelStart(duration);
|
||||
}
|
||||
else if (duration == -1)
|
||||
@@ -6325,7 +6326,10 @@ void Spell::DelayedChannel()
|
||||
return;
|
||||
|
||||
//check pushback reduce
|
||||
int32 delaytime = CalculatePct(m_spellInfo->GetDuration(), 25); // channeling delay is normally 25% of its time per hit
|
||||
// should be affected by modifiers, not take the dbc duration.
|
||||
int32 duration = ((m_channeledDuration > 0) ? m_channeledDuration : m_spellInfo->GetDuration());
|
||||
|
||||
int32 delaytime = CalculatePct(duration, 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;
|
||||
|
||||
@@ -514,6 +514,7 @@ class Spell
|
||||
WeaponAttackType m_attackType; // For weapon based attack
|
||||
int32 m_powerCost; // Calculated spell cost initialized only in Spell::prepare
|
||||
int32 m_casttime; // Calculated spell cast time initialized only in Spell::prepare
|
||||
int32 m_channeledDuration; // Calculated channeled spell duration in order to calculate correct pushback.
|
||||
bool m_canReflect; // can reflect this spell?
|
||||
bool m_autoRepeat;
|
||||
uint8 m_runesState;
|
||||
|
||||
Reference in New Issue
Block a user