1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

SpellSchool: use identifier instead of int

Needs redifinition of MAGIC_SCHOOL_SKILL in all mods
This commit is contained in:
Konstantin P
2023-05-05 21:28:07 +03:00
committed by Konstantin
parent 8600e3035a
commit 057a33c508
24 changed files with 93 additions and 65 deletions

View File

@@ -50,6 +50,7 @@ namespace GameConstants
constexpr int CREATURES_PER_TOWN = 7; //without upgrades
constexpr int SPELL_LEVELS = 5;
constexpr int SPELL_SCHOOL_LEVELS = 4;
constexpr int DEFAULT_SCHOOLS = 4;
constexpr int CRE_LEVELS = 10; // number of creature experience levels
constexpr int HERO_GOLD_COST = 2500;
@@ -1296,14 +1297,17 @@ class Obstacle : public BaseForID<Obstacle, si32>
DLL_LINKAGE static Obstacle fromString(const std::string & identifier);
};
enum class ESpellSchool: ui8
enum class ESpellSchool: int8_t
{
ANY = -1,
AIR = 0,
FIRE = 1,
WATER = 2,
EARTH = 3
EARTH = 3,
};
using SpellSchool = Identifier<ESpellSchool>;
enum class EMetaclass: ui8
{
INVALID = 0,