1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Added hacks fot spell scroll support.

This commit is contained in:
AlexVinS
2016-02-13 19:43:05 +03:00
parent 7106c5d1af
commit e0af4a665a
8 changed files with 85 additions and 48 deletions

View File

@ -1443,6 +1443,13 @@ void CGArtifact::writeJsonOptions(JsonNode& json) const
{
CCreatureSet::writeJson(json["guards"]);
json["guardMessage"].String() = message;
if(ID == Obj::SPELL_SCROLL)
{
const Bonus * b = storedArtifact->getBonusLocalFirst(Selector::type(Bonus::SPELL));
SpellID spellId(b->subtype);
json["spell"].String() = SpellID(b->subtype).toSpell()->identifier;
}
}
void CGArtifact::readJsonOptions(const JsonNode& json)