Merge remote-tracking branch 'scrawl/master'

actorid
Marc Zinnschlag 12 years ago
commit c0260697c2

@ -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…
Cancel
Save