public override void PopulateFromJson(JObject jsonObject)
 {
     this.PopulateFromJson(jsonObject);
     m_maxSpellInHand = Serialization.JsonTokenValue <int>(jsonObject, "maxSpellInHand", 7);
     m_fightType      = (FightType)Serialization.JsonTokenValue <int>(jsonObject, "fightType", 0);
     m_playersPerTeam = Serialization.JsonTokenValue <int>(jsonObject, "playersPerTeam", 0);
     m_fightsCount    = Serialization.JsonTokenValue <int>(jsonObject, "fightsCount", 0);
     m_versusAI       = Serialization.JsonTokenValue <bool>(jsonObject, "versusAI", false);
     m_additionalData = IFightAdditionalDataDefinitionUtils.FromJsonProperty(jsonObject, "additionalData");
 }
Example #2
0
        public static IFightAdditionalDataDefinition FromJsonProperty(JObject jsonObject, string propertyName, IFightAdditionalDataDefinition defaultValue = null)
        {
            //IL_0011: Unknown result type (might be due to invalid IL or missing references)
            //IL_0018: Invalid comparison between Unknown and I4
            JProperty val = jsonObject.Property(propertyName);

            if (val == null || (int)val.get_Value().get_Type() == 10)
            {
                return(defaultValue);
            }
            return(FromJsonToken(val.get_Value()));
        }