Exemple #1
0
 public static void InvokeCreatureDeath(CreatureDeathEventArgs e)
 {
     if (CreatureDeath != null)
     {
         CreatureDeath(e);
     }
 }
Exemple #2
0
        public static void CheckRecipeDrop(CreatureDeathEventArgs e)
        {
            BaseCreature bc     = e.Creature as BaseCreature;
            var          c      = e.Corpse;
            var          killer = e.Killer;

            if (SpellHelper.IsEodon(c.Map, c.Location))
            {
                double chance = (double)bc.Fame / 1000000;
                int    luck   = 0;

                if (killer != null)
                {
                    luck = Math.Min(1800, killer is PlayerMobile ? ((PlayerMobile)killer).RealLuck : killer.Luck);
                }

                if (luck > 0)
                {
                    chance += (double)luck / 152000;
                }

                if (chance > Utility.RandomDouble())
                {
                    if (0.33 > Utility.RandomDouble())
                    {
                        Item item = Server.Loot.Construct(_ArmorDropTypes[Utility.Random(_ArmorDropTypes.Length)]);

                        if (item != null)
                        {
                            c.DropItem(item);
                        }
                    }
                    else
                    {
                        Item scroll = new RecipeScroll(_RecipeTypes[Utility.Random(_RecipeTypes.Length)]);

                        if (scroll != null)
                        {
                            c.DropItem(scroll);
                        }
                    }
                }
            }
        }
Exemple #3
0
		public static void InvokeCreatureDeath(CreatureDeathEventArgs e)
		{
			if (CreatureDeath != null)
			{
				CreatureDeath(e);
			}
		}