public static void CheckRecipeDrop(CreatureDeathEventArgs e)
{
BaseCreature bc = e.Creature as BaseCreature;
Container c = e.Corpse;
Mobile 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 = 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);
}
}
}
}
}