|
function EasyDaily:QUEST_PROGRESS() |
self:Debug("QUEST_PROGRESS") |
if self:CanAdvanceGossip(GetTitleText(), true) then |
local title = GetTitleText() |
if self:CanAdvanceGossip(title, true) then |
return CompleteQuest() |
end |
--~ local t = self:GetQuestTableByTitle(title) |
--~ if t then |
--~ t.ireq = {} |
--~ for i = 1, GetNumQuestItems(), 1 do |
--~ local _, _, num = GetQuestItemInfo("required", 1) |
--~ local itemLink = GetQuestItemLink("required", i) |
--~ local _, itemID = strsplit(":", string.match(itemLink, "^|c%x+|H(.+)|h%[.*%]") or "" ) |
--~ if itemID then |
--~ table.insert( t.ireq, {itemID, num} ) |
--~ end |
--~ end |
--~ end |
--~ return DeclineQuest() |
local t = self:GetQuestTableByTitle(title) |
if t then |
t.ireq = {} |
for i = 1, GetNumQuestItems(), 1 do |
local _, _, num = GetQuestItemInfo("required", 1) |
local itemLink = GetQuestItemLink("required", i) |
local _, itemID = strsplit(":", string.match(itemLink, "^|c%x+|H(.+)|h%[.*%]") or "" ) |
if itemID then |
table.insert( t.ireq, {index=itemID, amount=num} ) |
end |
end |
t.type = {} |
t.type[2] = 2 |
end |
return DeclineQuest() |
end |
|
function EasyDaily:QUEST_COMPLETE() |