Skip to content

Commit

Permalink
Merge branch 'nocliffracerschooling' into 'master'
Browse files Browse the repository at this point in the history
Editor: Remove Training service for creatures

See merge request OpenMW/openmw!3396
  • Loading branch information
psi29a committed Sep 6, 2023
2 parents 690a237 + 16cc1ad commit 5a0a046
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions apps/opencs/model/world/refidadapterimp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,18 @@ QVariant CSMWorld::CreatureRefIdAdapter::getData(const RefIdColumn* column, cons
if (column == mColumns.mBloodType)
return record.get().mBloodType;

std::map<const RefIdColumn*, unsigned int>::const_iterator iter = mColumns.mFlags.find(column);
{
std::map<const RefIdColumn*, unsigned int>::const_iterator iter = mColumns.mFlags.find(column);

if (iter != mColumns.mFlags.end())
return (record.get().mFlags & iter->second) != 0;
if (iter != mColumns.mFlags.end())
return (record.get().mFlags & iter->second) != 0;
}

{
std::map<const RefIdColumn*, unsigned int>::const_iterator iter = mColumns.mServices.find(column);
if (iter != mColumns.mServices.end() && iter->second == ESM::NPC::Training)
return QVariant();
}

return ActorRefIdAdapter<ESM::Creature>::getData(column, data, index);
}
Expand Down

0 comments on commit 5a0a046

Please sign in to comment.