summaryrefslogtreecommitdiff
path: root/src/actions/actions.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-01 18:07:14 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-02 00:13:44 +0300
commitc8c51d7550adf9c952a4be54398df7e7a6f341a8 (patch)
tree4404d6d2a86c820661cb29f8c67abefeefd54810 /src/actions/actions.cpp
parent30f142d6a147885afef203cdc83326cccdb4bb75 (diff)
downloadmanaverse-c8c51d7550adf9c952a4be54398df7e7a6f341a8.tar.gz
manaverse-c8c51d7550adf9c952a4be54398df7e7a6f341a8.tar.bz2
manaverse-c8c51d7550adf9c952a4be54398df7e7a6f341a8.tar.xz
manaverse-c8c51d7550adf9c952a4be54398df7e7a6f341a8.zip
add buy dialog for vending shop.
Diffstat (limited to 'src/actions/actions.cpp')
-rw-r--r--src/actions/actions.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 036f107b8..6290c0d37 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -80,7 +80,9 @@
#include "net/mercenaryhandler.h"
#include "net/npchandler.h"
#include "net/playerhandler.h"
+#include "net/serverfeatures.h"
#include "net/uploadcharinfo.h"
+#include "net/vendinghandler.h"
#include "net/tradehandler.h"
#include "resources/iteminfo.h"
@@ -605,7 +607,7 @@ impHandler(buy)
{
const std::string args = event.args;
Being *being = findBeing(args);
- if (!being)
+ if (!being && !serverFeatures->haveVending())
{
const std::set<std::string> &players = whoIsOnline->getOnlineNicks();
if (players.find(args) != players.end())
@@ -623,7 +625,10 @@ impHandler(buy)
}
else if (being->getType() == ActorType::Player)
{
- buySellHandler->requestSellList(being->getName());
+ if (serverFeatures->haveVending())
+ vendingHandler->open(being);
+ else
+ buySellHandler->requestSellList(being->getName());
return true;
}
return false;