Issue #219: made all unimplemented filters return false

This commit is contained in:
Marc Zinnschlag 2012-11-10 11:42:03 +01:00
parent ceaf1677ce
commit d6961c0246
4 changed files with 8 additions and 3 deletions

View file

@ -168,7 +168,7 @@ namespace MWDialogue
} }
} }
return false; return true;
} }
bool DialogueManager::isMatching (const MWWorld::Ptr& actor, bool DialogueManager::isMatching (const MWWorld::Ptr& actor,

View file

@ -243,6 +243,10 @@ bool MWDialogue::Filter::getSelectStructBoolean (const SelectWrapper& select) co
switch (select.getFunction()) switch (select.getFunction())
{ {
case SelectWrapper::Function_False:
return false;
case SelectWrapper::Function_Id: case SelectWrapper::Function_Id:
return select.getName()==toLower (MWWorld::Class::get (mActor).getId (mActor)); return select.getName()==toLower (MWWorld::Class::get (mActor).getId (mActor));

View file

@ -69,7 +69,7 @@ MWDialogue::SelectWrapper::Function MWDialogue::SelectWrapper::decodeFunction()
case 67: case 68: case 69: case 70: return Function_AiSetting; case 67: case 68: case 69: case 70: return Function_AiSetting;
} }
return Function_None; return Function_False;
} }
MWDialogue::SelectWrapper::SelectWrapper (const ESM::DialInfo::SelectStruct& select) : mSelect (select) {} MWDialogue::SelectWrapper::SelectWrapper (const ESM::DialInfo::SelectStruct& select) : mSelect (select) {}
@ -136,6 +136,7 @@ MWDialogue::SelectWrapper::Type MWDialogue::SelectWrapper::getType() const
static const Function booleanFunctions[] = static const Function booleanFunctions[] =
{ {
Function_False,
Function_Id, Function_Faction, Function_Class, Function_Race, Function_Cell, Function_Id, Function_Faction, Function_Class, Function_Race, Function_Cell,
Function_SameFaction, Function_SameFaction,
Function_PcCommonDisease, Function_PcBlightDisease, Function_PcCorprus, Function_PcCommonDisease, Function_PcBlightDisease, Function_PcCorprus,

View file

@ -13,7 +13,7 @@ namespace MWDialogue
enum Function enum Function
{ {
Function_None, Function_None, Function_False,
Function_Journal, Function_Journal,
Function_Item, Function_Item,
Function_Dead, Function_Dead,