summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/enums/magicschool.h4
-rw-r--r--src/gui/models/magicschoolmodel.h10
2 files changed, 10 insertions, 4 deletions
diff --git a/src/enums/magicschool.h b/src/enums/magicschool.h
index 0299adf08..019ed53c6 100644
--- a/src/enums/magicschool.h
+++ b/src/enums/magicschool.h
@@ -26,6 +26,7 @@
#include "enums/simpletypes/enumdefines.h"
+// These IDs are from world/map/db/const-magic.txt in TMW serverdata.
enumStart(MagicSchool)
{
SkillMagic = 340,
@@ -33,7 +34,8 @@ enumStart(MagicSchool)
SkillMagicWar = 342,
SkillMagicTransmute = 343,
SkillMagicNature = 344,
- SkillMagicAstral = 345
+ SkillMagicAstral = 345,
+ SkillMagicDark = 346
}
enumEnd(MagicSchool);
diff --git a/src/gui/models/magicschoolmodel.h b/src/gui/models/magicschoolmodel.h
index 7237b5eec..b91af6cda 100644
--- a/src/gui/models/magicschoolmodel.h
+++ b/src/gui/models/magicschoolmodel.h
@@ -30,7 +30,9 @@
#include "localconsts.h"
-const char *MAGIC_SCHOOL_TEXT[6] =
+#define NUM_ELEMENTS(a) sizeof(a) / sizeof(a[0])
+
+const char *MAGIC_SCHOOL_TEXT[] =
{
// TRANSLATORS: magic school
N_("General Magic"),
@@ -43,7 +45,9 @@ const char *MAGIC_SCHOOL_TEXT[6] =
// TRANSLATORS: magic school
N_("Nature Magic"),
// TRANSLATORS: magic school
- N_("Astral Magic")
+ N_("Astral Magic"),
+ // TRANSLATORS: magic school
+ N_("Dark Magic"),
};
class MagicSchoolModel final : public ListModel
@@ -57,7 +61,7 @@ class MagicSchoolModel final : public ListModel
int getNumberOfElements() override final
{
- return 6;
+ return NUM_ELEMENTS(MAGIC_SCHOOL_TEXT);
}
std::string getElementAt(int i) override final