WoWInterface SVN EasyDaily

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 151 to Rev 152
    Reverse comparison

Rev 151 → Rev 152

EasyDaily/Changelog-EasyDaily-v2.1-beta.txt File deleted
EasyDaily/turnin.lua
1,6 → 1,6
--[[
Desc:
Info: $Id: turnin.lua 20 2009-05-04 00:39:58Z draake $
Info: $Id: turnin.lua 25 2009-05-04 10:55:20Z draake $
]]
 
local _G = _G
16,7 → 16,8
--------------------------------------------------------------------------------------------------
 
function EasyDaily:GetQuestLogInfoByName(title)
for i = 1, GetNumQuestLogEntries(), 1 do
local i = 1
while GetQuestLogTitle(i) do
local questTitle, level, questTag, suggestedGroup, isHeader, _, isComplete, isDaily = GetQuestLogTitle(i)
if ( not isHeader ) and questTitle:find(title) then
local numObj = GetNumQuestLeaderBoards(i)
24,6 → 25,7
local index = self:ParseQuestLink(questLink)
return questTitle, level, questTag, suggestedGroup, isComplete, isDaily, numObj, index, questLink
end
i = i + 1
end
end
 
118,6 → 120,7
end
return ( minimum > 0 ) and minimum
end
return true -- ONLY UNTIL OBJECTIVES ARE PROPERLY STORED
end
 
--------------------------------------------------------------------------------------------------
139,7 → 142,7
return
end
 
self.vars.questbutton:Hide()
EasyDailyQuestFrameCheckButton:Hide()
 
self.tracker.gossip.parent = true
 
269,7 → 272,7
-- Type: Child
function EasyDaily:QUEST_DETAIL(...)
self:Debug("QUEST_DETAIL")
self.vars.questbutton:Show()
EasyDailyQuestFrameCheckButton:Show()
local title = GetTitleText()
if self:QuestEligibleForAdvancement(title) then
if ( not self:GetPVar("skipflag") ) and QuestFlagsPVP() then
284,7 → 287,7
-- Type: Child
function EasyDaily:QUEST_PROGRESS()
self:Debug("QUEST_PROGRESS")
self.vars.questbutton:Show()
EasyDailyQuestFrameCheckButton:Show()
local title = GetTitleText()
local isRepeat = ( not self:GetQuestLogInfoByName(title) )
if isRepeat then
303,8 → 306,13
-- Triggers on: Active/Repeatable
-- Type: Child
function EasyDaily:QUEST_COMPLETE()
 
self:Debug("QUEST_COMPLETE")
self.vars.questbutton:Show()
 
EasyDailyQuestFrameCheckButton:Show()
 
self:RefreshQuestRewardHighlight()
 
local title = GetTitleText()
if self:QuestEligibleForAdvancement(title) then
local money = GetQuestMoneyToGet()
314,16 → 322,19
MoneyFrame_Update(QuestFrame.dialog:GetName().."MoneyFrame", money)
end
else
local choiceNum = GetNumQuestChoices()
if choiceNum > 0 then
if self:GetPVar("multiple") and self.db.profile.reward[title] then
GetQuestReward(self.db.profile.reward[title])
if GetNumQuestChoices() > 0 then
local i = self:GetHandlerValue("quest", GetTitleText(), "reward")
if i and i > 0 and self:GetPVar("multiple") then
GetQuestReward(i)
end
elseif self:GetPVar("single") then
GetQuestReward(0)
end
end
end
 
self.vars.complete[title] = true
 
end
 
--------------------------------------------------------------------------------------------------
336,15 → 347,6
end
end
 
function EasyDaily:GetQuestReward(option)
local title = GetTitleText()
if ( option > 0 ) and self:GetPVar("multiple") and self:GetQuestState(title) then
self:Debug("Storing reward option", title, option)
self.db.profile.reward[title] = option
end
self:QuestCompleteToday(title)
end
 
function EasyDaily:SetGossipIcon(icon, title, isActive)
 
local _, _, questType, questTag, _, _, questEnabled = self:GetQuestBaseInfo(title)
383,7 → 385,7
 
end
 
