Ejemplo n.º 1
0
        public virtual bool StackWith(Mobile from, DonatorDeed dropped, bool playSound)
        {
            if (dropped.GetType() == this.GetType() && dropped.ItemID == this.ItemID && dropped.Hue == this.Hue && this.Amount + dropped.Amount <= 65535)
            {
                if (this.LootType != dropped.LootType)
                {
                    this.LootType = dropped.LootType;
                }

                this.Amount += dropped.Amount;
                dropped.Delete();

                if (playSound && from != null)
                {
                    int soundID = this.GetDropSound();

                    if (soundID == -1)
                    {
                        soundID = 0x42;
                    }

                    from.SendSound(soundID, this.GetWorldLocation());
                }

                return(true);
            }

            return(false);
        }
Ejemplo n.º 2
0
        public virtual bool StackWith(Mobile from, DonatorDeed dropped, bool playSound)
        {
            if (dropped.GetType() == this.GetType() && dropped.ItemID == this.ItemID && dropped.Hue == this.Hue && this.Amount + dropped.Amount <= 65535)
            {
                if (this.LootType != dropped.LootType)
                {
                    this.LootType = dropped.LootType;
                }

                this.Amount += dropped.Amount;
                dropped.Delete();

                if (playSound && from != null)
                {
                    int soundID = this.GetDropSound();

                    if (soundID == -1)
                    {
                        soundID = 0x42;
                    }

                    from.SendSound(soundID, this.GetWorldLocation());
                }

                return true;
            }

            return false;
        }