示例#1
0
        public static void OnDropped(ContainerDroppedToEventArgs e)
        {
            Item   dropped = e.Dropped;
            Mobile from    = e.Mobile;

            if (dropped != null)
            {
                HonestyItemSocket honestySocket = dropped.GetSocket <HonestyItemSocket>();

                if (honestySocket != null && honestySocket.HonestyPickup == DateTime.MinValue)
                {
                    honestySocket.HonestyPickup = DateTime.UtcNow;
                    honestySocket.StartHonestyTimer();

                    if (honestySocket.HonestyOwner == null)
                    {
                        HonestyVirtue.AssignOwner(honestySocket);
                    }

                    if (from != null)
                    {
                        from.SendLocalizedMessage(1151536); // You have three hours to turn this item in for Honesty credit, otherwise it will cease to be a quest item.
                    }
                }
            }
        }
示例#2
0
        public override void OnAfterDuped(ItemSocket oldSocket)
        {
            if (oldSocket is HonestyItemSocket)
            {
                HonestyItemSocket honesty = oldSocket as HonestyItemSocket;

                HonestyRegion       = honesty.HonestyRegion;
                HonestyOwner        = honesty.HonestyOwner;
                HonestyPickup       = honesty.HonestyPickup;
                HonestyTimerTicking = honesty.HonestyTimerTicking;

                if (HonestyTimerTicking)
                {
                    BeginTimer();
                }
            }
        }