aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/BattleGroundHandler.cpp
diff options
context:
space:
mode:
authorKandera <KanderaDev@gmail.com>2012-08-20 16:23:24 -0400
committerKandera <KanderaDev@gmail.com>2012-08-20 16:23:24 -0400
commitb9f60fe56c86914c15f3a3064f9b8b91ea166012 (patch)
treefbf2fdc54a78058515d063b9198776beee1bd03c /src/server/game/Handlers/BattleGroundHandler.cpp
parentc428675048d2b6833ac055d7c5ed5d8f7659f667 (diff)
Core/Wintergrasp: finish implementation for battlefields. this is highly experimental enable at you're own risk. will almost definatly cause issues with the wintergrasp patch floating around
Diffstat (limited to 'src/server/game/Handlers/BattleGroundHandler.cpp')
-rwxr-xr-xsrc/server/game/Handlers/BattleGroundHandler.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/server/game/Handlers/BattleGroundHandler.cpp b/src/server/game/Handlers/BattleGroundHandler.cpp
index 475c1c42fca..b47eaf52064 100755
--- a/src/server/game/Handlers/BattleGroundHandler.cpp
+++ b/src/server/game/Handlers/BattleGroundHandler.cpp
@@ -34,6 +34,8 @@
#include "Opcodes.h"
#include "DisableMgr.h"
#include "Group.h"
+#include "Battlefield.h"
+#include "BattlefieldMgr.h"
void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket & recv_data)
{
@@ -565,6 +567,53 @@ void WorldSession::HandleBattlefieldStatusOpcode(WorldPacket & /*recv_data*/)
}
}
+void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket & recv_data)
+{
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY");
+
+ Battleground* bg = _player->GetBattleground();
+
+ uint64 guid;
+ recv_data >> guid;
+
+ Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
+ if (!unit)
+ return;
+
+ if (!unit->isSpiritService()) // it's not spirit service
+ return;
+
+ if (bg)
+ sBattlegroundMgr->SendAreaSpiritHealerQueryOpcode(_player, bg, guid);
+
+ if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId()))
+ bf->SendAreaSpiritHealerQueryOpcode(_player,guid);
+}
+
+void WorldSession::HandleAreaSpiritHealerQueueOpcode(WorldPacket & recv_data)
+{
+ sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE");
+
+ Battleground* bg = _player->GetBattleground();
+
+ uint64 guid;
+ recv_data >> guid;
+
+ Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
+ if (!unit)
+ return;
+
+ if (!unit->isSpiritService()) // it's not spirit service
+ return;
+
+ if (bg)
+ bg->AddPlayerToResurrectQueue(guid, _player->GetGUID());
+
+ if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId()))
+ bf->AddPlayerToResurrectQueue(guid, _player->GetGUID());
+}
+
+
void WorldSession::HandleBattlemasterJoinArena(WorldPacket & recv_data)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");