mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Merge pull request #14403 from Luzifix/opcode-banksystem
Core/PacketIO: Banksystem
This commit is contained in:
172
src/server/game/Handlers/BankHandler.cpp
Normal file
172
src/server/game/Handlers/BankHandler.cpp
Normal file
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "BankPackets.h"
|
||||
#include "NPCPackets.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Opcodes.h"
|
||||
#include "Player.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
void WorldSession::HandleAutoBankItemOpcode(WorldPackets::Bank::AutoBankItem& packet)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "STORAGE: receive bag = %u, slot = %u", packet.Bag, packet.Slot);
|
||||
|
||||
if (!CanUseBank())
|
||||
{
|
||||
TC_LOG_ERROR("network", "WORLD: HandleAutoBankItemOpcode - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Item* item = _player->GetItemByPos(packet.Bag, packet.Slot);
|
||||
if (!item)
|
||||
return;
|
||||
|
||||
ItemPosCountVec dest;
|
||||
InventoryResult msg = _player->CanBankItem(NULL_BAG, NULL_SLOT, dest, item, false);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
_player->SendEquipError(msg, item, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (dest.size() == 1 && dest[0].pos == item->GetPos())
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_CANT_SWAP, item, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
_player->RemoveItem(packet.Bag, packet.Slot, true);
|
||||
_player->ItemRemovedQuestCheck(item->GetEntry(), item->GetCount());
|
||||
_player->BankItem(dest, item, true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleBankerActivateOpcode(WorldPackets::NPC::Hello& packet)
|
||||
{
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(packet.Unit, UNIT_NPC_FLAG_BANKER);
|
||||
if (!unit)
|
||||
{
|
||||
TC_LOG_ERROR("network", "WORLD: HandleBankerActivateOpcode - %s not found or you can not interact with him.", packet.Unit.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
// remove fake death
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
// set currentBankerGUID for other bank action
|
||||
|
||||
SendShowBank(packet.Unit);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAutoStoreBankItemOpcode(WorldPackets::Bank::AutoStoreBankItem& packet)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "STORAGE: receive bag = %u, slot = %u", packet.Bag, packet.Slot);
|
||||
|
||||
if (!CanUseBank())
|
||||
{
|
||||
TC_LOG_ERROR("network", "WORLD: HandleAutoStoreBankItemOpcode - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Item* item = _player->GetItemByPos(packet.Bag, packet.Slot);
|
||||
if (!item)
|
||||
return;
|
||||
|
||||
if (_player->IsBankPos(packet.Bag, packet.Slot)) // moving from bank to inventory
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
InventoryResult msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, dest, item, false);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
_player->SendEquipError(msg, item, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
_player->RemoveItem(packet.Bag, packet.Slot, true);
|
||||
if (Item const* storedItem = _player->StoreItem(dest, item, true))
|
||||
_player->ItemAddedQuestCheck(storedItem->GetEntry(), storedItem->GetCount());
|
||||
|
||||
}
|
||||
else // moving from inventory to bank
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
InventoryResult msg = _player->CanBankItem(NULL_BAG, NULL_SLOT, dest, item, false);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
_player->SendEquipError(msg, item, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
_player->RemoveItem(packet.Bag, packet.Slot, true);
|
||||
_player->BankItem(dest, item, true);
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::HandleBuyBankSlotOpcode(WorldPackets::Bank::BuyBankSlot& packet)
|
||||
{
|
||||
WorldPacket data(SMSG_BUY_BANK_SLOT_RESULT, 4);
|
||||
if (!CanUseBank(packet.Guid))
|
||||
{
|
||||
data << uint32(ERR_BANKSLOT_NOTBANKER);
|
||||
SendPacket(&data);
|
||||
TC_LOG_ERROR("network", "WORLD: HandleBuyBankSlotOpcode - %s not found or you can't interact with him.", packet.Guid.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 slot = _player->GetBankBagSlotCount();
|
||||
|
||||
// next slot
|
||||
++slot;
|
||||
|
||||
TC_LOG_INFO("network", "PLAYER: Buy bank bag slot, slot number = %u", slot);
|
||||
|
||||
BankBagSlotPricesEntry const* slotEntry = sBankBagSlotPricesStore.LookupEntry(slot);
|
||||
|
||||
if (!slotEntry)
|
||||
{
|
||||
data << uint32(ERR_BANKSLOT_FAILED_TOO_MANY);
|
||||
SendPacket(&data);
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 price = slotEntry->Cost;
|
||||
|
||||
if (!_player->HasEnoughMoney(uint64(price)))
|
||||
{
|
||||
data << uint32(ERR_BANKSLOT_INSUFFICIENT_FUNDS);
|
||||
SendPacket(&data);
|
||||
return;
|
||||
}
|
||||
|
||||
_player->SetBankBagSlotCount(slot);
|
||||
_player->ModifyMoney(-int64(price));
|
||||
|
||||
data << uint32(ERR_BANKSLOT_OK);
|
||||
SendPacket(&data);
|
||||
|
||||
_player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT);
|
||||
}
|
||||
|
||||
void WorldSession::SendShowBank(ObjectGuid guid)
|
||||
{
|
||||
m_currentBankerGUID = guid;
|
||||
WorldPackets::NPC::ShowBank packet;
|
||||
packet.Guid = guid;
|
||||
SendPacket(packet.Write());
|
||||
}
|
||||
@@ -741,140 +741,6 @@ void WorldSession::HandleAutoStoreBagItemOpcode(WorldPackets::Item::AutoStoreBag
|
||||
_player->StoreItem(dest, item, true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleBuyBankSlotOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: CMSG_BUY_BANK_SLOT");
|
||||
|
||||
ObjectGuid guid;
|
||||
recvPacket >> guid;
|
||||
|
||||
WorldPacket data(SMSG_BUY_BANK_SLOT_RESULT, 4);
|
||||
if (!CanUseBank(guid))
|
||||
{
|
||||
data << uint32(ERR_BANKSLOT_NOTBANKER);
|
||||
SendPacket(&data);
|
||||
TC_LOG_DEBUG("network", "WORLD: HandleBuyBankSlotOpcode - %s not found or you can't interact with him.", guid.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 slot = _player->GetBankBagSlotCount();
|
||||
|
||||
// next slot
|
||||
++slot;
|
||||
|
||||
TC_LOG_INFO("network", "PLAYER: Buy bank bag slot, slot number = %u", slot);
|
||||
|
||||
BankBagSlotPricesEntry const* slotEntry = sBankBagSlotPricesStore.LookupEntry(slot);
|
||||
|
||||
if (!slotEntry)
|
||||
{
|
||||
data << uint32(ERR_BANKSLOT_FAILED_TOO_MANY);
|
||||
SendPacket(&data);
|
||||
return;
|
||||
}
|
||||
|
||||
uint32 price = slotEntry->Cost;
|
||||
|
||||
if (!_player->HasEnoughMoney(uint64(price)))
|
||||
{
|
||||
data << uint32(ERR_BANKSLOT_INSUFFICIENT_FUNDS);
|
||||
SendPacket(&data);
|
||||
return;
|
||||
}
|
||||
|
||||
_player->SetBankBagSlotCount(slot);
|
||||
_player->ModifyMoney(-int64(price));
|
||||
|
||||
data << uint32(ERR_BANKSLOT_OK);
|
||||
SendPacket(&data);
|
||||
|
||||
_player->UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_BUY_BANK_SLOT);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAutoBankItemOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: CMSG_AUTOBANK_ITEM");
|
||||
uint8 srcbag, srcslot;
|
||||
|
||||
recvPacket >> srcbag >> srcslot;
|
||||
TC_LOG_DEBUG("network", "STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
|
||||
|
||||
if (!CanUseBank())
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: HandleAutoBankItemOpcode - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Item* pItem = _player->GetItemByPos(srcbag, srcslot);
|
||||
if (!pItem)
|
||||
return;
|
||||
|
||||
ItemPosCountVec dest;
|
||||
InventoryResult msg = _player->CanBankItem(NULL_BAG, NULL_SLOT, dest, pItem, false);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
_player->SendEquipError(msg, pItem, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (dest.size() == 1 && dest[0].pos == pItem->GetPos())
|
||||
{
|
||||
_player->SendEquipError(EQUIP_ERR_CANT_SWAP, pItem, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
_player->RemoveItem(srcbag, srcslot, true);
|
||||
_player->ItemRemovedQuestCheck(pItem->GetEntry(), pItem->GetCount());
|
||||
_player->BankItem(dest, pItem, true);
|
||||
}
|
||||
|
||||
void WorldSession::HandleAutoStoreBankItemOpcode(WorldPacket& recvPacket)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: CMSG_AUTOSTORE_BANK_ITEM");
|
||||
uint8 srcbag, srcslot;
|
||||
|
||||
recvPacket >> srcbag >> srcslot;
|
||||
TC_LOG_DEBUG("network", "STORAGE: receive srcbag = %u, srcslot = %u", srcbag, srcslot);
|
||||
|
||||
if (!CanUseBank())
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: HandleAutoStoreBankItemOpcode - Unit (%s) not found or you can't interact with him.", m_currentBankerGUID.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
Item* pItem = _player->GetItemByPos(srcbag, srcslot);
|
||||
if (!pItem)
|
||||
return;
|
||||
|
||||
if (_player->IsBankPos(srcbag, srcslot)) // moving from bank to inventory
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
InventoryResult msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, dest, pItem, false);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
_player->SendEquipError(msg, pItem, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
_player->RemoveItem(srcbag, srcslot, true);
|
||||
if (Item const* storedItem = _player->StoreItem(dest, pItem, true))
|
||||
_player->ItemAddedQuestCheck(storedItem->GetEntry(), storedItem->GetCount());
|
||||
}
|
||||
else // moving from inventory to bank
|
||||
{
|
||||
ItemPosCountVec dest;
|
||||
InventoryResult msg = _player->CanBankItem(NULL_BAG, NULL_SLOT, dest, pItem, false);
|
||||
if (msg != EQUIP_ERR_OK)
|
||||
{
|
||||
_player->SendEquipError(msg, pItem, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
_player->RemoveItem(srcbag, srcslot, true);
|
||||
_player->BankItem(dest, pItem, true);
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::SendEnchantmentLog(ObjectGuid target, ObjectGuid caster, uint32 itemId, uint32 enchantId)
|
||||
{
|
||||
WorldPacket data(SMSG_ENCHANTMENT_LOG, (8+8+4+4));
|
||||
|
||||
@@ -73,31 +73,6 @@ void WorldSession::SendTabardVendorActivate(ObjectGuid guid)
|
||||
SendPacket(packet.Write());
|
||||
}
|
||||
|
||||
void WorldSession::HandleBankerActivateOpcode(WorldPackets::NPC::Hello& packet)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: Received CMSG_BANKER_ACTIVATE");
|
||||
|
||||
Creature* unit = GetPlayer()->GetNPCIfCanInteractWith(packet.Unit, UNIT_NPC_FLAG_BANKER);
|
||||
if (!unit)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: HandleBankerActivateOpcode - %s not found or you can not interact with him.", packet.Unit.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
|
||||
// remove fake death
|
||||
if (GetPlayer()->HasUnitState(UNIT_STATE_DIED))
|
||||
GetPlayer()->RemoveAurasByType(SPELL_AURA_FEIGN_DEATH);
|
||||
|
||||
SendShowBank(packet.Unit);
|
||||
}
|
||||
|
||||
void WorldSession::SendShowBank(ObjectGuid guid)
|
||||
{
|
||||
WorldPackets::NPC::ShowBank packet;
|
||||
packet.Guid = guid;
|
||||
SendPacket(packet.Write());
|
||||
}
|
||||
|
||||
void WorldSession::SendShowMailBox(ObjectGuid guid)
|
||||
{
|
||||
WorldPacket data(SMSG_SHOW_MAILBOX, 8);
|
||||
|
||||
38
src/server/game/Server/Packets/BankPackets.cpp
Normal file
38
src/server/game/Server/Packets/BankPackets.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "BankPackets.h"
|
||||
#include "ItemPackets.h"
|
||||
|
||||
void WorldPackets::Bank::AutoBankItem::Read()
|
||||
{
|
||||
_worldPacket >> Inv
|
||||
>> Bag
|
||||
>> Slot;
|
||||
}
|
||||
|
||||
void WorldPackets::Bank::AutoStoreBankItem::Read()
|
||||
{
|
||||
_worldPacket >> Inv
|
||||
>> Bag
|
||||
>> Slot;
|
||||
}
|
||||
|
||||
void WorldPackets::Bank::BuyBankSlot::Read()
|
||||
{
|
||||
_worldPacket >> Guid;
|
||||
}
|
||||
65
src/server/game/Server/Packets/BankPackets.h
Normal file
65
src/server/game/Server/Packets/BankPackets.h
Normal file
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
* Free Software Foundation; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef BankPackets_h__
|
||||
#define BankPackets_h__
|
||||
|
||||
#include "ItemPackets.h"
|
||||
#include "Packet.h"
|
||||
#include "ObjectGuid.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
namespace WorldPackets
|
||||
{
|
||||
namespace Bank
|
||||
{
|
||||
class AutoBankItem final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
AutoBankItem(WorldPacket&& packet) : ClientPacket(CMSG_AUTOBANK_ITEM, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
WorldPackets::Item::InvUpdate Inv;
|
||||
uint8 Bag = 0;
|
||||
uint8 Slot = 0;
|
||||
};
|
||||
|
||||
class AutoStoreBankItem final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
AutoStoreBankItem(WorldPacket&& packet) : ClientPacket(CMSG_AUTOSTORE_BANK_ITEM, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
WorldPackets::Item::InvUpdate Inv;
|
||||
uint8 Bag = 0;
|
||||
uint8 Slot = 0;
|
||||
};
|
||||
|
||||
class BuyBankSlot final : public ClientPacket
|
||||
{
|
||||
public:
|
||||
BuyBankSlot(WorldPacket&& packet) : ClientPacket(CMSG_BUY_BANK_SLOT, std::move(packet)) { }
|
||||
|
||||
void Read() override;
|
||||
|
||||
ObjectGuid Guid;
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif // BankPackets_h__
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "WorldSession.h"
|
||||
#include "Packets/AchievementPackets.h"
|
||||
#include "Packets/AuctionHousePackets.h"
|
||||
#include "Packets/BankPackets.h"
|
||||
#include "Packets/BlackMarketPackets.h"
|
||||
#include "Packets/CharacterPackets.h"
|
||||
#include "Packets/ChannelPackets.h"
|
||||
@@ -178,12 +179,12 @@ void OpcodeTable::Initialize()
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_AUCTION_SELL_ITEM, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleAuctionSellItem );
|
||||
DEFINE_HANDLER(CMSG_AUTH_CONTINUED_SESSION, STATUS_NEVER, PROCESS_INPLACE, WorldPacket, &WorldSession::Handle_EarlyProccess);
|
||||
DEFINE_HANDLER(CMSG_AUTH_SESSION, STATUS_NEVER, PROCESS_INPLACE, WorldPacket, &WorldSession::Handle_EarlyProccess);
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_AUTOBANK_ITEM, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleAutoBankItemOpcode );
|
||||
DEFINE_HANDLER(CMSG_AUTOBANK_ITEM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Bank::AutoBankItem, &WorldSession::HandleAutoBankItemOpcode);
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_AUTOEQUIP_GROUND_ITEM, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
DEFINE_HANDLER(CMSG_AUTOEQUIP_ITEM, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Item::AutoEquipItem, &WorldSession::HandleAutoEquipItemOpcode);
|
||||
DEFINE_HANDLER(CMSG_AUTOEQUIP_ITEM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Item::AutoEquipItem, &WorldSession::HandleAutoEquipItemOpcode);
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_AUTOEQUIP_ITEM_SLOT, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleAutoEquipItemSlotOpcode );
|
||||
DEFINE_HANDLER(CMSG_AUTOSTORE_BAG_ITEM, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Item::AutoStoreBagItem, &WorldSession::HandleAutoStoreBagItemOpcode);
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_AUTOSTORE_BANK_ITEM, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleAutoStoreBankItemOpcode );
|
||||
DEFINE_HANDLER(CMSG_AUTOSTORE_BANK_ITEM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Bank::AutoStoreBankItem, &WorldSession::HandleAutoStoreBankItemOpcode);
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_AUTOSTORE_GROUND_ITEM, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
DEFINE_HANDLER(CMSG_AUTOSTORE_LOOT_ITEM, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Loot::AutoStoreLootItem, &WorldSession::HandleAutostoreLootItemOpcode);
|
||||
DEFINE_HANDLER(CMSG_BANKER_ACTIVATE, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::NPC::Hello, &WorldSession::HandleBankerActivateOpcode);
|
||||
@@ -228,7 +229,7 @@ void OpcodeTable::Initialize()
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_BUG_REPORT, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleBugReportOpcode );
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_BUSY_TRADE, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleBusyTradeOpcode );
|
||||
DEFINE_HANDLER(CMSG_BUY_BACK_ITEM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Item::BuyBackItem, &WorldSession::HandleBuybackItem);
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_BUY_BANK_SLOT, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleBuyBankSlotOpcode );
|
||||
DEFINE_HANDLER(CMSG_BUY_BANK_SLOT, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Bank::BuyBankSlot, &WorldSession::HandleBuyBankSlotOpcode);
|
||||
DEFINE_HANDLER(CMSG_BUY_ITEM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Item::BuyItem, &WorldSession::HandleBuyItemOpcode);
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_CAGE_BATTLE_PET, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_CALENDAR_ADD_EVENT, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, &WorldSession::HandleCalendarAddEvent );
|
||||
@@ -808,7 +809,7 @@ void OpcodeTable::Initialize()
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_SUSPEND_COMMS_ACK, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_SUSPEND_TOKEN_RESPONSE, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
DEFINE_HANDLER(CMSG_SWAP_INV_ITEM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Item::SwapInvItem, &WorldSession::HandleSwapInvItemOpcode);
|
||||
DEFINE_HANDLER(CMSG_SWAP_ITEM, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::Item::SwapItem, &WorldSession::HandleSwapItem);
|
||||
DEFINE_HANDLER(CMSG_SWAP_ITEM, STATUS_LOGGEDIN, PROCESS_THREADUNSAFE, WorldPackets::Item::SwapItem, &WorldSession::HandleSwapItem);
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_SWAP_SUB_GROUPS, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::HandleGroupSwapSubGroupOpcode );
|
||||
DEFINE_OPCODE_HANDLER_OLD(CMSG_SYNC_DANCE, STATUS_UNHANDLED, PROCESS_INPLACE, &WorldSession::Handle_NULL );
|
||||
DEFINE_HANDLER(CMSG_TABARD_VENDOR_ACTIVATE, STATUS_UNHANDLED, PROCESS_THREADUNSAFE, WorldPackets::NPC::Hello, &WorldSession::HandleTabardVendorActivateOpcode);
|
||||
|
||||
@@ -82,12 +82,12 @@ enum OpcodeClient : uint32
|
||||
CMSG_AUCTION_SELL_ITEM = 0xBADD,
|
||||
CMSG_AUTH_CONTINUED_SESSION = 0x1A72,
|
||||
CMSG_AUTH_SESSION = 0x1872,
|
||||
CMSG_AUTOBANK_ITEM = 0xBADD,
|
||||
CMSG_AUTOBANK_ITEM = 0x00C6,
|
||||
CMSG_AUTOEQUIP_GROUND_ITEM = 0xBADD,
|
||||
CMSG_AUTOEQUIP_ITEM = 0xBADD,
|
||||
CMSG_AUTOEQUIP_ITEM_SLOT = 0xBADD,
|
||||
CMSG_AUTOEQUIP_ITEM = 0x0235,
|
||||
CMSG_AUTOEQUIP_ITEM_SLOT = 0x00E5,
|
||||
CMSG_AUTOSTORE_BAG_ITEM = 0xBADD,
|
||||
CMSG_AUTOSTORE_BANK_ITEM = 0xBADD,
|
||||
CMSG_AUTOSTORE_BANK_ITEM = 0x00D5,
|
||||
CMSG_AUTOSTORE_GROUND_ITEM = 0xBADD,
|
||||
CMSG_AUTOSTORE_LOOT_ITEM = 0x0843,
|
||||
CMSG_BANKER_ACTIVATE = 0x0931,
|
||||
|
||||
@@ -90,6 +90,13 @@ namespace WorldPackets
|
||||
enum class ConnectToSerial : uint32;
|
||||
}
|
||||
|
||||
namespace Bank
|
||||
{
|
||||
class AutoBankItem;
|
||||
class AutoStoreBankItem;
|
||||
class BuyBankSlot;
|
||||
}
|
||||
|
||||
namespace BlackMarket
|
||||
{
|
||||
class BlackMarketOpen;
|
||||
@@ -1001,7 +1008,6 @@ class WorldSession
|
||||
|
||||
void HandleTabardVendorActivateOpcode(WorldPackets::NPC::Hello& packet);
|
||||
void HandleBankerActivateOpcode(WorldPackets::NPC::Hello& packet);
|
||||
void HandleBuyBankSlotOpcode(WorldPacket& recvPacket);
|
||||
void HandleTrainerListOpcode(WorldPackets::NPC::Hello& packet);
|
||||
void HandleTrainerBuySpellOpcode(WorldPacket& recvPacket);
|
||||
void HandlePetitionShowList(WorldPackets::Petition::PetitionShowList& packet);
|
||||
@@ -1045,6 +1051,11 @@ class WorldSession
|
||||
void HandleAuctionPlaceBid(WorldPacket& recvData);
|
||||
void HandleAuctionListPendingSales(WorldPacket& recvData);
|
||||
|
||||
// Bank
|
||||
void HandleAutoBankItemOpcode(WorldPackets::Bank::AutoBankItem& packet);
|
||||
void HandleAutoStoreBankItemOpcode(WorldPackets::Bank::AutoStoreBankItem& packet);
|
||||
void HandleBuyBankSlotOpcode(WorldPackets::Bank::BuyBankSlot& packet);
|
||||
|
||||
// Black Market
|
||||
void HandleBlackMarketOpen(WorldPackets::BlackMarket::BlackMarketOpen& packet);
|
||||
|
||||
@@ -1074,8 +1085,6 @@ class WorldSession
|
||||
void HandleAutoEquipItemSlotOpcode(WorldPacket& recvPacket);
|
||||
void HandleSwapItem(WorldPackets::Item::SwapItem& swapItem);
|
||||
void HandleBuybackItem(WorldPackets::Item::BuyBackItem& packet);
|
||||
void HandleAutoBankItemOpcode(WorldPacket& recvPacket);
|
||||
void HandleAutoStoreBankItemOpcode(WorldPacket& recvPacket);
|
||||
void HandleWrapItemOpcode(WorldPacket& recvPacket);
|
||||
|
||||
void HandleAttackSwingOpcode(WorldPackets::Combat::AttackSwing& packet);
|
||||
|
||||
Reference in New Issue
Block a user