mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-18 13:12:50 +00:00
Allow only ID filtered topics for dialogue with creatures
This commit is contained in:
parent
82287445af
commit
9e00c6694f
@ -19,12 +19,19 @@
|
||||
|
||||
bool MWDialogue::Filter::testActor (const ESM::DialInfo& info) const
|
||||
{
|
||||
bool isCreature = (mActor.getTypeName() != typeid (ESM::NPC).name());
|
||||
|
||||
// actor id
|
||||
if (!info.mActor.empty())
|
||||
{
|
||||
if ( Misc::StringUtils::lowerCase (info.mActor)!=MWWorld::Class::get (mActor).getId (mActor))
|
||||
return false;
|
||||
|
||||
bool isCreature = (mActor.getTypeName() != typeid (ESM::NPC).name());
|
||||
}
|
||||
else if (isCreature)
|
||||
{
|
||||
// Creatures must not have topics aside of those specific to their id
|
||||
return false;
|
||||
}
|
||||
|
||||
// NPC race
|
||||
if (!info.mRace.empty())
|
||||
|
Loading…
x
Reference in New Issue
Block a user