summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/ea/tradehandler.cpp7
-rw-r--r--src/net/ea/tradehandler.h3
2 files changed, 9 insertions, 1 deletions
diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp
index fbb7a5629..482179bd1 100644
--- a/src/net/ea/tradehandler.cpp
+++ b/src/net/ea/tradehandler.cpp
@@ -78,8 +78,13 @@ void TradeHandler::processTradeResponse(Net::MessageIn &msg) const
respond(false);
return;
}
+ const uint8_t type = msg.readUInt8("type");
+ processTradeResponseContinue(type);
+}
- switch (msg.readUInt8())
+void TradeHandler::processTradeResponseContinue(const uint8_t type) const
+{
+ switch (type)
{
case 0: // Too far away
NotifyManager::notify(NotifyTypes::TRADE_FAIL_FAR_AWAY,
diff --git a/src/net/ea/tradehandler.h b/src/net/ea/tradehandler.h
index f8534d117..585e9f1bd 100644
--- a/src/net/ea/tradehandler.h
+++ b/src/net/ea/tradehandler.h
@@ -43,6 +43,7 @@ class TradeHandler notfinal : public Net::TradeHandler
void removeItem(const int slotNum,
const int amount) const override final;
+ protected:
void processTradeResponse(Net::MessageIn &msg) const;
static void processTradeItemAddResponse(Net::MessageIn &msg);
@@ -54,6 +55,8 @@ class TradeHandler notfinal : public Net::TradeHandler
static void processTradeComplete(Net::MessageIn &msg);
void processTradeRequestContinue(const std::string &partner) const;
+
+ void processTradeResponseContinue(const uint8_t type) const;
};
} // namespace Ea