diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-01 18:07:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-02 00:13:44 +0300 |
commit | c8c51d7550adf9c952a4be54398df7e7a6f341a8 (patch) | |
tree | 4404d6d2a86c820661cb29f8c67abefeefd54810 /src/actions | |
parent | 30f142d6a147885afef203cdc83326cccdb4bb75 (diff) | |
download | plus-c8c51d7550adf9c952a4be54398df7e7a6f341a8.tar.gz plus-c8c51d7550adf9c952a4be54398df7e7a6f341a8.tar.bz2 plus-c8c51d7550adf9c952a4be54398df7e7a6f341a8.tar.xz plus-c8c51d7550adf9c952a4be54398df7e7a6f341a8.zip |
add buy dialog for vending shop.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/actions.cpp | 9 |
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; |