diff options
| author | Duarte Duarte <dnpd.dd@gmail.com> | 2015-03-19 21:14:55 +0000 |
|---|---|---|
| committer | Duarte Duarte <dnpd.dd@gmail.com> | 2015-03-19 21:14:55 +0000 |
| commit | f024287521697166fc2ef193d71791949ebbdf9c (patch) | |
| tree | 35a518f0321424b7533d8444ed534c6cc1308435 /src/server/game/Server/Packets | |
| parent | b3a279b6abd2325bb0ebb2c1b2818001679f5c7e (diff) | |
| parent | 478e86c074cc9c6a19f6c83d2a265eb1ccd705fc (diff) | |
Merge pull request #14403 from Luzifix/opcode-banksystem
Core/PacketIO: Banksystem
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__ |
