From 8376c8c68e39bab3f63faf9f2c3ada344d4bd62d Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Mon, 18 Jun 2018 03:23:07 +0300 Subject: [PATCH 1/2] Allow partial matches in NotCell condition (fixes #4459) --- apps/openmw/mwdialogue/filter.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwdialogue/filter.cpp b/apps/openmw/mwdialogue/filter.cpp index e8757e4a3..15020898f 100644 --- a/apps/openmw/mwdialogue/filter.cpp +++ b/apps/openmw/mwdialogue/filter.cpp @@ -491,10 +491,11 @@ bool MWDialogue::Filter::getSelectStructBoolean (const SelectWrapper& select) co return !Misc::StringUtils::ciEqual(mActor.get()->mBase->mRace, select.getName()); case SelectWrapper::Function_NotCell: - - return !Misc::StringUtils::ciEqual(MWBase::Environment::get().getWorld()->getCellName(mActor.getCell()) - , select.getName()); - + { + const std::string& actorCell = MWBase::Environment::get().getWorld()->getCellName(mActor.getCell()); + return !(actorCell.length() >= select.getName().length() + && Misc::StringUtils::ciEqual(actorCell.substr(0, select.getName().length()), select.getName())); + } case SelectWrapper::Function_SameGender: return (player.get()->mBase->mFlags & ESM::NPC::Female)== From 0cf2f6452b1a3dace0db5a98398afee971a3428d Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Mon, 18 Jun 2018 03:27:12 +0300 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe894e7fb..8e97435c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ Bug #4454: AI opens doors too slow Bug #4457: Item without CanCarry flag prevents shield autoequipping in dark areas Bug #4458: AiWander console command handles idle chances incorrectly + Bug #4459: NotCell dialogue condition doesn't support partial matches Feature #4256: Implement ToggleBorders (TB) console command Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results Feature #4222: 360° screenshots