diff --git a/lib/GameConstants.h b/lib/GameConstants.h index 6b45a7e4b..85e54ec72 100644 --- a/lib/GameConstants.h +++ b/lib/GameConstants.h @@ -862,7 +862,9 @@ public: SUMMON_FIRE_ELEMENTAL=66, SUMMON_EARTH_ELEMENTAL=67, SUMMON_WATER_ELEMENTAL=68, SUMMON_AIR_ELEMENTAL=69, STONE_GAZE=70, POISON=71, BIND=72, DISEASE=73, PARALYZE=74, AGE=75, DEATH_CLOUD=76, THUNDERBOLT=77, - DISPEL_HELPFUL_SPELLS=78, DEATH_STARE=79, ACID_BREATH_DEFENSE=80, ACID_BREATH_DAMAGE=81 + DISPEL_HELPFUL_SPELLS=78, DEATH_STARE=79, ACID_BREATH_DEFENSE=80, ACID_BREATH_DAMAGE=81, + + AFTER_LAST = 82 }; SpellID(ESpellID _num = NONE) : num(_num) diff --git a/lib/mapping/MapFormatH3M.cpp b/lib/mapping/MapFormatH3M.cpp index 88b4a99fb..0c034d1d9 100644 --- a/lib/mapping/MapFormatH3M.cpp +++ b/lib/mapping/MapFormatH3M.cpp @@ -2151,6 +2151,11 @@ CGTownInstance * CMapLoaderH3M::readTown(int castleID) } } } + //add all spells from mods + for (int i = SpellID::AFTER_LAST; i < VLC->spellh->objects.size(); ++i) + { + nt->possibleSpells.push_back(SpellID(i)); + } // Read castle events int numberOfEvent = reader.readUInt32();