public void Generate( Mobile from, Container cont, bool spawning, int luckChance )
{
if ( cont == null )
return;
bool checkLuck = true;
for ( int i = 0; i < m_Entries.Length; ++i )
{
LootPackEntry entry = m_Entries[i];
bool shouldAdd = ( entry.Chance > Utility.Random( 10000 ) );
if ( !shouldAdd && checkLuck )
{
checkLuck = false;
if ( LootPack.CheckLuck( luckChance ) )
shouldAdd = ( entry.Chance > Utility.Random( 10000 ) );
}
if ( !shouldAdd )
continue;
Item item = entry.Construct( from, luckChance, spawning );
if ( item != null )
{
if ( !item.Stackable || !cont.TryDropItem( from, item, false ) )
cont.DropItem( item );
}
}
}