function EasyDaily:RefreshGossipOrQuestFrame(skip)
function EasyDaily:RefreshGossipOrQuestFrame()
if QuestFrameGreetingPanel:IsShown() then
self:ClearTracker("gossip")
QuestFrameGreetingPanel:Hide()
396,6 → 398,38
end
end
 
function EasyDaily:RefreshQuestRewardHighlight()
local i = self:GetHandlerValue("quest", GetTitleText(), "reward")
if i and i > 0 then
local frame = _G[ "QuestRewardItem" .. i ]
if frame and frame:IsShown() then
EasyDailyQuestRewardItemHighlight:SetPoint("TOPLEFT", frame, "TOPLEFT", -8, 7)
EasyDailyQuestRewardItemHighlight:Show()
return
end
end
EasyDailyQuestRewardItemHighlight:Hide()
end
 
function EasyDaily:QuestRewardItem_OnClick(frame)
if arg1 == "RightButton" then
if ( frame.type == "choice" ) then
local h = self:GetHandler("quest", GetTitleText())
if h then
local index = frame:GetID()
if index == h:GetVal("reward") then
h:SetVal("reward", 0)
else
h:SetVal("reward", index)
end
self:RefreshQuestRewardHighlight()
end
end
else
self.hooks["QuestRewardItem_OnClick"](frame)
end
end
 
function EasyDaily:GossipTitleButton_OnClick(frame, button)
if button == "RightButton" then
if ( frame.type == "Available" ) or ( frame.type == "Active" ) then
EasyDaily/locales/deDE.lua
8,7 → 8,7
 
-- L["Alt"] = ""
-- L["Auto"] = ""
-- L["Auto-Select rewards for quests with more than one reward."] = ""
L["Auto-Select rewards for quests with more than one reward."] = "Automatische Auswahl der Belohnung bei mehr als einer Auswahl"
-- L["Auto-Select rewards for quests with one or less reward."] = ""
-- L["Auto Turn-in"] = ""
-- L["Auto Turn-in Text"] = ""
26,7 → 26,7
-- L["Disables the confirmation pop-up that appears when accepting a daily quest that flags you for pvp."] = ""
-- L["Disables the confirmation pop-up that appears when completing a daily quest that requires gold."] = ""
-- L["Displays a quests auto turn-in status in text."] = ""
-- L["Enabled"] = ""
L["Enabled"] = "aktiviert"
-- L["Enable/Disable debug mode."] = ""
-- L["Enable/Disable the addon."] = ""
-- L["Enables Auto Turn-in for %s tagged quests."] = ""
EasyDaily/tracking.lua
1,6 → 1,6
--[[
Desc:
Info: $Id: tracking.lua 20 2009-05-04 00:39:58Z draake $
Info: $Id: tracking.lua 22 2009-05-04 09:34:29Z draake $
]]
 
local _G = _G
114,96 → 114,135
return objType, objName, tonumber(objCurCount), tonumber(objNeedCount), objText, isDone
end
 
local TagTextToOpt = {
[GROUP] = "group",
[LFG_TYPE_DUNGEON] = "dungeon",
[RAID] = "raid",
[DUNGEON_DIFFICULTY2] = "heroic",
[PVP] = "pvp",
[ELITE] = "elite",
}
 
function EasyDaily:QUEST_LOG_UPDATE()
 
self:Debug("QUEST_LOG_UPDATE")
self:RefreshQuestLogInfo()
end
 
do
 
self:UnregisterEvent("QUEST_LOG_UPDATE")
local TagTextToOpt = {
[GROUP] = "group",
[LFG_TYPE_DUNGEON] = "dungeon",
[RAID] = "raid",
[DUNGEON_DIFFICULTY2] = "heroic",
[PVP] = "pvp",
[ELITE] = "elite",
}
 
local numEntries, numQuests = GetNumQuestLogEntries()
local questLog, tempLog = {}, {}
 
local collapseHeaders = {}
local tempLog = {}
 
do
local tempHeader
local i = 1
while GetQuestLogTitle(i) do
local logName, _, questTag, _, isHeader, isCollapsed, isComplete, isDaily = GetQuestLogTitle(i)
if isHeader then
tempHeader = logName
if isCollapsed then
ExpandQuestHeader(i)
tinsert(collapseHeaders, i)
end
else
local index = self:ParseQuestLink( GetQuestLink(i) )
tempLog[index] = {}
tempLog[index].name = logName
if questTag then
tempLog[index].tag = TagTextToOpt[questTag]
function EasyDaily:RefreshQuestLogInfo()
 
