diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-09 17:01:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-09 17:01:40 +0300 |
commit | c3762a4826dbe920d0ced389233173454d2f93a4 (patch) | |
tree | de1dca9dfc06a4e2c9d12f28d235aadfa72cc507 /src/net/ea/tradehandler.cpp | |
parent | 38d50ac6a85f25d5e80eb9024fda5975d9561094 (diff) | |
download | manaplus-c3762a4826dbe920d0ced389233173454d2f93a4.tar.gz manaplus-c3762a4826dbe920d0ced389233173454d2f93a4.tar.bz2 manaplus-c3762a4826dbe920d0ced389233173454d2f93a4.tar.xz manaplus-c3762a4826dbe920d0ced389233173454d2f93a4.zip |
Split processTradeResponse into functions with netcode and without.
Diffstat (limited to 'src/net/ea/tradehandler.cpp')
-rw-r--r-- | src/net/ea/tradehandler.cpp | 7 |
1 files changed, 6 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, |