aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/SpellHandler.cpp')
-rw-r--r--src/game/SpellHandler.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp
index 00979cd23d3..3ed9c04a259 100644
--- a/src/game/SpellHandler.cpp
+++ b/src/game/SpellHandler.cpp
@@ -352,18 +352,22 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
if (!spellInfo)
return;
- // Remove possess/charm aura from the possessed/charmed as well
+ // Remove possess/charm/sight aura from the possessed/charmed as well
// TODO: Remove this once the ability to cancel aura sets at once is implemented
- if(_player->GetCharm())
+ if(_player->GetCharm() || _player->GetFarsightTarget())
{
for (int i = 0; i < 3; ++i)
{
if (spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_POSSESS ||
spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_POSSESS_PET ||
- spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_CHARM)
+ spellInfo->EffectApplyAuraName[i] == SPELL_AURA_MOD_CHARM ||
+ spellInfo->EffectApplyAuraName[i] == SPELL_AURA_BIND_SIGHT)
{
_player->RemoveAurasDueToSpellByCancel(spellId);
- _player->GetCharm()->RemoveAurasDueToSpellByCancel(spellId);
+ if (_player->GetCharm())
+ _player->GetCharm()->RemoveAurasDueToSpellByCancel(spellId);
+ else if (_player->GetFarsightTarget()->GetTypeId() != TYPEID_DYNAMICOBJECT)
+ ((Unit*)_player->GetFarsightTarget())->RemoveAurasDueToSpellByCancel(spellId);
return;
}
}
@@ -464,7 +468,8 @@ void WorldSession::HandleTotemDestroy( WorldPacket& recvPacket)
return;
Creature* totem = ObjectAccessor::GetCreature(*_player,_player->m_TotemSlot[slotId]);
- if(totem && totem->isTotem())
+ // Don't unsummon sentry totem
+ if(totem && totem->isTotem() && totem->GetEntry() != SENTRY_TOTEM_ENTRY)
((Totem*)totem)->UnSummon();
}