local _, numQuests = GetNumQuestLogEntries()
 
local collapseHeaders = {}
 
do
local tempHeader
local i = 1
while GetQuestLogTitle(i) do
local logName, _, questTag, _, isHeader, isCollapsed, isComplete, isDaily = GetQuestLogTitle(i)
if isHeader then
tempHeader = logName
if isCollapsed then
ExpandQuestHeader(i)
tinsert(collapseHeaders, i)
end
else
tempLog[index].tag = "normal"
local index = self:ParseQuestLink( GetQuestLink(i) )
if questLog[index] then
tempLog[index] = questLog[index]
tempLog[index].refresh = true
else
tempLog[index] = {}
tempLog[index].name = logName
 
if questTag then
tempLog[index].tag = TagTextToOpt[questTag]
else
tempLog[index].tag = "normal"
end
 
tempLog[index].header = tempHeader
tempLog[index].daily = isDaily
tempLog[index].complete = isComplete
 
tempLog[index].obj = {}
end
local numObj = GetNumQuestLeaderBoards(i)
for k = 1, numObj, 1 do
local objType, objName, objCurCount, objNeedCount, objText = self:GetLeaderBoardDetails(k, i)
if questLog[index] and questLog[index].obj[k] then
if objCurCount and questLog[index].obj[k].cur and objCurCount > questLog[index].obj[k].cur then
self:Debug(index, logName, objType, objName, questLog[index].obj[k].cur, objCurCount, objNeedCount)
end
tempLog[index].obj[k] = questLog[index].obj[k]
else
tempLog[index].obj[k] = {}
end
tempLog[index].obj[k].type = objType
tempLog[index].obj[k].name = objName
tempLog[index].obj[k].text = objText
tempLog[index].obj[k].cur = objCurCount
tempLog[index].obj[k].need = objNeedCount
end
end
tempLog[index].header = tempHeader
tempLog[index].daily = isDaily
tempLog[index].complete = isComplete
tempLog[index].obj = {}
local numObj = GetNumQuestLeaderBoards(i)
for k = 1, numObj, 1 do
local objType, objName, objCurCount, objNeedCount, objText = self:GetLeaderBoardDetails(k, i)
tempLog[index].obj[k] = { type=objType, name=objName, text=objText, current=objCurCount, need=objNeedCount }
i = i + 1
end
end
 
for index, v in pairs(questLog) do
if ( not tempLog[index] ) then
-- Quest was present in last update, but is now missing
if self.vars.complete[v.name] then
self:RecordQuestComplete(v.name)
self.vars.complete[v.name] = nil
end
end
i = i + 1
end
end
 
for index, v in pairs(tempLog) do
 
if v.daily then
local clean = self:CleanTable(questLog)
questLog = tempLog
tempLog = clean
 
for index, v in pairs(questLog) do
 
local h, isNew = self:GetHandler("quest", index, true)
 
if isNew and self.vars.startup then
self:Display(L["Daily Quest Discovered"], v.name)
if type(v) == "table" and ( not v.refresh ) and v.daily then
 
local h, isNew = self:GetHandler("quest", index, true)
 
if isNew and self.vars.startup then
self:Display(L["Daily Quest Discovered"], v.name)
end
 
h:SetVal("name", v.name)
h:SetVal("type", v.daily and "daily" or "normal")
h:SetVal("tag", v.tag)
h:SetVal("header", v.header)
 
--~ for j, k in pairs(v.obj) do
--~ handler:SetData("obj", j, "name", k.name or k.text)
--~ handler:SetData("obj", j, "type", k.type)
--~ handler:SetData("obj", j, "need", k.need)
--~ end
 
end
 
h:SetVal("name", v.name)
h:SetVal("type", v.daily and "daily" or "normal")
h:SetVal("tag", v.tag)
h:SetVal("header", v.header)
 
