Ejemplo n.º 1
0
        public override void ReceiveDamage(Mobile from, int damage, BreakableStatic.InteractionType interactionType)
        {
            base.ReceiveDamage(from, damage, interactionType);

            double hitPointsPercent = (double)HitPoints / (double)MaxHitPoints;

            if (m_NextDamageStateNotification > 0.05 && hitPointsPercent < m_NextDamageStateNotification && DisplayName != "")
            {
                foreach (NetState state in NetState.Instances)
                {
                    Mobile       mobile = state.Mobile;
                    PlayerMobile player = mobile as PlayerMobile;

                    if (player == null)
                    {
                        continue;
                    }

                    if (UOACZRegion.ContainsMobile(player))
                    {
                        player.SendMessage(UOACZSystem.yellowTextHue, "The " + DisplayName + " Stockpile is under attack and at " + Utility.CreatePercentageString(m_NextDamageStateNotification) + " durability.");
                    }
                }

                m_NextDamageStateNotification -= NotificationInterval;
            }

            UOACZEvents.StockpileDamaged(false);
        }
Ejemplo n.º 2
0
        public override void AfterBreak(Mobile from, BreakableStatic.InteractionType interactionType)
        {
            base.AfterBreak(from, interactionType);

            UOACZEvents.StockpileDamaged(true);
        }