mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/PacketIO: Delete old guild bank swap item structures and handler
This commit is contained in:
@@ -277,30 +277,6 @@ void WorldSession::HandleGuildBankWithdrawMoney(WorldPackets::Guild::GuildBankWi
|
||||
guild->HandleMemberWithdrawMoney(this, packet.Money);
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankSwapItems(WorldPackets::Guild::GuildBankSwapItems& packet)
|
||||
{
|
||||
if (!GetPlayer()->GetGameObjectIfCanInteractWith(packet.Banker, GAMEOBJECT_TYPE_GUILD_BANK))
|
||||
return;
|
||||
|
||||
Guild* guild = GetPlayer()->GetGuild();
|
||||
if (!guild)
|
||||
return;
|
||||
|
||||
if (packet.BankOnly)
|
||||
{
|
||||
guild->SwapItems(GetPlayer(), packet.BankTab1, packet.BankSlot1, packet.BankTab, packet.BankSlot, packet.StackCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Player <-> Bank
|
||||
// Allow to work with inventory only
|
||||
if (!Player::IsInventoryPos(packet.ContainerSlot, packet.ContainerItemSlot) && !packet.AutoStore)
|
||||
GetPlayer()->SendEquipError(EQUIP_ERR_INTERNAL_BAG_ERROR, nullptr);
|
||||
else
|
||||
guild->SwapItemsWithInventory(GetPlayer(), packet.ToSlot != 0, packet.BankTab, packet.BankSlot, packet.ContainerSlot, packet.ContainerItemSlot, packet.StackCount);
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleGuildBankBuyTab(WorldPackets::Guild::GuildBankBuyTab& packet)
|
||||
{
|
||||
TC_LOG_DEBUG("guild", "CMSG_GUILD_BANK_BUY_TAB [%s]: [%s[, TabId: %u", GetPlayerInfo().c_str(), packet.Banker.ToString().c_str(), packet.BankTab);
|
||||
|
||||
Reference in New Issue
Block a user