Esempio n. 1
0
        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, "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));
                }
            }
        }
        public override void UpdateModifications(ref GaugesModification modifications, PlayerStatus player, DynamicValueContext context)
        {
            this.value.GetValue(context, out int value);
            CastTargetContext castTargetContext = context as CastTargetContext;

            if (castTargetContext != null)
            {
                if (!RuntimeData.spellDefinitions.TryGetValue(castTargetContext.spellDefinitionId, out SpellDefinition value2))
                {
                    Log.Error($"Could not find spell definition with id {castTargetContext.spellDefinitionId}.", 69, "C:\\BuildAgents\\AgentB\\work\\cub_client_win64_develop\\client\\DofusCube.Unity\\Assets\\Core\\Code\\Data\\Costs\\ActionPointsCost.cs");
                    return;
                }
                value = SpellCostModification.ApplyCostModification(player.spellCostModifiers, value, value2, castTargetContext);
            }
            modifications.Increment(CaracId.ActionPoints, -value);
        }
Esempio n. 3
0
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_dice    = DynamicValue.FromJsonProperty(jsonObject, "dice");
     m_thrower = ISingleEntitySelectorUtils.FromJsonProperty(jsonObject, "thrower");
 }
Esempio n. 4
0
 public void PopulateFromJson(JObject jsonObject)
 {
     m_count = DynamicValue.FromJsonProperty(jsonObject, "count");
 }
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_value = DynamicValue.FromJsonProperty(jsonObject, "value");
 }
Esempio n. 6
0
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_minIncluded = DynamicValue.FromJsonProperty(jsonObject, "minIncluded");
     m_maxIncluded = DynamicValue.FromJsonProperty(jsonObject, "maxIncluded");
 }
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_newValue = DynamicValue.FromJsonProperty(jsonObject, "newValue");
     m_source   = ISingleEntitySelectorUtils.FromJsonProperty(jsonObject, "source");
 }
Esempio n. 8
0
 public void PopulateFromJson(JObject jsonObject)
 {
     m_element = (CaracId)Serialization.JsonTokenValue <int>(jsonObject, "element", 0);
     m_value   = DynamicValue.FromJsonProperty(jsonObject, "value");
 }
Esempio n. 9
0
 public override void PopulateFromJson(JObject jsonObject)
 {
     base.PopulateFromJson(jsonObject);
     m_value     = DynamicValue.FromJsonProperty(jsonObject, "value");
     m_initiator = ISingleEntitySelectorUtils.FromJsonProperty(jsonObject, "initiator");
 }
Esempio n. 10
0
        public static DynamicValue FromJsonProperty(JObject jsonObject, string propertyName, DynamicValue 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()));
        }