diff options
| author | Luzifix <luzifix19@gmail.com> | 2015-03-18 23:00:25 +0100 |
|---|---|---|
| committer | Luzifix <luzifix19@gmail.com> | 2015-03-19 00:10:26 +0100 |
| commit | 478e86c074cc9c6a19f6c83d2a265eb1ccd705fc (patch) | |
| tree | 0a870482696b95ac89c719a0f9682b08047f3f68 /src/server/game/Server/Packets | |
| parent | 4ee22e3c5e8feeb0f6e9d388e03908eb0aa927c1 (diff) | |
Core/PacketIO: Create BankHandler & Bank opcode Structure
Thx @gigi1237 for search Opcodes
Thx @Nayd to help with InvUpdate & InvItem Structure
Diffstat (limited to 'src/server/game/Server/Packets')
| -rw-r--r-- | src/server/game/Server/Packets/BankPackets.cpp | 38 | ||||
| -rw-r--r-- | src/server/game/Server/Packets/BankPackets.h | 65 |
2 files changed, 103 insertions, 0 deletions
diff --git a/src/server/game/Server/Packets/BankPackets.cpp b/src/server/game/Server/Packets/BankPackets.cpp new file mode 100644 index 00000000000..0f6af30bed0 --- /dev/null +++ b/src/server/game/Server/Packets/BankPackets.cpp @@ -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; +} diff --git a/src/server/game/Server/Packets/BankPackets.h b/src/server/game/Server/Packets/BankPackets.h new file mode 100644 index 00000000000..dc7883c3643 --- /dev/null +++ b/src/server/game/Server/Packets/BankPackets.h @@ -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__ |
