mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 10:23:52 +00:00
Text defines for npc race, class, and faction should use the translated name
This commit is contained in:
parent
dd57eabc3e
commit
c07b3ea61d
2 changed files with 7 additions and 4 deletions
|
@ -215,19 +215,22 @@ namespace MWScript
|
|||
std::string InterpreterContext::getNPCRace() const
|
||||
{
|
||||
ESM::NPC npc = *mReference.get<ESM::NPC>()->mBase;
|
||||
return npc.mRace;
|
||||
const ESM::Race* race = MWBase::Environment::get().getWorld()->getStore().get<ESM::Race>().find(npc.mRace);
|
||||
return race->mName;
|
||||
}
|
||||
|
||||
std::string InterpreterContext::getNPCClass() const
|
||||
{
|
||||
ESM::NPC npc = *mReference.get<ESM::NPC>()->mBase;
|
||||
return npc.mClass;
|
||||
const ESM::Class* class_ = MWBase::Environment::get().getWorld()->getStore().get<ESM::Class>().find(npc.mClass);
|
||||
return class_->mName;
|
||||
}
|
||||
|
||||
std::string InterpreterContext::getNPCFaction() const
|
||||
{
|
||||
ESM::NPC npc = *mReference.get<ESM::NPC>()->mBase;
|
||||
return npc.mFaction;
|
||||
const ESM::Faction* faction = MWBase::Environment::get().getWorld()->getStore().get<ESM::Faction>().find(npc.mFaction);
|
||||
return faction->mName;
|
||||
}
|
||||
|
||||
std::string InterpreterContext::getNPCRank() const
|
||||
|
|
Loading…
Reference in a new issue