[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
This commit is contained in:
gvcoman
2008-11-14 20:40:35 -06:00
parent 3085e66b96
commit 5deef1bb59
21 changed files with 329 additions and 74 deletions

View File

@@ -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();
}