mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-13 21:40:11 +00:00
Use race/class names (instead of ID) in replaced escape sequences
This commit is contained in:
parent
ff74f687fb
commit
ba7086cadf
@ -252,15 +252,17 @@ namespace MWScript
|
|||||||
std::string InterpreterContext::getPCRace() const
|
std::string InterpreterContext::getPCRace() const
|
||||||
{
|
{
|
||||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||||
ESM::NPC player = *world->getPlayer().getPlayer().get<ESM::NPC>()->mBase;
|
std::string race = world->getPlayer().getPlayer().get<ESM::NPC>()->mBase->mRace;
|
||||||
return player.mRace;
|
const ESM::Race* _race = world->getStore().get<ESM::Race>().find(race);
|
||||||
|
return _race->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string InterpreterContext::getPCClass() const
|
std::string InterpreterContext::getPCClass() const
|
||||||
{
|
{
|
||||||
MWBase::World *world = MWBase::Environment::get().getWorld();
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||||
ESM::NPC player = *world->getPlayer().getPlayer().get<ESM::NPC>()->mBase;
|
std::string _class = world->getPlayer().getPlayer().get<ESM::NPC>()->mBase->mClass;
|
||||||
return player.mClass;
|
const ESM::Class* __class = world->getStore().get<ESM::Class>().find(_class);
|
||||||
|
return __class->mName;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string InterpreterContext::getPCRank() const
|
std::string InterpreterContext::getPCRank() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user