Ejemplo n.º 1
0
        public override bool OnBeforeDeath()
        {
            Scimitar weapon = new Scimitar();

            weapon.DamageLevel     = (WeaponDamageLevel)Utility.Random(0, 5);
            weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(0, 5);
            weapon.AccuracyLevel   = (WeaponAccuracyLevel)Utility.Random(0, 5);

            weapon.MoveToWorld(this.Location, this.Map);

            // TODO: need to handle this Category 2 MID
            // Category 2 MID
            // PackMagicItem( 1, 1, 0.05 );

            this.Delete();
            return(false);
        }
Ejemplo n.º 2
0
        public override bool OnBeforeDeath()
        {
            if (!base.OnBeforeDeath())
            {
                return(false);
            }

            if (Core.UOAI || Core.UOAR)
            {
                Scimitar weapon = new Scimitar();
                weapon.DamageLevel     = (WeaponDamageLevel)Utility.Random(0, 5);
                weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(0, 5);
                weapon.AccuracyLevel   = (WeaponAccuracyLevel)Utility.Random(0, 5);
                weapon.MoveToWorld(this.Location, this.Map);

                Effects.SendLocationEffect(Location, Map, 0x376A, 10, 1);
            }
            else
            {
                if (Core.UOSP || Core.UOMO)
                {
                    Scimitar weapon = new Scimitar();
                    weapon.DamageLevel     = (WeaponDamageLevel)Utility.Random(0, 5);
                    weapon.DurabilityLevel = (WeaponDurabilityLevel)Utility.Random(0, 5);
                    weapon.AccuracyLevel   = (WeaponAccuracyLevel)Utility.Random(0, 5);
                    weapon.MoveToWorld(this.Location, this.Map);

                    Effects.SendLocationEffect(Location, Map, 0x376A, 10, 1);
                }
                else
                {
                    // run uo code
                    Gold gold = new Gold(Utility.RandomMinMax(240, 375));
                    gold.MoveToWorld(Location, Map);

                    Effects.SendLocationEffect(Location, Map, 0x376A, 10, 1);
                }
            }

            // we don't want a corpse, so refuse the 'death' and just delete the creature
            this.Delete();
            return(false);
        }