The problem with loot drops is right here in loottables.cpp.
if (RunQuery(query, MakeAnyLenString(&query, "SELECT lootdrop_id, item_id, item_charges, equip_item, chance FROM lootdrop_entries WHERE lootdrop_id=%i", lootdrop_id), errbuf, &result))
{
delete[] query;
while (row =mysql_fetch_row(result))
{
if(rand() * 100 < atoi(row[4]) < 10 ? 10 : atoi(row[4]))
{
int32 itemid = atoi(row[1]);
const Item_Struct* dbitem = database.GetItem(itemid);
Its only adding one item to the loot table for the mob on spawn, the 1st item in its loot table list... It doesnt seem to be running through the loop properly...
I'll see if I can fix it..
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
|