mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 00:35:23 +00:00
This commit is contained in:
parent
77a2179d1e
commit
7a9b64c6f4
@ -1,15 +1,23 @@
|
||||
|
||||
#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)
|
||||
{
|
||||
MWBase::Environment::get().getDialogueManager()->startDialogue (getTarget());
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user