Browse Source

All new spells will be possible to spawn in town magic guilds.

DjWarmonger 11 years ago
parent
commit
0347c61dd2
2 changed files with 8 additions and 1 deletions
  1. 3 1
      lib/GameConstants.h
  2. 5 0
      lib/mapping/MapFormatH3M.cpp

+ 3 - 1
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)

+ 5 - 0
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();