forked from mirror/openmw-tes3mp
Reviewmenu: read name, race, class and birthsign from player stats (fixes bug #2628)
This commit is contained in:
parent
fb0c4700a4
commit
c93cf822c7
1 changed files with 14 additions and 4 deletions
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
#include "../mwworld/class.hpp"
|
#include "../mwworld/class.hpp"
|
||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
#include "../mwworld/player.hpp"
|
||||||
|
|
||||||
#include "textinput.hpp"
|
#include "textinput.hpp"
|
||||||
#include "race.hpp"
|
#include "race.hpp"
|
||||||
|
@ -230,10 +231,19 @@ namespace MWGui
|
||||||
MWBase::Environment::get().getWindowManager()->removeDialog(mReviewDialog);
|
MWBase::Environment::get().getWindowManager()->removeDialog(mReviewDialog);
|
||||||
mReviewDialog = 0;
|
mReviewDialog = 0;
|
||||||
mReviewDialog = new ReviewDialog();
|
mReviewDialog = new ReviewDialog();
|
||||||
mReviewDialog->setPlayerName(mPlayerName);
|
|
||||||
mReviewDialog->setRace(mPlayerRaceId);
|
MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||||
mReviewDialog->setClass(mPlayerClass);
|
|
||||||
mReviewDialog->setBirthSign(mPlayerBirthSignId);
|
const ESM::NPC *playerNpc = world->getPlayerPtr().get<ESM::NPC>()->mBase;
|
||||||
|
|
||||||
|
const MWWorld::Player player = world->getPlayer();
|
||||||
|
|
||||||
|
const ESM::Class *playerClass = world->getStore().get<ESM::Class>().find(playerNpc->mClass);
|
||||||
|
|
||||||
|
mReviewDialog->setPlayerName(playerNpc->mName);
|
||||||
|
mReviewDialog->setRace(playerNpc->mRace);
|
||||||
|
mReviewDialog->setClass(*playerClass);
|
||||||
|
mReviewDialog->setBirthSign(player.getBirthSign());
|
||||||
|
|
||||||
{
|
{
|
||||||
MWWorld::Ptr player = MWMechanics::getPlayer();
|
MWWorld::Ptr player = MWMechanics::getPlayer();
|
||||||
|
|
Loading…
Reference in a new issue