diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index f45a592a0..ad7233b29 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1010,6 +1010,20 @@ void Unit::JustKilledCreature(Creature* victim) ((Player*)this)->KilledMonster(normalInfo, victim->GetObjectGuid()); } + // Interrupt channeling spell when a Possessed Summoned is killed + SpellEntry const* spellInfo = sSpellStore.LookupEntry(victim->GetUInt32Value(UNIT_CREATED_BY_SPELL)); + if (spellInfo && spellInfo->HasAttribute(SPELL_ATTR_EX_FARSIGHT) && spellInfo->HasAttribute(SPELL_ATTR_EX_CHANNELED_1)) + { + Unit* creator = GetMap()->GetUnit(victim->GetCreatorGuid()); + if (creator && creator->GetCharmGuid() == victim->GetObjectGuid()) + { + Spell* channeledSpell = creator->GetCurrentSpell(CURRENT_CHANNELED_SPELL); + if (channeledSpell && channeledSpell->m_spellInfo->Id == spellInfo->Id) + creator->InterruptNonMeleeSpells(false); + } + } + + /* ******************************* Inform various hooks ************************************ */ // Inform victim's AI if (victim->AI()) victim->AI()->JustDied(this); @@ -3677,7 +3691,6 @@ void Unit::FinishSpell(CurrentSpellTypes spellType, bool ok /*= true*/) spell->finish(ok); } - bool Unit::IsNonMeleeSpellCasted(bool withDelayed, bool skipChanneled, bool skipAutorepeat) const { // We don't do loop here to explicitly show that melee spell is excluded. diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 20eda06a0..3e87dddb8 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "12049" + #define REVISION_NR "12050" #endif // __REVISION_NR_H__