예제 #1
0
        public override void OnDoubleClick(Mobile from)
        {
            if (!CheckCloak(from))
            {
                return;
            }

            PlayerMobile pm = from as PlayerMobile;

            if (pm != null && this.InRange(from, 3))
            {
                DesireInfo info = DesireInfo.GetDesireFor(pm, this);

                if (info != null && !info.GiftGiven)
                {
                    OnTalk(pm, info);
                }
            }
        }
예제 #2
0
        private void OnGumpAccepted(Mobile m)
        {
            if (this.InRange(m, 3) && m is PlayerMobile)
            {
                PlayerMobile pm     = m as PlayerMobile;
                DesireInfo   desire = DesireInfo.GetDesireFor(pm, this);

                if (desire != null)
                {
                    if (desire.GivesDesireInfo)
                    {
                        Say(DesireMessage, String.Format("#{0}", desire.Desire.Name));
                    }
                    else
                    {
                        Say(GiftMessage, String.Format("#{0}", desire.Gift.Name));
                    }
                }
            }
        }
예제 #3
0
        public override void OnMovement(Mobile m, Point3D oldLocation)
        {
            if (!CheckCloak(m))
            {
                return;
            }

            if (m.Alive && !m.Hidden && m is PlayerMobile)
            {
                PlayerMobile pm = (PlayerMobile)m;

                if (this.InRange(m, 3) && !this.InRange(oldLocation, 3))
                {
                    DesireInfo info = DesireInfo.GetDesireFor(pm, this);

                    if (info != null && !info.GiftGiven)
                    {
                        Say(BarkMessage);
                    }
                }
            }
        }