public CastSpellAction(Recipe recipe, int repeat, RepeatCalculationType repeatType)
     : this()
 {
     Recipe     = recipe;
     Repeat     = new DynamicProperty <int>("Repeat", this, repeat.ToString(CultureInfo.InvariantCulture));
     Entry      = new DynamicProperty <uint>("Entry", this, recipe.SpellId.ToString(CultureInfo.InvariantCulture));
     RepeatType = repeatType;
     //Properties["Recipe"].Show = true;
     Properties["SpellName"].Value = SpellName;
     PB.UpdateMaterials();
 }
        // check tradeskill list if spell is a recipe the player knows and updates Recipe if so.

        public void CheckTradeskillList()
        {
            if (PB.IsTradeSkillsLoaded)
            {
                Recipe =
                    PB.TradeSkillList.Where(t => t.KnownRecipes.ContainsKey(Entry)).Select(t => t.KnownRecipes[Entry]).
                    FirstOrDefault();
                if (IsRecipe)
                {
                    //Properties["Recipe"].Show = true;
                    Properties["SpellName"].Value = SpellName;
                    PB.UpdateMaterials();
                }
                else
                {
                    //Properties["Recipe"].Show = false;
                    Properties["SpellName"].Value = SpellName;
                }
            }
        }
 private void CastSpellActionPropertyChanged(object sender, MetaPropArgs e)
 {
     IsDone = false;
     PB.UpdateMaterials();
 }