aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
authorgvcoman <none@none>2008-11-14 20:40:35 -0600
committergvcoman <none@none>2008-11-14 20:40:35 -0600
commit5deef1bb59ba53570d481a97e5c1df39ef316f37 (patch)
tree334e913e1247419d2ad485f1681e859aa8875044 /src/game/SpellAuras.cpp
parent3085e66b966fec0012decf2543c7e32064b47102 (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/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp31
1 files changed, 24 insertions, 7 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 30afbdcfa7c..8edac052288 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1964,14 +1964,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
// AT REMOVE
else
{
- if( m_target->GetTypeId() == TYPEID_PLAYER &&
- ( GetSpellProto()->Effect[0]==72 || GetSpellProto()->Effect[0]==6 &&
- ( GetSpellProto()->EffectApplyAuraName[0]==1 || GetSpellProto()->EffectApplyAuraName[0]==128 ) ) )
+ if( m_target->GetTypeId() == TYPEID_PLAYER && GetSpellProto()->Effect[0]==72 )
{
// spells with SpellEffect=72 and aura=4: 6196, 6197, 21171, 21425
- m_target->SetUInt64Value(PLAYER_FARSIGHT, 0);
- WorldPacket data(SMSG_CLEAR_FAR_SIGHT_IMMEDIATE, 0);
- ((Player*)m_target)->GetSession()->SendPacket(&data);
+ ((Player*)m_target)->ClearFarsight();
return;
}
@@ -2229,6 +2225,24 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
return;
}
+
+ // Sentry Totem
+ if (GetId() == 6495 && caster->GetTypeId() == TYPEID_PLAYER)
+ {
+ if (apply)
+ {
+ uint64 guid = caster->m_TotemSlot[3];
+ if (guid)
+ {
+ Creature *totem = ObjectAccessor::GetCreature(*caster, guid);
+ if (totem && totem->isTotem())
+ totem->AddPlayerToVision((Player*)caster);
+ }
+ }
+ else
+ ((Player*)caster)->RemoveFarsightTarget();
+ return;
+ }
break;
}
}
@@ -2830,7 +2844,10 @@ void Aura::HandleBindSight(bool apply, bool Real)
if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
return;
- caster->SetUInt64Value(PLAYER_FARSIGHT,apply ? m_target->GetGUID() : 0);
+ if (apply)
+ m_target->AddPlayerToVision((Player*)caster);
+ else
+ m_target->RemovePlayerFromVision((Player*)caster);
}
void Aura::HandleFarSight(bool apply, bool Real)