@@ -341,6 +341,9 @@ void CGObjectInstance::serializeJsonOptions(JsonSerializeFormat & handler)
void CGObjectInstance::serializeJsonOwner(JsonSerializeFormat & handler)
{
+ if(handler.saving && tempOwner == PlayerColor::NEUTRAL)
+ return;
+
ui8 temp = tempOwner.getNum();
handler.serializeEnum("owner", temp, PlayerColor::NEUTRAL.getNum(), GameConstants::PLAYER_COLOR_NAMES);
@@ -118,7 +118,10 @@ void Initializer::initialize(CGHeroInstance * o)
o->tempOwner = defaultPlayer;
if(o->ID == Obj::PRISON)
+ {
+ o->subID = 0;
o->tempOwner = PlayerColor::NEUTRAL;
+ }
if(o->ID == Obj::HERO)