Exemplo n.º 1
0
        public override void OnAdded(object parent)
        {
            if (parent is Mobile)
            {
                Mobile mob = (Mobile)parent;

                m_Attributes.AddStatBonuses(mob);
                m_AosSkillBonuses.AddTo(mob);

                BaseRanged ranged = mob.Weapon as BaseRanged;

                if (ranged != null)
                {
                    ranged.InvalidateProperties();
                }

                if (IsSetItem)
                {
                    m_SetEquipped = SetHelper.FullSetEquipped(mob, SetID, Pieces);

                    if (m_SetEquipped)
                    {
                        m_LastEquipped = true;
                        SetHelper.AddSetBonus(mob, SetID);
                    }
                }
            }
        }
Exemplo n.º 2
0
        public override void OnAdded(object parent)
        {
            if (parent is Mobile)
            {
                Mobile mob = (Mobile)parent;

                this.m_Attributes.AddStatBonuses(mob);
                this.m_AosSkillBonuses.AddTo(mob);

                BaseRanged ranged = mob.Weapon as BaseRanged;

                if (ranged != null)
                {
                    ranged.InvalidateProperties();
                }

                #region Mondain's Legacy Sets
                if (this.IsSetItem)
                {
                    this.m_SetEquipped = SetHelper.FullSetEquipped(mob, this.SetID, this.Pieces);

                    if (this.m_SetEquipped)
                    {
                        this.m_LastEquipped = true;
                        SetHelper.AddSetBonus(mob, this.SetID);
                    }
                }
                #endregion
            }
        }
Exemplo n.º 3
0
        public override void OnRemoved(object parent)
        {
            if (parent is Mobile)
            {
                Mobile mob = (Mobile)parent;

                //m_Attributes.RemoveStatBonuses( mob );

                BaseRanged ranged = mob.Weapon as BaseRanged;

                if (ranged != null)
                {
                    ranged.InvalidateProperties();
                }

                string modName = this.Serial.ToString();

                mob.RemoveStatMod(modName + "Str");
                mob.RemoveStatMod(modName + "Dex");
                mob.RemoveStatMod(modName + "Int");

                mob.CheckStatTimers();

                #region Mondain's Legacy Sets
                if (IsSetItem && m_SetEquipped)
                {
                    SetHelper.RemoveSetBonus(mob, SetID, this);
                }
                #endregion
            }
        }
Exemplo n.º 4
0
        public override void OnAdded(object parent)
        {
            if (parent is Mobile)
            {
                Mobile mob = (Mobile)parent;

                BaseRanged ranged = mob.Weapon as BaseRanged;

                if (ranged != null)
                {
                    ranged.InvalidateProperties();
                }

                #region Mondain's Legacy Sets
                if (IsSetItem)
                {
                    m_SetEquipped = SetHelper.FullSetEquipped(mob, SetID, Pieces);

                    if (m_SetEquipped)
                    {
                        m_LastEquipped = true;
                        SetHelper.AddSetBonus(mob, SetID);
                    }
                }
                #endregion
            }
        }
Exemplo n.º 5
0
        public override void OnRemoved(object parent)
        {
            if (parent is Mobile)
            {
                Mobile mob = (Mobile)parent;

                BaseRanged ranged = mob.Weapon as BaseRanged;

                if (ranged != null)
                {
                    ranged.InvalidateProperties();
                }

                string modName = this.Serial.ToString();

                mob.RemoveStatMod(modName + "Str");
                mob.RemoveStatMod(modName + "Dex");
                mob.RemoveStatMod(modName + "Int");

                mob.CheckStatTimers();

                if (IsSetItem ? m_SetEquipped : false)
                {
                    SetHelper.RemoveSetBonus(mob, SetID, this);
                }
            }
        }
Exemplo n.º 6
0
        public static void CutString( Mobile from, BaseRanged ranged )
        {
            BaseRangedModule module = ranged.BaseRangedModule;

            module.StringStrengthSelection = StringStrength.NoString;
            module.PullWeightSelection = PoundsPerPull.Zero;
            module.HasBowString = false;

            from.PlaySound( 0x248 );
            from.SendMessage( "You have just removed the string from your bow." );

            ranged.InvalidateProperties();
        }