--~ for j, k in pairs(v.obj) do
--~ handler:SetData("obj", j, "name", k.name or k.text)
--~ handler:SetData("obj", j, "type", k.type)
--~ handler:SetData("obj", j, "need", k.need)
--~ end
end
 
tsort(collapseHeaders, function(a, b) return a > b; end)
 
for i, v in pairs(collapseHeaders) do
CollapseQuestHeader(v)
end
 
if not self.vars.startup then
self.vars.startup = true
end
 
end
 
tsort(collapseHeaders, function(a, b) return a > b; end)
 
for i, v in pairs(collapseHeaders) do
CollapseQuestHeader(v)
end
 
if not self.vars.startup then
self.vars.startup = true
end
 
self:RegisterEvent("QUEST_LOG_UPDATE")
 
end
 
--------------------------------------------------------------------------------------------------
EasyDaily/textures/Quest-Frame/RewardHighlight.blp Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Property changes : Added: svn:mime-type + application/octet-stream
EasyDaily/database.lua
1,6 → 1,6
--[[
Desc:
Info: $Id: database.lua 20 2009-05-04 00:39:58Z draake $
Info: $Id: database.lua 22 2009-05-04 09:34:29Z draake $
]]
 
local _G = _G
36,8 → 36,7
 
function EasyDaily:GetQuestState(index)
if not index then return end
local h = self:GetHandler("quest", index)
return h and h:GetVal("enable")
return self:GetHandlerValue("quest", index, "enable")
end
 
function EasyDaily:GetQuestObjective()
54,32 → 53,39
end
end
 
function EasyDaily:GetHandlerValue(kind, index, key)
local h = self:GetHandler(kind, index)
if h then
return h:GetVal(key)
end
end
 
--------------------------------------------------------------------------------------------------
-- Data Handlers
-- Data Handler Values/Presets/Mixins
--------------------------------------------------------------------------------------------------
 
