diff --git a/apps/openmw/mwgui/levelupdialog.cpp b/apps/openmw/mwgui/levelupdialog.cpp index d8f12bcbb..099132b8b 100644 --- a/apps/openmw/mwgui/levelupdialog.cpp +++ b/apps/openmw/mwgui/levelupdialog.cpp @@ -120,19 +120,10 @@ namespace MWGui setAttributeValues(); // set class image - const ESM::Class& playerClass = *MWBase::Environment::get().getWorld ()->getPlayer ().getClass (); - // retrieve the ID to this class - std::string classId; - const MWWorld::Store &classes = - MWBase::Environment::get().getWorld()->getStore().get(); - - MWWorld::Store::iterator it = classes.begin(); - for (; it != classes.end(); ++it) - { - if (playerClass.mName == it->mName) - classId = it->mId; - } - mClassImage->setImageTexture ("textures\\levelup\\" + classId + ".dds"); + const ESM::Class *cls = + MWBase::Environment::get().getWorld ()->getPlayer ().getClass (); + + mClassImage->setImageTexture ("textures\\levelup\\" + cls->mId + ".dds"); /// \todo replace this with INI-imported texts int level = creatureStats.getLevel ()+1;