mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-28 20:06:41 +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
|
std::string InterpreterContext::getNPCRace() const
|
||||||
{
|
{
|
||||||
ESM::NPC npc = *mReference.get<ESM::NPC>()->mBase;
|
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
|
std::string InterpreterContext::getNPCClass() const
|
||||||
{
|
{
|
||||||
ESM::NPC npc = *mReference.get<ESM::NPC>()->mBase;
|
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
|
std::string InterpreterContext::getNPCFaction() const
|
||||||
{
|
{
|
||||||
ESM::NPC npc = *mReference.get<ESM::NPC>()->mBase;
|
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
|
std::string InterpreterContext::getNPCRank() const
|
||||||
|
|
|
@ -89,7 +89,7 @@ namespace MWScript
|
||||||
virtual std::string getNPCClass() const;
|
virtual std::string getNPCClass() const;
|
||||||
|
|
||||||
virtual std::string getNPCFaction() const;
|
virtual std::string getNPCFaction() const;
|
||||||
|
|
||||||
virtual std::string getNPCRank() const;
|
virtual std::string getNPCRank() const;
|
||||||
|
|
||||||
virtual std::string getPCName() const;
|
virtual std::string getPCName() const;
|
||||||
|
|
Loading…
Reference in a new issue