|
@@ -1660,15 +1660,23 @@ std::string CGShrine::getHoverText(const CGHeroInstance * hero) const
|
|
|
|
|
|
void CGShrine::writeJsonOptions(JsonNode& json) const
|
|
|
{
|
|
|
-
|
|
|
+ if(spell != SpellID::NONE)
|
|
|
+ {
|
|
|
+ json["spell"].String() = spell.toSpell()->identifier;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
void CGShrine::readJsonOptions(const JsonNode& json)
|
|
|
{
|
|
|
-
|
|
|
+ spell = SpellID::NONE;
|
|
|
+ if(json["spell"].String() != "")
|
|
|
+ {
|
|
|
+ auto raw = VLC->modh->identifiers.getIdentifier("core", "spell",json["spell"].String());
|
|
|
+ if(raw)
|
|
|
+ spell = SpellID(raw.get());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-
|
|
|
void CGSignBottle::initObj()
|
|
|
{
|
|
|
//if no text is set than we pick random from the predefined ones
|
|
@@ -2017,15 +2025,14 @@ void CGShipyard::onHeroVisit( const CGHeroInstance * h ) const
|
|
|
|
|
|
void CGShipyard::writeJsonOptions(JsonNode& json) const
|
|
|
{
|
|
|
-
|
|
|
+ CGObjectInstance::writeOwner(json);
|
|
|
}
|
|
|
|
|
|
void CGShipyard::readJsonOptions(const JsonNode& json)
|
|
|
{
|
|
|
-
|
|
|
+ CGObjectInstance::readOwner(json);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
void CCartographer::onHeroVisit( const CGHeroInstance * h ) const
|
|
|
{
|
|
|
//if player has not bought map of this subtype yet and underground exist for stalagmite cartographer
|