| 3428 | |
| 3429 | // Unsummon any summoned as possessed creatures on channel interrupt |
| 3430 | SpellEntry const *spellInfo = sSpellStore.LookupEntry(spell_id); |
| 3431 | if (!spellInfo || !interrupted) |
| 3432 | return; |
| 3433 | for (int i = 0; i < 3; i++) |
| 3434 | { |
| 3435 | if (spellInfo->Effect[i] == SPELL_EFFECT_SUMMON && |
| 3436 | (spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED || |
| 3437 | spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED2 || |
| 3438 | spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED3)) |
| 3439 | { |
| 3440 | // Possession is removed in the UnSummon function |
| 3441 | if (GetCharm()) |
| 3442 | ((TemporarySummon*)GetCharm())->UnSummon(); |
| 3443 | } |
| 3444 | } |