mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
Merge commit 'origin/master' into 320
This commit is contained in:
commit
373a837aa5
17 changed files with 156 additions and 123 deletions
|
|
@ -1927,15 +1927,8 @@ void Spell::EffectTriggerRitualOfSummoning(uint32 i)
|
|||
}
|
||||
|
||||
finish();
|
||||
Spell *spell = new Spell(m_caster, spellInfo, true);
|
||||
|
||||
SpellCastTargets targets;
|
||||
targets.setUnitTarget( unitTarget);
|
||||
spell->prepare(&targets);
|
||||
|
||||
m_caster->SetCurrentCastedSpell(spell);
|
||||
spell->m_selfContainer = &(m_caster->m_currentSpells[spell->GetCurrentContainer()]);
|
||||
|
||||
m_caster->CastSpell(unitTarget,spellInfo,false);
|
||||
}
|
||||
|
||||
void Spell::EffectForceCast(uint32 i)
|
||||
|
|
@ -4684,15 +4677,16 @@ void Spell::EffectInterruptCast(uint32 /*i*/)
|
|||
|
||||
// TODO: not all spells that used this effect apply cooldown at school spells
|
||||
// also exist case: apply cooldown to interrupted cast only and to all spells
|
||||
for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; i++)
|
||||
for (uint32 i = CURRENT_FIRST_NON_MELEE_SPELL; i < CURRENT_MAX_SPELL; ++i)
|
||||
{
|
||||
if (unitTarget->m_currentSpells[i])
|
||||
if (Spell* spell = unitTarget->GetCurrentSpell(CurrentSpellTypes(i)))
|
||||
{
|
||||
SpellEntry const* curSpellInfo = spell->m_spellInfo;
|
||||
// check if we can interrupt spell
|
||||
if ( unitTarget->m_currentSpells[i]->m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT && unitTarget->m_currentSpells[i]->m_spellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE )
|
||||
if ((curSpellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_INTERRUPT) && curSpellInfo->PreventionType == SPELL_PREVENTION_TYPE_SILENCE )
|
||||
{
|
||||
unitTarget->ProhibitSpellScholl(GetSpellSchoolMask(unitTarget->m_currentSpells[i]->m_spellInfo), GetSpellDuration(m_spellInfo));
|
||||
unitTarget->InterruptSpell(i,false);
|
||||
unitTarget->ProhibitSpellScholl(GetSpellSchoolMask(curSpellInfo), GetSpellDuration(m_spellInfo));
|
||||
unitTarget->InterruptSpell(CurrentSpellTypes(i),false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue