Merge branch 'master' into Playerbot

This commit is contained in:
Yunfan Li
2024-07-19 17:25:43 +08:00
141 changed files with 225779 additions and 226517 deletions

View File

@@ -3712,7 +3712,6 @@ void Spell::cancel(bool bySelf)
return;
uint32 oldState = m_spellState;
bool autoRepeat = m_autoRepeat;
m_spellState = SPELL_STATE_FINISHED;
m_autoRepeat = false;
@@ -3720,6 +3719,8 @@ void Spell::cancel(bool bySelf)
{
case SPELL_STATE_PREPARING:
CancelGlobalCooldown();
SendCastResult(SPELL_FAILED_INTERRUPTED);
if (m_caster->GetTypeId() == TYPEID_PLAYER)
{
if (m_caster->ToPlayer()->NeedSendSpectatorData())
@@ -3727,10 +3728,7 @@ void Spell::cancel(bool bySelf)
}
[[fallthrough]];
case SPELL_STATE_DELAYED:
SendInterrupted(0);
// xinef: fixes bugged gcd reset in some cases
if (!autoRepeat)
SendCastResult(SPELL_FAILED_INTERRUPTED);
SendInterrupted(SPELL_FAILED_INTERRUPTED);
break;
case SPELL_STATE_CASTING:
if (!bySelf)
@@ -7746,6 +7744,9 @@ void Spell::Delayed() // only called in DealDamage()
if (isDelayableNoMore()) // Spells may only be delayed twice
return;
if (m_spellInfo->HasAttribute(SPELL_ATTR6_NO_PUSHBACK))
return;
// spells not loosing casting time (slam, dynamites, bombs..)
//if (!(m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_DAMAGE))
// return;
@@ -7785,6 +7786,9 @@ void Spell::DelayedChannel()
if (isDelayableNoMore()) // Spells may only be delayed twice
return;
if (m_spellInfo->HasAttribute(SPELL_ATTR6_NO_PUSHBACK))
return;
//check pushback reduce
// should be affected by modifiers, not take the dbc duration.
int32 duration = ((m_channeledDuration > 0) ? m_channeledDuration : m_spellInfo->GetDuration());