local handlerType = {
quest = {
values = {
enable = { db = "global", type = "boolean", locale = nil, default = true, protect = nil },
type = { db = "global", type = "string", locale = nil, default = nil, protect = nil },
tag = { db = "global", type = "string", locale = nil, default = nil, protect = nil },
header = { db = "global", type = "string", locale = true, default = nil, protect = nil },
side = { db = "global", type = "number", locale = nil, default = nil, protect = nil },
reward = { db = "char", type = "number", locale = nil, default = nil, protect = nil },
time = { db = "char", type = "number", locale = nil, default = 0, protect = nil },
reset = { db = "char", type = "number", locale = nil, default = 0, protect = nil },
done = { db = "char", type = "number", locale = nil, default = 0, protect = nil },
enable = { db = "global", type = "boolean", locale = nil, default = true },
type = { db = "global", type = "string", locale = nil, default = nil },
tag = { db = "global", type = "string", locale = nil, default = nil },
header = { db = "global", type = "string", locale = true, default = nil },
side = { db = "global", type = "number", locale = nil, default = nil },
reward = { db = "char", type = "number", locale = nil, default = 0 },
time = { db = "char", type = "number", locale = nil, default = 0 },
reset = { db = "char", type = "number", locale = nil, default = 0 },
done = { db = "char", type = "number", locale = nil, default = 0 },
},
objects = {
unit = { db = "global", key = "_unit", mixins = { "SetUnit", "GetUnit", "DelUnit" } },
obj = { db = "global", key = "_obj", mixins = { "SetObj", "SetObj" } },
obj = { db = "global", key = "_obj", mixins = { "SetObj", "GetObj" } },
},
},
unit = {
values = {
type = { db = "global", type = "string", locale = nil, default = nil, protect = nil },
side = { db = "global", type = "number", locale = nil, default = nil, protect = nil },
type = { db = "global", type = "string", locale = nil, default = nil },
side = { db = "global", type = "number", locale = nil, default = nil },
},
objects = {
coord = { db = "global", key = "_coord", mixins = { "SetCoord", "GetCoord" } },
94,20 → 100,36
}
 
local defaultValues = {
htype = { db = "global", type = "string", locale = nil, default = nil, protect = true },
name = { db = "global", type = "string", locale = true, default = nil, protect = true },
index = { db = "global", type = "number", locale = nil, default = nil, protect = true },
--~ hkey = { db = "global", type = "number", locale = nil, default = nil, protect = true },
hval = { db = "global", type = "string", locale = nil, default = nil, protect = true },
name = { db = "global", type = "string", locale = true, default = nil, protect = true },
index = { db = "global", type = "number", locale = nil, default = nil, protect = true },
}
 
local defaultMixins = { "Delete", "Refresh", "SetVal", "GetVal" }
 
for _, v in pairs(handlerType) do
for j, k in pairs(defaultValues) do
v.values[j] = k
end
end
 
local setMixins = {
 
SetObj = function(this)
 
this:Refresh()
end,
 
GetObj = function(this)
return
end,
 
SetUnit = function(this, h)
assert(handler, "SetUnit")
local t, i = this._unit, nil
for k = 1, #t, 1 do
if t[k] == h._hindex then
if t[k] == h._hkey then
i = k; break
end
end
167,61 → 189,54
return this._coord
end,
 
SetVal = function(t, key, value)
assert(type(key) ~= nil and t._data[key], "SetVal")
if not EasyDaily.db[ t._data[key].db ].data[ t._hindex ] then
EasyDaily.db[ t._data[key].db ].data[ t._hindex ] = {}
SetVal = function(this, key, value)
assert(type(key) ~= nil and this._data[key] and type(value) ~= nil, "SetVal")
local data = this._data[key]
if not EasyDaily.db[ data.db ].data[ this._hkey ] then
EasyDaily.db[ data.db ].data[ this._hkey ] = {}
end
local db = EasyDaily.db[ t._data[key].db ].data[ t._hindex ]
if t._data[key].type == type(value) then
if t._data[key].locale then
local locale = GetLocale()
local db = EasyDaily.db[ data.db ].data[ this._hkey ]
if data.type == type(value) then
if data.locale then
if not db[key] then
db[key] = {}
end
if ( not db[key][locale] ) or ( not t._data[key].protect ) then
if value == t._data[key].default then
db[key][locale] = nil
else
db[key][locale] = value
end
db = db[key]
key = GetLocale()
end
if ( not db[key] ) or ( not data.protect ) then
if value == data.default then
db[key] = nil
else
db[key] = value
end
else
if ( not db[key] ) or ( not t._data[key].protect ) then
if value == t._data[key].default then
db[key] = nil
else
db[key] = value
end
end
end
this:Refresh()
end
end,
 
GetVal = function(t, key)
assert(type(key) ~= nil and t._data[key], "GetVal")
local db = EasyDaily.db[ t._data[key].db ].data[ t._hindex ]
if t._data[key].locale then
local locale = GetLocale()
if db and db[key] and type(db[key][locale]) ~= "nil" then
return db[key][locale]
else
return t._data[key].default
end
GetVal = function(this, key)
assert(type(key) ~= nil and this._data[key], "GetVal")
local db = EasyDaily.db[ this._data[key].db ].data[ this._hkey ]
if this._data[key].locale then
db = db[key]
key = GetLocale()
end
if type(db) == "table" and type(db[key]) ~= "nil" then
return db[key]
else
if db and type(db[key]) ~= "nil" then
return db[key]
else
return t._data[key].default
end
return this._data[key].default
end
end,
 
}
 
--------------------------------------------------------------------------------------------------
-- Data Handler Creation/Searching
--------------------------------------------------------------------------------------------------
 
function EasyDaily:ResetDatabase()
self.db.global.data = {}
self.db.profile.data = {}
self.db.char.data = {}
self.handlers = {}
end
233,10 → 248,10
end
 
function EasyDaily:DeleteHandler(h)
if type(h) == "table" and h._htype then
self.db.global.data[h._hindex] = nil
self.db.char.data[h._hindex] = nil
self.handlers[h._hindex] = nil
if type(h) == "table" and h._hval then
self.db.global.data[h._hkey] = nil
self.db.char.data[h._hkey] = nil
self.handlers[h._hkey] = nil
for i in pairs(h) do h[i] = nil end
end
end
244,7 → 259,7
function EasyDaily:GetHandler(kind, index, create)
assert(kind and ( type(index) == "number" or type(index) == "string" ), "GetHandler")
for i, v in pairs(self.handlers) do
if kind == v:GetVal("htype") and ( ( type(index) == "number" and index == v:GetVal("index") ) or ( type(index) == "string" and index == v:GetVal("name") ) ) then
if kind == v:GetVal("hval") and ( ( type(index) == "number" and index == v:GetVal("index") ) or ( type(index) == "string" and index == v:GetVal("name") ) ) then
return v
end
end
272,7 → 287,8
-- Create and set handler
self.handlers[n] = self:BuildHandler(kind, n)
 
self.handlers[n]:SetVal("htype", kind)
--~ self.handlers[n]:SetVal("hkey", n)
self.handlers[n]:SetVal("hval", kind)
 
if type(index) == "number" then
self.handlers[n]:SetVal("index", index)
284,13 → 300,23
 
end
 
function EasyDaily:InitHandlers()
self.handlers = {}
for n, v in pairs(self.db.global.data) do
if v then
self.handlers[n] = self:BuildHandler( v.hval, n )
end
end
end
 
function EasyDaily:BuildHandler(kind, n)
 
assert(n and handlerType[kind], "BuildHandler")
 
local handler = {}
 
handler._hindex = n
handler._hkey = n
handler._hval = kind
 
for _, v in pairs(defaultMixins) do
if not handler[v] then
298,16 → 324,8
end
end
 
handler._data = {}
handler._data = handlerType[kind].values
 
for i, v in pairs(defaultValues) do
handler._data[i] = v
end
 
for i, v in pairs(handlerType[kind].values) do
handler._data[i] = v
end
 
for i, v in pairs(handlerType[kind].objects) do
for _, k in pairs(v.mixins) do
if not handler[k] then
324,15 → 342,6
 
end
 
function EasyDaily:InitHandlers()
self.handlers = {}
for n, v in pairs(self.db.global.data) do
if v then
self.handlers[n] = self:BuildHandler( v.htype, n )
end
end
end
 
--------------------------------------------------------------------------------------------------
-- Linear Table Creation/Functions
--------------------------------------------------------------------------------------------------
EasyDaily/Changelog.txt New file
0,0 → 1,114
------------------------------------------------------------------------
r26 | draake | 2009-05-04 10:56:26 +0000 (Mon, 04 May 2009) | 1 line
Changed paths:
A /tags/v2.0-beta.4 (from /trunk:25)
 
Tagging as v2.0-beta.4
------------------------------------------------------------------------
r25 | draake | 2009-05-04 10:55:20 +0000 (Mon, 04 May 2009) | 1 line
Changed paths:
M /trunk/turnin.lua
 
Repeatable quests are (once again) temporarily flagged as always completable until objectives are properly stored.
------------------------------------------------------------------------
r22 | draake | 2009-05-04 09:34:29 +0000 (Mon, 04 May 2009) | 5 lines
Changed paths:
M /trunk/core.lua
M /trunk/database.lua
M /trunk/options.lua
A /trunk/textures/Quest-Frame
A /trunk/textures/Quest-Frame/RewardHighlight.blp
M /trunk/tracking.lua
M /trunk/turnin.lua
 
Fixed quest completion detection.
Added 'Reset All' option to the options menu while in debug mode.
Implemented new auto-select system for quests with multiple rewards.
More questlog caching optimizations.
More database system tweaks.
------------------------------------------------------------------------
r20 | draake | 2009-05-04 00:39:58 +0000 (Mon, 04 May 2009) | 3 lines
Changed paths:
M /trunk/EasyDaily.toc
M /trunk/core.lua
M /trunk/database.lua
M /trunk/locales/enUS.lua
M /trunk/options.lua
M /trunk/scripts/Strings.lua
M /trunk/tracking.lua
M /trunk/turnin.lua
 
Updated locale to use WoW global strings when possible.
Fixed quest greeting turn ins.
More work on the new database system.
------------------------------------------------------------------------
r18 | draake | 2009-05-02 04:10:33 +0000 (Sat, 02 May 2009) | 1 line
Changed paths:
M /trunk/core.lua
 
Version text fix
------------------------------------------------------------------------
r17 | draake | 2009-05-02 03:59:49 +0000 (Sat, 02 May 2009) | 1 line
Changed paths:
M /trunk/.pkgmeta
M /trunk/EasyDaily.toc
M /trunk/core.lua
A /trunk/database.lua
M /trunk/inventory.lua
M /trunk/locales/enUS.lua
M /trunk/options.lua
M /trunk/scripts/Babelfish.lua
M /trunk/scripts/Strings.lua
A /trunk/textures
A /trunk/textures/Gossip-Icons
A /trunk/textures/Gossip-Icons/DailyActive.blp
A /trunk/textures/Gossip-Icons/DailyAvailable.blp
A /trunk/textures/Gossip-Icons/DailyDisableActive.blp
A /trunk/textures/Gossip-Icons/DailyDisableAvailable.blp
A /trunk/textures/Gossip-Icons/DailyEnableActive.blp
A /trunk/textures/Gossip-Icons/DailyEnableAvailable.blp
A /trunk/textures/Gossip-Icons/GreyActive.blp
A /trunk/textures/Gossip-Icons/GreyDisableActive.blp
A /trunk/textures/Gossip-Icons/GreyEnableActive.blp
A /trunk/textures/Gossip-Icons/NormalActive.blp
A /trunk/textures/Gossip-Icons/NormalAvailable.blp
A /trunk/textures/Gossip-Icons/NormalDisableActive.blp
A /trunk/textures/Gossip-Icons/NormalDisableAvailable.blp
A /trunk/textures/Gossip-Icons/NormalEnableActive.blp
A /trunk/textures/Gossip-Icons/NormalEnableAvailable.blp
M /trunk/tracking.lua
M /trunk/turnin.lua
D /trunk/util.lua
A /trunk/utility.lua (from /trunk/util.lua:16)
 
beta commit
------------------------------------------------------------------------
r16 | draake | 2009-04-03 00:57:19 +0000 (Fri, 03 Apr 2009) | 5 lines
Changed paths:
M /trunk/.pkgmeta
M /trunk/EasyDaily.toc
M /trunk/core.lua
D /trunk/guid.lua
M /trunk/options.lua
M /trunk/tracking.lua
M /trunk/turnin.lua
M /trunk/util.lua
 
N: Implemented data registration system.
N: Records relevant NPC locations.
N: Records repeatable quest item requirements.
N: Records daily quest data (id, name, objectives, etc).
C: Revised the way the addon version is displayed.
------------------------------------------------------------------------
r15 | draake | 2009-03-30 02:18:14 +0000 (Mon, 30 Mar 2009) | 3 lines
Changed paths:
M /trunk
M /trunk/core.lua
M /trunk/inventory.lua
M /trunk/turnin.lua
M /trunk/util.lua
 
N: Quest requirements for repeatable quests are now learned.
N: Added table utility functions.
C: Experimenting with repo variables.
------------------------------------------------------------------------
EasyDaily/EasyDaily.toc
4,7 → 4,7
## Authors: Draake
## OptionalDeps: Ace3, LibDBIcon-1.0, LibGratuity-3.0, LibAbacus-3.0, LibTourist-3.0, Babble-Faction-3.0, LibBabble-Zone-3.0
## SavedVariables: EasyDaily_DB
## X-Curse-Packaged-Version: v2.1-beta
## X-Curse-Packaged-Version: v2.0-beta.4
## X-Curse-Project-Name: EasyDaily
## X-Curse-Project-ID: easydaily
## X-Curse-Repository-ID: wow/easydaily/mainline
EasyDaily/core.lua
1,6 → 1,6
--[[
Desc:
Info: $Id: core.lua 20 2009-05-04 00:39:58Z draake $
Info: $Id: core.lua 22 2009-05-04 09:34:29Z draake $
]]
 
local _G = _G
32,7 → 32,7
skipflag = false,
skipmoney = false,
single = true,
multiple = false,
multiple = true,
 
gossipstate = false,
gossipicons = true,
54,10 → 54,6
 
minimapIcon = {},
 
data = {},
 
reward = {},
 
},
char = {
data = {},
88,13 → 84,13
self.version = {}
 
-- Version
self.version.revision = tonumber("20")
self.version.revision = tonumber("25")
if self.version.revision then
local vtext = "v2.1-beta"
local vtext = "v2.0-beta.4"
if string.find(vtext, "^r%d+$") then
self.version.text = string.format("r%s-alpha", self.version.revision)
else
self.version.major, self.version.minor, self.version.vtype = self:StrSplit("v%.%-", vtext)
self.version.major, self.version.minor, self.version.vtype, self.version.vsub = self:StrSplit("v%.%-", vtext)
self.version.text = string.format("v%s.%s.%s-%s", self.version.major or 0, self.version.minor or 0, self.version.revision, self.version.vtype or "???")
end
else
125,7 → 121,7
}
 
self.vars = {
events = {},
complete = {}
}
 
self.LibTourist = LibStub("LibTourist-3.0")
156,8 → 152,6
end)
b:SetScript("OnLeave", GameTooltip_Hide)
 
