public static void Callback(Mobile from, object target, object craftState)
        {
            string     errorMessage = null;
            CraftState cs           = craftState as CraftState;

            try
            {
                if (target is BaseWeapon)
                {
                    SpellCraft.ApplyAttribute(from, cs.Book, cs.Id, (BaseWeapon)target, AosWeaponAttribute.HitLowerDefend, m_Minimum, m_Maximum, 2);
                }

                else
                {
                    errorMessage = SpellCraft.AssembleMessage(SpellCraft.MsgNums.Weapons);
                }
            }
            catch (SpellCraftException e)
            {
                errorMessage = e.ToString();
            }
            finally
            {
                if (null != errorMessage)
                {
                    from.SendMessage(errorMessage);
                }
            }
        }
Beispiel #2
0
        public static void Callback(Mobile from, object target, object craftState)
        {
            string     errorMessage = null;
            CraftState cs           = craftState as CraftState;

            try
            {
                if (target is BaseArmor)
                {
                    SpellCraft.ApplyAttribute(from, cs.Book, cs.Id, (BaseArmor)target, AosAttribute.ReflectPhysical, m_Minimum, m_Maximum);
                }

                else if (target is BaseHat)
                {
                    SpellCraft.ApplyAttribute(from, cs.Book, cs.Id, (BaseHat)target, AosAttribute.ReflectPhysical, m_Minimum, m_Maximum);
                }

                else
                {
                    errorMessage = SpellCraft.AssembleMessage(SpellCraft.MsgNums.ArmorComma, SpellCraft.MsgNums.ShieldsComma, SpellCraft.MsgNums.AndHats);
                }
            }
            catch (SpellCraftException e)
            {
                errorMessage = e.ToString();
            }
            finally
            {
                if (null != errorMessage)
                {
                    from.SendMessage(errorMessage);
                }
            }
        }
        public static void Callback(Mobile from, object target, object craftState)
        {
            string     errorMessage = null;
            CraftState cs           = craftState as CraftState;

            try
            {
                if (target is BaseShield)
                {
                    SpellCraft.ApplyAttribute(from, cs.Book, cs.Id, (BaseShield)target, AosAttribute.SpellChanneling, m_Minimum, m_Maximum);
                    SpellCraft.AdjustFastCast((BaseShield)target);                              // Chance for a penalty to fc
                }
                if (target is BaseWeapon)
                {
                    SpellCraft.ApplyAttribute(from, cs.Book, cs.Id, (BaseWeapon)target, AosAttribute.SpellChanneling, m_Minimum, m_Maximum);
                    SpellCraft.AdjustFastCast((BaseWeapon)target);                              // Chance for a penalty to fc
                }
                else
                {
                    errorMessage = SpellCraft.AssembleMessage(SpellCraft.MsgNums.Shields, SpellCraft.MsgNums.AndWeapons);
                }
            }
            catch (SpellCraftException e)
            {
                errorMessage = e.ToString();
            }
            finally
            {
                if (null != errorMessage)
                {
                    from.SendMessage(errorMessage);
                }
            }
        }
Beispiel #4
0
        public static void Callback(Mobile from, object target, object craftState)
        {
            string     errorMessage = null;
            CraftState cs           = craftState as CraftState;

            try
            {
                if (target is BaseWeapon)
                {
                    SpellCraft.ApplyAttribute(from, cs.Book, cs.Id, (BaseWeapon)target, AosAttribute.WeaponDamage, m_Minimum, m_Maximum);
                }

                else if (target is BaseJewel)
                {
                    SpellCraft.ApplyAttribute(from, cs.Book, cs.Id, (BaseJewel)target, AosAttribute.WeaponDamage, m_Minimum, m_Maximum);
                }

                else
                {
                    errorMessage = SpellCraft.AssembleMessage(SpellCraft.MsgNums.ArmorComma, SpellCraft.MsgNums.HatsComma, SpellCraft.MsgNums.AndJewelry);
                }
            }
            catch (SpellCraftException e)
            {
                errorMessage = e.ToString();
            }
            finally
            {
                if (null != errorMessage)
                {
                    from.SendMessage(errorMessage);
                }
            }
        }
Beispiel #5
0
        public static void Callback(Mobile from, object target, object craftState)
        {
            string     errorMessage = null;
            CraftState cs           = craftState as CraftState;

            try
            {
                if (target is BaseArmor)
                {
                    SpellCraft.ApplyResistance(from, cs.Book, cs.Id, (BaseArmor)target, ResistanceType.Physical, m_Minimum, m_Maximum);
                }

                else if (target is BaseWeapon)
                {
                    SpellCraft.ApplyAttribute(from, cs.Book, cs.Id, (BaseWeapon)target, AosWeaponAttribute.ResistPhysicalBonus, m_Minimum, m_Maximum);
                }

                else if (target is BaseHat)
                {
                    SpellCraft.ApplyAttribute(from, cs.Book, cs.Id, (BaseHat)target, AosElementAttribute.Physical, m_Minimum, m_Maximum);
                }

                else if (target is BaseJewel)
                {
                    SpellCraft.ApplyAttribute(from, cs.Book, cs.Id, (BaseJewel)target, AosElementAttribute.Physical, m_Minimum, m_Maximum);
                }

                else
                {
                    errorMessage = SpellCraft.AssembleMessage(SpellCraft.MsgNums.ArmorComma, SpellCraft.MsgNums.ShieldsComma, SpellCraft.MsgNums.WeaponsComma, SpellCraft.MsgNums.HatsComma, SpellCraft.MsgNums.AndJewelry);
                }
            }
            catch (SpellCraftException e)
            {
                errorMessage = e.ToString();
            }
            finally
            {
                if (null != errorMessage)
                {
                    from.SendMessage(errorMessage);
                }
            }
        }