aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authorgvcoman <none@none>2008-11-21 21:00:45 -0500
committergvcoman <none@none>2008-11-21 21:00:45 -0500
commit063208485700904ebb6a3a77803b9c91d692daf8 (patch)
tree78020748dca9201a1eb735527df51b4d5da927f7 /src/game/Spell.cpp
parent32485bc5d1bbde8f4b5e81d718f0fc0119442294 (diff)
* Added missing part of mangos merge on interrupt channeling on aura cancel
* Removed hacks attempting to do the above only for possessing or farsight spells * Moved summon as possessed unsummoning into more general area in Spell::cancel * Added SQL updates for steam tonk and tonk mine scripts --HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 59d019800ed..9f2a0cd33e0 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -48,6 +48,7 @@
#include "VMapFactory.h"
#include "BattleGround.h"
#include "Util.h"
+#include "TemporarySummon.h"
#define SPELL_CHANNEL_UPDATE_INTERVAL 1000
@@ -2187,6 +2188,20 @@ void Spell::cancel()
} break;
}
+ // Unsummon summon as possessed creatures on spell cancel
+ for (int i = 0; i < 3; i++)
+ {
+ if (m_spellInfo->Effect[i] == SPELL_EFFECT_SUMMON &&
+ (m_spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED ||
+ m_spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED2 ||
+ m_spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED3))
+ {
+ // Possession is removed in the UnSummon function
+ if (m_caster->GetCharm())
+ ((TemporarySummon*)m_caster->GetCharm())->UnSummon();
+ }
+ }
+
finish(false);
m_caster->RemoveDynObject(m_spellInfo->Id);
m_caster->RemoveGameObject(m_spellInfo->Id,true);