aboutsummaryrefslogtreecommitdiff
path: root/src/game/TotemAI.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/TotemAI.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/TotemAI.cpp')
-rw-r--r--src/game/TotemAI.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/TotemAI.cpp b/src/game/TotemAI.cpp
index f68d26df49d..7b99a8f0358 100644
--- a/src/game/TotemAI.cpp
+++ b/src/game/TotemAI.cpp
@@ -122,4 +122,13 @@ TotemAI::IsVisible(Unit *) const
void
TotemAI::AttackStart(Unit *)
{
+ // Sentry totem sends ping on attack
+ if (i_totem.GetEntry() == SENTRY_TOTEM_ENTRY && i_totem.GetOwner()->GetTypeId() == TYPEID_PLAYER)
+ {
+ WorldPacket data(MSG_MINIMAP_PING, (8+4+4));
+ data << i_totem.GetGUID();
+ data << i_totem.GetPositionX();
+ data << i_totem.GetPositionY();
+ ((Player*)i_totem.GetOwner())->GetSession()->SendPacket(&data);
+ }
}