View Single Post
  #7  
Old 01-27-2018, 09:53 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

NPCs have a loottable ID, loottables have lootdrops, lootdrops have items.

So to find what items drop on a certain NPC all you need to do is run this query (# is your NPC ID).
Code:
SELECT
    items.*
FROM
    items
INNER JOIN lootdrop_entries ON items.id = lootdrop_entries.item_id
INNER JOIN loottable_entries ON lootdrop_entries.lootdrop_id = loottable_entries.lootdrop_id
INNER JOIN npc_types ON loottable_entries.loottable_id = npc_types.loottable_id
WHERE
    npc_types.id = #;
Reply With Quote