From 868c2ef17592a047d48bdf618328eadf15aa9372 Mon Sep 17 00:00:00 2001 From: gvcoman Date: Mon, 17 Nov 2008 18:57:16 -0500 Subject: * Implemented new summon possessed summon type for spell 49352. * Unsummon all summon possessed units on summoning aura cancel. --HG-- branch : trunk --- src/game/SpellHandler.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/game/SpellHandler.cpp') diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index 3ed9c04a259..868ba1d0ff8 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -33,6 +33,7 @@ #include "MapManager.h" #include "ScriptCalls.h" #include "Totem.h" +#include "TemporarySummon.h" void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket) { @@ -370,6 +371,14 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket) ((Unit*)_player->GetFarsightTarget())->RemoveAurasDueToSpellByCancel(spellId); return; } + else if (spellInfo->Effect[i] == SPELL_EFFECT_SUMMON && + (spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED || + spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED2 || + spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED3)) + { + // Possession is removed in the UnSummon function + ((TemporarySummon*)caster->GetCharm())->UnSummon(); + } } } -- cgit v1.2.3 From 53de62cee0fb2923459241b46eaea2ab2051d974 Mon Sep 17 00:00:00 2001 From: gvcoman Date: Mon, 17 Nov 2008 19:36:38 -0500 Subject: Fix typo. --HG-- branch : trunk --- src/game/SpellHandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game/SpellHandler.cpp') diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index 868ba1d0ff8..10b955fb7af 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -377,7 +377,7 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket) spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED3)) { // Possession is removed in the UnSummon function - ((TemporarySummon*)caster->GetCharm())->UnSummon(); + ((TemporarySummon*)_player->GetCharm())->UnSummon(); } } } -- cgit v1.2.3