diff --git a/apps/openmw/mwdialogue/dialoguemanager.cpp b/apps/openmw/mwdialogue/dialoguemanager.cpp index 4f99d3a05..cbb48c6db 100644 --- a/apps/openmw/mwdialogue/dialoguemanager.cpp +++ b/apps/openmw/mwdialogue/dialoguemanager.cpp @@ -208,7 +208,17 @@ namespace MWDialogue return false; } - // TODO check actor faction + if (!info.npcFaction.empty()) + { + ESMS::LiveCellRef *cellRef = actor.get(); + + if (!cellRef) + return false; + + if (toLower (info.npcFaction)!=toLower (cellRef->base->faction)) + return false; + } + // TODO check player faction // check cell @@ -225,7 +235,6 @@ namespace MWDialogue std::cout << "unchecked entries:" << std::endl - << " actor faction: " << info.npcFaction << std::endl << " player faction: " << info.pcFaction << std::endl << " DATAstruct" << std::endl;