Core/Battlefield: Add missing stuff for wintergrasp

This commit is contained in:
Vincent-Michael committed 2012-08-21 23:03:30 +02:00
1 parent 984493108b
commit 6891fe6248
20 files changed
+139 -106

No files matched your search

+47
View File
@@ -52,6 +52,7 @@
#include "Group.h"
#include "AccountMgr.h"
#include "Spell.h"
#include "BattlegroundMgr.h"
#include "Battlefield.h"
#include "BattlefieldMgr.h"
@@ -1688,6 +1689,52 @@ void WorldSession::SendSetPhaseShift(uint32 PhaseShift)
data << uint32(PhaseShift);
SendPacket(&data);
}
// Battlefield and Battleground
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::HandleHearthAndResurrect(WorldPacket& /*recv_data*/)
{