diff options
author | gvcoman <none@none> | 2008-11-14 20:40:35 -0600 |
---|---|---|
committer | gvcoman <none@none> | 2008-11-14 20:40:35 -0600 |
commit | 5deef1bb59ba53570d481a97e5c1df39ef316f37 (patch) | |
tree | 334e913e1247419d2ad485f1681e859aa8875044 /src/game/SpellHandler.cpp | |
parent | 3085e66b966fec0012decf2543c7e32064b47102 (diff) |
[svn] * Reimplemented packet/update forwarding in more generic way
* Implemented far sight spells (Far Sight, Eagle Eye, etc) at unlimited range and properly forward packets
* Implemented bind vision spells (Mind Vision, etc) to forward packets at unlimited distance
* Implemented Sentry Totem (both vision switching/forwarding and alerting)
* Other misc possession fixes
* Added .bindsight and .unbindsight commands
Please test out the above spells (including Mind Control) and report any issues on the forums.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellHandler.cpp')
-rw-r--r-- | src/game/SpellHandler.cpp | 15 |
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(); } |