diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-12-12 13:22:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-12 13:22:09 +0300 |
commit | 99b516c9b20e696ddf3897bff9bc6686debf0f5a (patch) | |
tree | 4fb1b322d7bdb000368b7a88aca5077a23dd840a /src/actions | |
parent | f9313f7f26efa7dbf9d5bc8036833c94b04ea08c (diff) | |
download | manaplus-99b516c9b20e696ddf3897bff9bc6686debf0f5a.tar.gz manaplus-99b516c9b20e696ddf3897bff9bc6686debf0f5a.tar.bz2 manaplus-99b516c9b20e696ddf3897bff9bc6686debf0f5a.tar.xz manaplus-99b516c9b20e696ddf3897bff9bc6686debf0f5a.zip |
Remove "pickup" popup menu handler.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/actions.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 86191d51c..93e160750 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -451,12 +451,21 @@ impHandler0(copyEquippedToOutfit) impHandler0(pickup) { - if (localPlayer) + if (!localPlayer) + return false; + + const std::string args = event.args; + if (args.empty()) { localPlayer->pickUpItems(); - return true; } - return false; + else + { + FloorItem *const item = actorManager->findItem(atoi(args.c_str())); + if (item) + localPlayer->pickUp(item); + } + return true; } static void doSit() |