mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 16:49:54 +00:00
Allow partial matches in NotCell condition (fixes #4459)
This commit is contained in:
parent
70dec71c00
commit
8376c8c68e
1 changed files with 5 additions and 4 deletions
|
@ -491,10 +491,11 @@ bool MWDialogue::Filter::getSelectStructBoolean (const SelectWrapper& select) co
|
|||
return !Misc::StringUtils::ciEqual(mActor.get<ESM::NPC>()->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<ESM::NPC>()->mBase->mFlags & ESM::NPC::Female)==
|
||||
|
|
Loading…
Reference in a new issue