mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:53:52 +00:00
fixes for class selection merge
This commit is contained in:
parent
f8b96703e6
commit
e404d71e4f
1 changed files with 18 additions and 9 deletions
|
@ -649,17 +649,22 @@ namespace MWGui
|
||||||
} };
|
} };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace MWGui
|
||||||
|
{
|
||||||
|
|
||||||
|
struct ClassPoint
|
||||||
|
{
|
||||||
|
const char *id;
|
||||||
|
// Specialization points to match, in order: Stealth, Combat, Magic
|
||||||
|
// Note: Order is taken from http://www.uesp.net/wiki/Morrowind:Class_Quiz
|
||||||
|
int points[3];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
void WindowManager::showClassQuestionDialog()
|
void WindowManager::showClassQuestionDialog()
|
||||||
{
|
{
|
||||||
if (generateClassStep == generateClassSteps.size())
|
if (generateClassStep == generateClassSteps.size())
|
||||||
{
|
{
|
||||||
struct ClassPoint
|
|
||||||
{
|
|
||||||
const char *id;
|
|
||||||
// Specialization points to match, in order: Stealth, Combat, Magic
|
|
||||||
// Note: Order is taken from http://www.uesp.net/wiki/Morrowind:Class_Quiz
|
|
||||||
int points[3];
|
|
||||||
};
|
|
||||||
|
|
||||||
static boost::array<ClassPoint, 23> classes = { {
|
static boost::array<ClassPoint, 23> classes = { {
|
||||||
{"Acrobat", {6, 2, 2}},
|
{"Acrobat", {6, 2, 2}},
|
||||||
|
@ -709,7 +714,12 @@ void WindowManager::showClassQuestionDialog()
|
||||||
else if (generateClassSpecializations[2] >= 7)
|
else if (generateClassSpecializations[2] >= 7)
|
||||||
generateClass = "Mage";
|
generateClass = "Mage";
|
||||||
else
|
else
|
||||||
throw new std::exception("Failed to deduce class from chosen answers in generate class dialog");
|
{
|
||||||
|
std::cerr
|
||||||
|
<< "Failed to deduce class from chosen answers in generate class dialog"
|
||||||
|
<< std::endl;
|
||||||
|
generateClass = "Thief";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (generateClassResultDialog)
|
if (generateClassResultDialog)
|
||||||
|
@ -834,7 +844,6 @@ void WindowManager::onCreateClassDialogDone()
|
||||||
{
|
{
|
||||||
if (createClassDialog)
|
if (createClassDialog)
|
||||||
{
|
{
|
||||||
// TODO: The ESM::Class should have methods to set these values to ensure correct data is assigned
|
|
||||||
ESM::Class klass;
|
ESM::Class klass;
|
||||||
klass.name = createClassDialog->getName();
|
klass.name = createClassDialog->getName();
|
||||||
klass.description = createClassDialog->getDescription();
|
klass.description = createClassDialog->getDescription();
|
||||||
|
|
Loading…
Reference in a new issue