1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 15:15:31 +00:00

Save and load birthsigns

This commit is contained in:
David Cernat 2016-09-02 06:57:13 +03:00
parent ff94b5f1ac
commit dafc6c0843

View file

@ -525,8 +525,10 @@ bool LocalPlayer::CharGenThread() // ToDo: need fix
if (GetNetworking()->isConnected() && CharGenStage()->current == CharGenStage()->end &&
CharGenStage()->end != 0)
{
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
MWBase::World *world = MWBase::Environment::get().getWorld();
MWWorld::Ptr player = world->getPlayerPtr();
(*Npc()) = *player.get<ESM::NPC>()->mBase;
(*BirthSign()) = world->getPlayer().getBirthSign();
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "%s", "Sending ID_GAME_BASE_INFO to server with my CharGen info");
GetNetworking()->GetPacket(ID_GAME_BASE_INFO)->Send(this);
@ -581,6 +583,8 @@ void LocalPlayer::updateChar()
Npc()->mHair
);
MWBase::Environment::get().getMechanicsManager()->setPlayerBirthsign(*BirthSign());
MWBase::Environment::get().getWindowManager()->getInventoryWindow()->rebuildAvatar();
}