mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 02:23:53 +00:00
Allow only ID filtered topics for dialogue with creatures
This commit is contained in:
parent
82287445af
commit
9e00c6694f
1 changed files with 9 additions and 2 deletions
|
@ -19,12 +19,19 @@
|
||||||
|
|
||||||
bool MWDialogue::Filter::testActor (const ESM::DialInfo& info) const
|
bool MWDialogue::Filter::testActor (const ESM::DialInfo& info) const
|
||||||
{
|
{
|
||||||
|
bool isCreature = (mActor.getTypeName() != typeid (ESM::NPC).name());
|
||||||
|
|
||||||
// actor id
|
// actor id
|
||||||
if (!info.mActor.empty())
|
if (!info.mActor.empty())
|
||||||
|
{
|
||||||
if ( Misc::StringUtils::lowerCase (info.mActor)!=MWWorld::Class::get (mActor).getId (mActor))
|
if ( Misc::StringUtils::lowerCase (info.mActor)!=MWWorld::Class::get (mActor).getId (mActor))
|
||||||
return false;
|
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
|
// NPC race
|
||||||
if (!info.mRace.empty())
|
if (!info.mRace.empty())
|
||||||
|
|
Loading…
Reference in a new issue