mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-03 00:46:55 +02:00
[refactor] spell handling
* more config options for spells + mind immunity handled by config + direct damage immunity handled by config + immunity icon configurable - removed mind_spell flag * more use of new spell identifacation
This commit is contained in:
@ -672,7 +672,7 @@ CArtifactInstance * CMapLoaderH3M::createArtifact(int aid, int spellID /*= -1*/)
|
||||
}
|
||||
else
|
||||
{
|
||||
a = CArtifactInstance::createScroll(VLC->spellh->spells[spellID]);
|
||||
a = CArtifactInstance::createScroll(SpellID(spellID).toSpell());
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -1166,7 +1166,17 @@ void CMapLoaderH3M::readObjects()
|
||||
{
|
||||
CGShrine * shr = new CGShrine();
|
||||
nobj = shr;
|
||||
shr->spell = reader.readUInt8();
|
||||
ui8 raw_id = reader.readUInt8();
|
||||
|
||||
if (255 == raw_id)
|
||||
{
|
||||
shr->spell = SpellID(SpellID::NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
shr->spell = SpellID(raw_id);
|
||||
}
|
||||
|
||||
reader.skip(3);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user