refactor(Core/Packets): Bank packets (#9627)

This commit is contained in:
IntelligentQuantum
2021-12-30 22:30:24 +03:30
committed by GitHub
parent b2dd9eec5a
commit 53a6fb7513
7 changed files with 342 additions and 189 deletions

View File

@@ -69,36 +69,6 @@ void WorldSession::SendTabardVendorActivate(ObjectGuid guid)
SendPacket(&data);
}
void WorldSession::HandleBankerActivateOpcode(WorldPacket& recvData)
{
ObjectGuid guid;
LOG_DEBUG("network", "WORLD: Received CMSG_BANKER_ACTIVATE");
recvData >> guid;
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_BANKER);
if (!unit)
{
LOG_DEBUG("network", "WORLD: HandleBankerActivateOpcode - Unit (%s) not found or you can not interact with him.", guid.ToString().c_str());
return;
}
// remove fake death
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
SendShowBank(guid);
}
void WorldSession::SendShowBank(ObjectGuid guid)
{
WorldPacket data(SMSG_SHOW_BANK, 8);
data << guid;
m_currentBankerGUID = guid;
SendPacket(&data);
}
void WorldSession::SendShowMailBox(ObjectGuid guid)
{
WorldPacket data(SMSG_SHOW_MAILBOX, 8);