|
|
|
@ -652,19 +652,22 @@ namespace MWGui
|
|
|
|
|
std::string ret;
|
|
|
|
|
ret += getMiscString(cellref.getOwner(), "Owner");
|
|
|
|
|
const std::string factionId = cellref.getFaction();
|
|
|
|
|
ret += getMiscString(factionId, "Faction");
|
|
|
|
|
if (!factionId.empty() && cellref.getFactionRank() >= 0)
|
|
|
|
|
if (!factionId.empty())
|
|
|
|
|
{
|
|
|
|
|
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
|
|
|
|
const ESM::Faction *fact = store.get<ESM::Faction>().search(factionId);
|
|
|
|
|
if (fact != nullptr)
|
|
|
|
|
{
|
|
|
|
|
int rank = cellref.getFactionRank();
|
|
|
|
|
const std::string rankName = fact->mRanks[rank];
|
|
|
|
|
if (rankName.empty())
|
|
|
|
|
ret += getValueString(cellref.getFactionRank(), "Rank");
|
|
|
|
|
else
|
|
|
|
|
ret += getMiscString(rankName, "Rank");
|
|
|
|
|
ret += getMiscString(fact->mName.empty() ? factionId : fact->mName, "Owner Faction");
|
|
|
|
|
if (cellref.getFactionRank() >= 0)
|
|
|
|
|
{
|
|
|
|
|
int rank = cellref.getFactionRank();
|
|
|
|
|
const std::string rankName = fact->mRanks[rank];
|
|
|
|
|
if (rankName.empty())
|
|
|
|
|
ret += getValueString(cellref.getFactionRank(), "Rank");
|
|
|
|
|
else
|
|
|
|
|
ret += getMiscString(rankName, "Rank");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|