mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
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())
|
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();
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||||
const MWMechanics::NpcStats &PCstats = player.getClass().getNpcStats(player);
|
const MWMechanics::NpcStats &PCstats = player.getClass().getNpcStats(player);
|
||||||
const std::set<std::string> &expelled = PCstats.getExpelled();
|
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();
|
FactionList::const_iterator end = mFactions.end();
|
||||||
for (FactionList::const_iterator it = mFactions.begin(); it != end; ++it)
|
for (FactionList::const_iterator it = mFactions.begin(); it != end; ++it)
|
||||||
{
|
{
|
||||||
const ESM::Faction *faction =
|
const ESM::Faction *faction =
|
||||||
store.get<ESM::Faction>().find(it->first);
|
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);
|
MyGUI::Widget* w = addItem(faction->mName, coord1, coord2);
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
Loading…
Reference in a new issue