This reverts commit 7a9b64c6f4.
This commit is contained in:
mrcheko 2013-12-13 19:02:25 +02:00
parent 7a9b64c6f4
commit c8bf69b91a

View file

@ -1,23 +1,15 @@
#include "actiontalk.hpp"
#include "class.hpp"
#include "../mwbase/environment.hpp"
#include "../mwbase/dialoguemanager.hpp"
#include "../mwmechanics/creaturestats.hpp"
namespace MWWorld
{
ActionTalk::ActionTalk (const Ptr& actor) : Action (false, actor) {}
void ActionTalk::executeImp (const Ptr& actor)
{
MWWorld::Ptr talkTo = getTarget(); //because 'actor' is always the player!
if ( MWWorld::Class::get(talkTo).getCreatureStats(talkTo).isHostile() )
return;
MWBase::Environment::get().getDialogueManager()->startDialogue (talkTo);
MWBase::Environment::get().getDialogueManager()->startDialogue (getTarget());
}
}