Hello,
I just discovered that this table is used to disallow the drop of an item by a creature if this item is part of a quest and the player doesn’t have the quest (well it’s just a specific case of the use of this table, but this is the one I want to talk about right now). But I also discovered not all quest items in this case (that is, dropped by creatures) have a line in this table.
So I’m asking this: is this normal? Or is this table kind of WIP? Because if so, I’m planning to make a script to insert all the missing lines in the table, for all quest items in this case.
To be clear, I’m going to use this query:
SELECT i.entry, i.name, q.id, q.title, cl.ChanceOrQuestChance, c.entry, c.name
FROM item_template i
INNER JOIN quest_template q ON q.RequiredItemId1 = i.entry Or q.RequiredItemId2 = i.entry /(etc.)/
INNER JOIN creature_loot_template cl ON cl.item = i.entry
INNER JOIN creature_template c ON c.entry = cl.entry
LEFT JOIN conditions cd ON cd.SourceEntry = i.entry AND cd.ConditionTypeOrReference = 9 AND cd.SourceGroup = c.entry AND cd.ConditionValue1 = q.id
WHERE cd.SourceEntry IS NULL
I’m looking for all items that are looted by some creatures and that are required for a quest, and don’t have any condition of type CONDITION_QUESTTAKEN (9).
What do you think? Am i going to do something completely wrong or stupid?
Edit to admins: sorry I think I posted this in the wrong place, I think it should have been in the “DB/SAI Script Development”. Is there any way to move it?