mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 15:41:13 -04: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 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…
x
Reference in New Issue
Block a user