mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
- Fixed special spells spawning in Pyramid
- Allowed new spells to spawn in Pyramid
This commit is contained in:
parent
0347c61dd2
commit
1d6e265e34
@ -864,7 +864,7 @@ public:
|
||||
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,
|
||||
|
||||
AFTER_LAST = 82
|
||||
FIRST_NON_SPELL = 70, AFTER_LAST = 82
|
||||
};
|
||||
|
||||
SpellID(ESpellID _num = NONE) : num(_num)
|
||||
|
@ -690,8 +690,8 @@ void CMapLoaderH3M::readAllowedArtifacts()
|
||||
|
||||
void CMapLoaderH3M::readAllowedSpellsAbilities()
|
||||
{
|
||||
// Read allowed spells
|
||||
map->allowedSpell.resize(GameConstants::SPELLS_QUANTITY, true);
|
||||
// Read allowed spells, including new ones
|
||||
map->allowedSpell.resize(VLC->spellh->objects.size(), true);
|
||||
|
||||
// Read allowed abilities
|
||||
map->allowedAbilities.resize(GameConstants::SKILL_QUANTITY, true);
|
||||
@ -706,6 +706,11 @@ void CMapLoaderH3M::readAllowedSpellsAbilities()
|
||||
const int abil_bytes = 4;
|
||||
readBitmask(map->allowedAbilities, abil_bytes, GameConstants::SKILL_QUANTITY);
|
||||
}
|
||||
|
||||
//do not generate special abilities and spells
|
||||
for (auto spell : VLC->spellh->objects)
|
||||
if (spell->isSpecialSpell() || spell->isCreatureAbility())
|
||||
map->allowedSpell[spell->id] = false;
|
||||
}
|
||||
|
||||
void CMapLoaderH3M::readRumors()
|
||||
|
Loading…
Reference in New Issue
Block a user