public override void PopulateFromJson(JObject jsonObject)
        {
            base.PopulateFromJson(jsonObject);
            m_randomly = Serialization.JsonTokenValue <bool>(jsonObject, "randomly", true);
            m_count    = DynamicValue.FromJsonProperty(jsonObject, "count");
            JArray val = Serialization.JsonArray(jsonObject, "discardSpellFilters");

            m_discardSpellFilters = new List <SpellFilter>((val != null) ? val.get_Count() : 0);
            if (val != null)
            {
                foreach (JToken item in val)
                {
                    m_discardSpellFilters.Add(SpellFilter.FromJsonToken(item));
                }
            }
            JArray val2 = Serialization.JsonArray(jsonObject, "drawSpellFilters");

            m_drawSpellFilters = new List <SpellFilter>((val2 != null) ? val2.get_Count() : 0);
            if (val2 != null)
            {
                foreach (JToken item2 in val2)
                {
                    m_drawSpellFilters.Add(SpellFilter.FromJsonToken(item2));
                }
            }
        }
Esempio n. 2
0
        public override void PopulateFromJson(JObject jsonObject)
        {
            base.PopulateFromJson(jsonObject);
            m_count = DynamicValue.FromJsonProperty(jsonObject, "count");
            JArray val = Serialization.JsonArray(jsonObject, "spellFilters");

            m_spellFilters = new List <SpellFilter>((val != null) ? val.get_Count() : 0);
            if (val != null)
            {
                foreach (JToken item in val)
                {
                    m_spellFilters.Add(SpellFilter.FromJsonToken(item));
                }
            }
        }