From 53cc3c86f2b5040cec577145feff9db2c93bd268 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 17 May 2015 02:48:54 +0300 Subject: Fix some issues after automatic checks. --- src/actions/actions.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'src/actions/actions.cpp') 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) -- cgit v1.2.3-60-g2f50