The only thing I worry about are loottables that are not set up correctly...where multiplier is greater than the total number of items in the table. This will cause found to never be set to 1, and cause an infinite loop.
I
think this will fix it, but defintely needs some testing (currently at work, not able to test ATM):
In function
Code:
const LootTable_Struct* Database::GetLootTable(int32 loottable_id) {:
Code:
loottable_array[loottable_id]->Entries[i].lootdrop_id = atoi(row[1]);
loottable_array[loottable_id]->Entries[i].multiplier = atoi(row[2]);
loottable_array[loottable_id]->Entries[i].probability = atoi(row[3]);
+ if(loottable_array[loottable_id]->Entries[i].multiplier > NumEntries);
+ loottable_array[loottable_id]->Entries[i].multiplier = NumEntries;
i++;
}
mysql_free_result(result);