File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828#include " SpellMgr.h"
2929#include " SocialMgr.h"
3030#include " TradeData.h"
31+ #include " TradePackets.h"
3132#include " World.h"
3233#include " WorldPacket.h"
3334
@@ -578,7 +579,7 @@ void WorldSession::SendCancelTrade(TradeStatus status)
578579 SendTradeStatus (info);
579580}
580581
581- void WorldSession::HandleCancelTradeOpcode (WorldPacket & /* recvPacket */ )
582+ void WorldSession::HandleCancelTradeOpcode (WorldPackets::Trade::CancelTrade & /* cancelTrade */ )
582583{
583584 // sended also after LOGOUT COMPLETE
584585 if (_player) // needed because STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT
Original file line number Diff line number Diff line change 4040#include "SystemPackets.h"
4141#include "TalentPackets.h"
4242#include "TotemPackets.h"
43+ #include "TradePackets.h"
4344#include "WorldStatePackets.h"
4445
4546#endif // AllPackets_h__
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
3+ *
4+ * This program is free software; you can redistribute it and/or modify it
5+ * under the terms of the GNU General Public License as published by the
6+ * Free Software Foundation; either version 2 of the License, or (at your
7+ * option) any later version.
8+ *
9+ * This program is distributed in the hope that it will be useful, but WITHOUT
10+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12+ * more details.
13+ *
14+ * You should have received a copy of the GNU General Public License along
15+ * with this program. If not, see <http://www.gnu.org/licenses/>.
16+ */
17+
18+ #ifndef TRINITYCORE_TRADE_PACKETS_H
19+ #define TRINITYCORE_TRADE_PACKETS_H
20+
21+ #include " Packet.h"
22+
23+ namespace WorldPackets
24+ {
25+ namespace Trade
26+ {
27+ class CancelTrade final : public ClientPacket
28+ {
29+ public:
30+ explicit CancelTrade (WorldPacket&& packet) : ClientPacket(CMSG_CANCEL_TRADE, std::move(packet)) { }
31+
32+ void Read () override { }
33+ };
34+ }
35+ }
36+
37+ #endif // TRINITYCORE_TRADE_PACKETS_H
Original file line number Diff line number Diff line change @@ -271,6 +271,11 @@ namespace WorldPackets
271271 {
272272 class TotemDestroyed ;
273273 }
274+
275+ namespace Trade
276+ {
277+ class CancelTrade ;
278+ }
274279}
275280
276281enum AccountDataType
@@ -899,7 +904,7 @@ class TC_GAME_API WorldSession
899904 void HandleAcceptTradeOpcode (WorldPacket& recvPacket);
900905 void HandleBeginTradeOpcode (WorldPacket& recvPacket);
901906 void HandleBusyTradeOpcode (WorldPacket& recvPacket);
902- void HandleCancelTradeOpcode (WorldPacket& recvPacket );
907+ void HandleCancelTradeOpcode (WorldPackets::Trade::CancelTrade& cancelTrade );
903908 void HandleClearTradeItemOpcode (WorldPacket& recvPacket);
904909 void HandleIgnoreTradeOpcode (WorldPacket& recvPacket);
905910 void HandleInitiateTradeOpcode (WorldPacket& recvPacket);
You can’t perform that action at this time.
0 commit comments