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:
@ -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)
|
||||
|
Reference in New Issue
Block a user