mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-13 21:40:11 +00:00
Use localized faction name when using TFH
This commit is contained in:
parent
f0b73e0a27
commit
f75f9cb337
@ -652,19 +652,22 @@ namespace MWGui
|
|||||||
std::string ret;
|
std::string ret;
|
||||||
ret += getMiscString(cellref.getOwner(), "Owner");
|
ret += getMiscString(cellref.getOwner(), "Owner");
|
||||||
const std::string factionId = cellref.getFaction();
|
const std::string factionId = cellref.getFaction();
|
||||||
ret += getMiscString(factionId, "Faction");
|
if (!factionId.empty())
|
||||||
if (!factionId.empty() && cellref.getFactionRank() >= 0)
|
|
||||||
{
|
{
|
||||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
const ESM::Faction *fact = store.get<ESM::Faction>().search(factionId);
|
const ESM::Faction *fact = store.get<ESM::Faction>().search(factionId);
|
||||||
if (fact != nullptr)
|
if (fact != nullptr)
|
||||||
{
|
{
|
||||||
int rank = cellref.getFactionRank();
|
ret += getMiscString(fact->mName.empty() ? factionId : fact->mName, "Owner Faction");
|
||||||
const std::string rankName = fact->mRanks[rank];
|
if (cellref.getFactionRank() >= 0)
|
||||||
if (rankName.empty())
|
{
|
||||||
ret += getValueString(cellref.getFactionRank(), "Rank");
|
int rank = cellref.getFactionRank();
|
||||||
else
|
const std::string rankName = fact->mRanks[rank];
|
||||||
ret += getMiscString(rankName, "Rank");
|
if (rankName.empty())
|
||||||
|
ret += getValueString(cellref.getFactionRank(), "Rank");
|
||||||
|
else
|
||||||
|
ret += getMiscString(rankName, "Rank");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user