コード例 #1
0
ファイル: FishBowl.cs プロジェクト: twlizer/runuo
            public override void OnClick()
            {
                if (m_Bowl == null || m_Bowl.Deleted || !m_Bowl.IsAccessibleTo(Owner.From))
                {
                    return;
                }

                BaseFish fish = m_Bowl.Fish;

                if (fish != null)
                {
                    if (fish.IsLockedDown)                        // for legacy fish bowls
                    {
                        Owner.From.SendLocalizedMessage(1010449); // You may not use this object while it is locked down.
                    }
                    else if (!Owner.From.PlaceInBackpack(fish))
                    {
                        Owner.From.SendLocalizedMessage(1074496);                           // There is no room in your pack for the creature.
                    }
                    else
                    {
                        Owner.From.SendLocalizedMessage(1074495);                           // The creature has been removed from the fish bowl.
                        fish.StartTimer();
                        m_Bowl.InvalidateProperties();
                    }
                }
            }
コード例 #2
0
        public override void OnChop(Mobile from)
        {
            for (int i = 0; i < Items.Count; i++)
            {
                Item item = Items[i];

                item.MoveToWorld(Location, Map);

                if (item is BaseFish)
                {
                    BaseFish fish = (BaseFish)item;

                    if (!fish.Dead)
                    {
                        fish.StartTimer();
                    }
                }
            }

            base.OnChop(from);
        }
コード例 #3
0
        public override void DropItemsToGround()
        {
            Point3D loc = GetWorldLocation();

            for (int i = Items.Count - 1; i >= 0; i--)
            {
                Item item = Items[i];

                item.MoveToWorld(loc, Map);

                if (item is BaseFish)
                {
                    BaseFish fish = (BaseFish)item;

                    if (!fish.Dead)
                    {
                        fish.StartTimer();
                    }
                }
            }
        }
コード例 #4
0
ファイル: FishBowl.cs プロジェクト: mguerine/runuo-ws
            public override void OnClick()
            {
                if (m_Bowl == null || m_Bowl.Deleted)
                {
                    return;
                }

                BaseFish fish = m_Bowl.Fish;

                if (fish != null)
                {
                    if (!Owner.From.PlaceInBackpack(fish))
                    {
                        Owner.From.SendLocalizedMessage(1074496);                           // There is no room in your pack for the creature.
                    }
                    else
                    {
                        Owner.From.SendLocalizedMessage(1074495);                           // The creature has been removed from the fish bowl.
                        fish.StartTimer();
                        m_Bowl.InvalidateProperties();
                    }
                }
            }