mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 21:59:55 +00:00
Don't allow dialogue with werewolf NPCs
This commit is contained in:
parent
10d4da7994
commit
127add7623
1 changed files with 5 additions and 1 deletions
|
@ -885,6 +885,7 @@ namespace MWClass
|
|||
if(ptr.getRefData().getHandle() == "player")
|
||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(actor));
|
||||
|
||||
// Werewolfs can't activate NPCs
|
||||
if(actor.getClass().isNpc() && actor.getClass().getNpcStats(actor).isWerewolf())
|
||||
{
|
||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||
|
@ -895,6 +896,7 @@ namespace MWClass
|
|||
|
||||
return action;
|
||||
}
|
||||
|
||||
if(getCreatureStats(ptr).isDead())
|
||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionOpen(ptr, true));
|
||||
if(ptr.getClass().getCreatureStats(ptr).isHostile())
|
||||
|
@ -902,8 +904,10 @@ namespace MWClass
|
|||
if(getCreatureStats(actor).getStance(MWMechanics::CreatureStats::Stance_Sneak))
|
||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionOpen(ptr)); // stealing
|
||||
|
||||
// Can't talk to werewolfs
|
||||
if(ptr.getClass().isNpc() && ptr.getClass().getNpcStats(ptr).isWerewolf())
|
||||
return boost::shared_ptr<MWWorld::Action> (new MWWorld::FailedAction(""));
|
||||
return boost::shared_ptr<MWWorld::Action>(new MWWorld::ActionTalk(ptr));
|
||||
|
||||
}
|
||||
|
||||
MWWorld::ContainerStore& Npc::getContainerStore (const MWWorld::Ptr& ptr)
|
||||
|
|
Loading…
Reference in a new issue