I think the easiest way to randomly drop from the entire table would be to grab a random id from 0 - item max out of the shared item struct and add it at spawn time.
That might even work on a private server, but in practice the table is full of GM and test items that you don't want dropping on a public server.
In fact, the last time I checked I think it was only around 7500 wearable items that naturally drop. (Based on loottable/lootdrop) Everything else is quested, crafted, or not intended for player consumption.
|