diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-17 02:48:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-17 02:48:54 +0300 |
commit | 53cc3c86f2b5040cec577145feff9db2c93bd268 (patch) | |
tree | 44d3d91d85d9c10fbb8aa5636b0e72ebfea0c76f /src/actions | |
parent | 26f2c689298bb2077000b81ff3fe14328a89feb8 (diff) | |
download | manaverse-53cc3c86f2b5040cec577145feff9db2c93bd268.tar.gz manaverse-53cc3c86f2b5040cec577145feff9db2c93bd268.tar.bz2 manaverse-53cc3c86f2b5040cec577145feff9db2c93bd268.tar.xz manaverse-53cc3c86f2b5040cec577145feff9db2c93bd268.zip |
Fix some issues after automatic checks.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/actions.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index d2905a27e..7121b138d 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -639,6 +639,9 @@ impHandler(buy) return false; } + if (!being) + return false; + if (being->getType() == ActorType::Npc) { npcHandler->buy(being->getId()); @@ -672,6 +675,9 @@ impHandler(sell) return false; } + if (!being) + return false; + if (being->getType() == ActorType::Npc) { npcHandler->sell(being->getId()); @@ -696,15 +702,11 @@ impHandler(talk) if (!being) return false; - if (being) - { - if (being->canTalk()) - being->talkTo(); - else if (being->getType() == ActorType::Player) - new BuySellDialog(being->getName()); - return true; - } - return false; + if (being->canTalk()) + being->talkTo(); + else if (being->getType() == ActorType::Player) + new BuySellDialog(being->getName()); + return true; } impHandler0(stopAttack) |