forked from mirror/openmw-tes3mp
Don't show hidden factions in StatsWindow (e.g. Nerevarine)
This commit is contained in:
parent
3b3b53d665
commit
6a882e1e8d
1 changed files with 15 additions and 5 deletions
|
@ -454,20 +454,30 @@ namespace MWGui
|
|||
|
||||
if (!mFactions.empty())
|
||||
{
|
||||
// Add a line separator if there are items above
|
||||
if (!mSkillWidgets.empty())
|
||||
addSeparator(coord1, coord2);
|
||||
|
||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||
const MWMechanics::NpcStats &PCstats = player.getClass().getNpcStats(player);
|
||||
const std::set<std::string> &expelled = PCstats.getExpelled();
|
||||
|
||||
addGroup(MWBase::Environment::get().getWindowManager()->getGameSettingString("sFaction", "Faction"), coord1, coord2);
|
||||
bool firstFaction=true;
|
||||
FactionList::const_iterator end = mFactions.end();
|
||||
for (FactionList::const_iterator it = mFactions.begin(); it != end; ++it)
|
||||
{
|
||||
const ESM::Faction *faction =
|
||||
store.get<ESM::Faction>().find(it->first);
|
||||
if (faction->mData.mIsHidden == 1)
|
||||
continue;
|
||||
|
||||
if (firstFaction)
|
||||
{
|
||||
// Add a line separator if there are items above
|
||||
if (!mSkillWidgets.empty())
|
||||
addSeparator(coord1, coord2);
|
||||
|
||||
addGroup(MWBase::Environment::get().getWindowManager()->getGameSettingString("sFaction", "Faction"), coord1, coord2);
|
||||
|
||||
firstFaction = false;
|
||||
}
|
||||
|
||||
MyGUI::Widget* w = addItem(faction->mName, coord1, coord2);
|
||||
|
||||
std::string text;
|
||||
|
|
Loading…
Reference in a new issue