mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-13 21:49:49 +01:00
Core/PacketIO: Updated and enabled CMSG_AREA_SPIRIT_HEALER_QUERY, CMSG_AREA_SPIRIT_HEALER_QUEUE, CMSG_HEARTH_AND_RESURRECT
This commit is contained in:
@@ -53,8 +53,6 @@
|
||||
#include "Spell.h"
|
||||
#include "SpellPackets.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "Battlefield.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "DB2Stores.h"
|
||||
#include "CharacterPackets.h"
|
||||
#include "ClientConfigPackets.h"
|
||||
@@ -1395,73 +1393,6 @@ void WorldSession::SendSetPhaseShift(std::set<uint32> const& phaseIds, std::set<
|
||||
SendPacket(phaseShift.Write());
|
||||
}
|
||||
|
||||
// Battlefield and Battleground
|
||||
void WorldSession::HandleAreaSpiritHealerQueryOpcode(WorldPacket& recvData)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: CMSG_AREA_SPIRIT_HEALER_QUERY");
|
||||
|
||||
Battleground* bg = _player->GetBattleground();
|
||||
|
||||
ObjectGuid guid;
|
||||
recvData >> 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& recvData)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: CMSG_AREA_SPIRIT_HEALER_QUEUE");
|
||||
|
||||
Battleground* bg = _player->GetBattleground();
|
||||
|
||||
ObjectGuid guid;
|
||||
recvData >> 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& /*recvData*/)
|
||||
{
|
||||
if (_player->IsInFlight())
|
||||
return;
|
||||
|
||||
if (/*Battlefield* bf = */sBattlefieldMgr->GetBattlefieldToZoneId(_player->GetZoneId()))
|
||||
{
|
||||
// bf->PlayerAskToLeave(_player); FIXME
|
||||
return;
|
||||
}
|
||||
|
||||
AreaTableEntry const* atEntry = GetAreaEntryByAreaID(_player->GetAreaId());
|
||||
if (!atEntry || !(atEntry->Flags[0] & AREA_FLAG_WINTERGRASP_2))
|
||||
return;
|
||||
|
||||
_player->BuildPlayerRepop();
|
||||
_player->ResurrectPlayer(1.0f);
|
||||
_player->TeleportTo(_player->m_homebindMapId, _player->m_homebindX, _player->m_homebindY, _player->m_homebindZ, _player->GetOrientation());
|
||||
}
|
||||
|
||||
void WorldSession::HandleInstanceLockResponse(WorldPacket& recvPacket)
|
||||
{
|
||||
uint8 accept;
|
||||
|
||||
Reference in New Issue
Block a user