summaryrefslogtreecommitdiff
path: root/src/net/ea/buysellrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-01-30 19:34:16 +0300
committerAndrei Karas <akaras@inbox.ru>2017-01-30 20:39:49 +0300
commitc76cb084b9c995fba9a19fbdb5f23d479f67a115 (patch)
treea1b493adb2f7a21bbabb5b0178733f9082b3983c /src/net/ea/buysellrecv.cpp
parent5f8496ca103fabb4cfc265d8d936e194129a17ef (diff)
downloadplus-c76cb084b9c995fba9a19fbdb5f23d479f67a115.tar.gz
plus-c76cb084b9c995fba9a19fbdb5f23d479f67a115.tar.bz2
plus-c76cb084b9c995fba9a19fbdb5f23d479f67a115.tar.xz
plus-c76cb084b9c995fba9a19fbdb5f23d479f67a115.zip
Move BuySellRecv::processNpcBuyResponse from ea namespace into eathena and tmwa.
In eathena version remove access to buy dialog, because anyway it must not exists at this time.
Diffstat (limited to 'src/net/ea/buysellrecv.cpp')
-rw-r--r--src/net/ea/buysellrecv.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/net/ea/buysellrecv.cpp b/src/net/ea/buysellrecv.cpp
index 9ecaa5bbc..359e08038 100644
--- a/src/net/ea/buysellrecv.cpp
+++ b/src/net/ea/buysellrecv.cpp
@@ -90,39 +90,4 @@ void BuySellRecv::processNpcSell(Net::MessageIn &msg)
}
}
-void BuySellRecv::processNpcBuyResponse(Net::MessageIn &msg)
-{
- const uint8_t response = msg.readUInt8("response");
- if (response == 0U)
- {
- NotifyManager::notify(NotifyTypes::BUY_DONE);
- return;
- }
- // Reset player money since buy dialog already assumed purchase
- // would go fine
- if (Ea::BuySellRecv::mBuyDialog)
- {
- Ea::BuySellRecv::mBuyDialog->setMoney(
- PlayerInfo::getAttribute(Attributes::MONEY));
- }
- switch (response)
- {
- case 1:
- NotifyManager::notify(NotifyTypes::BUY_FAILED_NO_MONEY);
- break;
-
- case 2:
- NotifyManager::notify(NotifyTypes::BUY_FAILED_OVERWEIGHT);
- break;
-
- case 3:
- NotifyManager::notify(NotifyTypes::BUY_FAILED_TOO_MANY_ITEMS);
- break;
-
- default:
- NotifyManager::notify(NotifyTypes::BUY_FAILED);
- break;
- };
-}
-
} // namespace Ea