Reject conditions testing agaist Choice when not currently in a choice (Fixes #3117)

openmw-38
scrawl 9 years ago
parent 0333c40047
commit a9f0f30bb8

@ -155,10 +155,13 @@ bool MWDialogue::Filter::testDisposition (const ESM::DialInfo& info, bool invert
bool MWDialogue::Filter::testSelectStruct (const SelectWrapper& select) const
{
if (select.isNpcOnly() && (mActor.getTypeName() != typeid (ESM::NPC).name()))
// If the actor is a creature, we do not test the conditions applicable
// only to NPCs.
// If the actor is a creature, we pass all conditions only applicable to NPCs.
return true;
if (select.getFunction() == SelectWrapper::Function_Choice && mChoice == -1)
// If not currently in a choice, we reject all conditions that test against choices.
return false;
switch (select.getType())
{
case SelectWrapper::Type_None: return true;

Loading…
Cancel
Save