aboutsummaryrefslogtreecommitdiff
path: root/src/game/Unit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r--src/game/Unit.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 2e4a552c8d0..21a489f188c 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -4673,7 +4673,7 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
// Statue unsummoned at aura remove
Totem* statue = NULL;
bool channeled = false;
- if(IsChanneledSpell(AurSpellInfo))
+ if(Aur->GetAuraDuration() && IsChanneledSpell(AurSpellInfo))
{
if(!caster) // can be already located for IsSingleTargetSpell case
caster = Aur->GetCaster();
@@ -4700,6 +4700,22 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode)
}
}
}
+
+ // Unsummon summon as possessed creatures on spell cancel
+ if(caster->GetTypeId() == TYPEID_PLAYER)
+ {
+ for(int i = 0; i < 3; ++i)
+ {
+ if(AurSpellInfo->Effect[i] == SPELL_EFFECT_SUMMON &&
+ (AurSpellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED ||
+ AurSpellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED2 ||
+ AurSpellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED3))
+ {
+ ((Player*)caster)->StopCastingCharm();
+ break;
+ }
+ }
+ }
}
}