self.vars.questbutton = b
 
end
 
-- Gossip/Quest Frame additional click registration
171,7 → 165,26
b:RegisterForClicks("LeftButtonUp", "RightButtonUp")
b.icon = _G[ "QuestTitleButton" .. i .. "QuestIcon" ]
end
for i = 1, 10, 1 do
local b = _G[ "QuestRewardItem" .. i ]
b:RegisterForClicks("LeftButtonUp", "RightButtonUp")
end
 
do
 
local f = CreateFrame("Frame", "EasyDailyQuestRewardItemHighlight", QuestRewardScrollChildFrame)
f:SetHeight(64)
f:SetWidth(256)
 
f.texture = f:CreateTexture(nil, "BACKGROUND")
f.texture:SetHeight(64)
f.texture:SetWidth(256)
f.texture:SetAllPoints(f)
f.texture:SetTexture("Interface\\Addons\\EasyDaily\\Textures\\Quest-Frame\\RewardHighlight")
f.texture:SetBlendMode("ADD")
 
end
 
self:SetupOptions()
 
self:SetEnabledState(self.db.profile.enabled)
187,15 → 200,14
self:RegisterEvent("QUEST_PROGRESS")
self:RegisterEvent("QUEST_COMPLETE")
 
self.vars.events["GossipClosed"] = self:RegisterBucketEvent({
self:RegisterBucketEvent({
"QUEST_FINISHED",
"GOSSIP_CLOSED"
}, 0, "GossipOrQuestClosed")
 
self:RegisterEvent("QUEST_LOG_UPDATE")
 
self:Hook("GetQuestReward", true)
 
self:RawHook("QuestRewardItem_OnClick", true)
self:RawHook("GossipTitleButton_OnClick", true)
self:RawHook("QuestTitleButton_OnClick", true)
 
209,22 → 221,10
 
function EasyDaily:OnDisable()
 
-- Events and timers
self:UnregisterEvent("QUEST_GREETING")
self:UnregisterEvent("GOSSIP_SHOW")
self:UnregisterEvent("QUEST_DETAIL")
self:UnregisterEvent("QUEST_PROGRESS")
self:UnregisterEvent("QUEST_COMPLETE")
self:UnregisterAllEvents()
self:UnregisterAllBuckets()
self:UnhookAll()
 
self:UnregisterBucket( self.vars.events["GossipClosed"] )
 
self:UnregisterEvent("QUEST_LOG_UPDATE")
 
self:Unhook("GetQuestReward", true)
 
self:Unhook("GossipTitleButton_OnClick")
self:Unhook("QuestTitleButton_OnClick")
 
-- Addon is disabled
self.db.profile.enabled = false
 
EasyDaily/options.lua
1,6 → 1,6
--[[
Desc:
Info: $Id: options.lua 20 2009-05-04 00:39:58Z draake $
Info: $Id: options.lua 22 2009-05-04 09:34:29Z draake $
]]
 
local _G = _G
28,7 → 28,7
-- available, complete, repeatable, normal
function EasyDaily:SetQuestOptionsTable(available, complete, repeatable)
for i, h in pairs(self.handlers) do
if h:GetVal("htype") == "quest" then
if h:GetVal("hval") == "quest" then
local name, questType, questTag, header, enable = h:GetVal("name"), h:GetVal("type"), h:GetVal("tag"), h:GetVal("header"), h:GetVal("enable")
local t
if ( questType == "daily" ) then