WoWInterface SVN EasyDaily

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 156 to Rev 157
    Reverse comparison

Rev 156 → Rev 157

EasyDaily/utility.lua
1,6 → 1,6
--[[
Desc:
Info: $Id: utility.lua 36 2009-05-11 00:57:03Z draake $
Info: $Id: utility.lua 40 2009-05-12 02:13:32Z draake $
]]
 
local _G = _G
132,9 → 132,13
end
end
 
function EasyDaily:CleanTable(t)
function EasyDaily:CleanTable(t, recursive)
for i, v in pairs(t) do
t[i] = nil
if type(t[i]) == "table" and recursive then
self:CleanTable(t[i], true)
else
t[i] = nil
end
end
return t
end
218,15 → 222,19
-- Debugging
--------------------------------------------------------------------------------------------------
 
function EasyDaily:Help(...)
function EasyDaily:Debug(...)
self:ChatDebug(0, ...)
end
 
function EasyDaily:Helpful(...)
self:ChatDebug(1, ...)
end
 
function EasyDaily:Debug(...)
function EasyDaily:Verbose(...)
self:ChatDebug(2, ...)
end
 
function EasyDaily:RawDebug(...)
function EasyDaily:Maintenance(...)
self:ChatDebug(3, ...)
end
 
EasyDaily/database.lua
1,6 → 1,6
--[[
Desc:
Info: $Id: database.lua 36 2009-05-11 00:57:03Z draake $
Info: $Id: database.lua 40 2009-05-12 02:13:32Z draake $
]]
 
local _G = _G
138,7 → 138,7
local defaultValues = {
--~ hkey = { db = "global", locale = nil, side = nil, default = nil, type = "type", value = "number", table = nil, protect = true },
hval = { db = "global", locale = nil, side = nil, default = nil, type = "type", value = "string", table = nil, protect = true },
name = { db = "global", locale = nil, side = nil, default = nil, type = "type", value = "string", table = nil, protect = true },
name = { db = "global", locale = true, side = nil, default = nil, type = "type", value = "string", table = nil, protect = true },
index = { db = "global", locale = nil, side = nil, default = nil, type = "type", value = "number", table = nil, protect = true },
}
 
243,12 → 243,8
 
self:InitHandles()
 
self.log.initialize = nil
self:CleanTable(self.log, true)
 
self:CleanTable(self.log.start)
self:CleanTable(self.log.finish)
self:CleanTable(self.log.quest)
 
self:RefreshQuestLogInfo()
 
end
EasyDaily/Changelog.txt
1,10 → 1,28
------------------------------------------------------------------------
r39 | draake | 2009-05-11 03:14:05 +0000 (Mon, 11 May 2009) | 1 line
r41 | draake | 2009-05-12 02:14:01 +0000 (Tue, 12 May 2009) | 1 line
Changed paths:
A /tags/v2.0-beta.9 (from /trunk:38)
A /tags/v2.0-beta.10 (from /trunk:40)
 
Tagging as v2.0-beta.9
Tagging as v2.0-beta.10
------------------------------------------------------------------------
r40 | draake | 2009-05-12 02:13:32 +0000 (Tue, 12 May 2009) | 6 lines
Changed paths:
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
M /trunk/utility.lua
 
Changed database to store quest names by locale. Requires database purge.
Fixed quest completion detection.
Gossip quest tooltip tweaks.
Disabled quest discovery notices when starting up.
Temporary solution for 'bounce backs' when declining quests with pop-ups.
Started seperating debug notices into tiers (Helpful, Verbose, and Maintenance).
------------------------------------------------------------------------
r38 | draake | 2009-05-11 03:13:45 +0000 (Mon, 11 May 2009) | 1 line
Changed paths:
M /trunk/tracking.lua
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.0-beta.9
## X-Curse-Packaged-Version: v2.0-beta.10
## 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 36 2009-05-11 00:57:03Z draake $
Info: $Id: core.lua 40 2009-05-12 02:13:32Z draake $
]]
 
local _G = _G
18,7 → 18,7
--------------------------------------------------------------------------------------------------
 
-- Increasing this forces a database purge
local RESETDB = 2
local RESETDB = 3
 
local defaults = {
global = {
50,7 → 50,7
tag_elite = true,
 
mod_normal = "disable",
mod_daily = "none",
mod_daily = "shift",
mod_repeat = "shift",
mod_override = "alt",
mod_suspend = "disable",
107,9 → 107,9
self.version = {}
 
-- Version
self.version.revision = tonumber("38")
self.version.revision = tonumber("40")
if self.version.revision then
local version = "v2.0-beta.9"
local version = "v2.0-beta.10"
if string.find(version, "^r%d+$") then
self.version.major, self.version.minor, self.version.type = 0, 0, "alpha"
self.version.text = string.format("r%s-alpha", self.version.revision)
EasyDaily/options.lua
1,6 → 1,6
--[[
Desc:
Info: $Id: options.lua 36 2009-05-11 00:57:03Z draake $
Info: $Id: options.lua 40 2009-05-12 02:13:32Z draake $
]]
 
local _G = _G
42,7 → 42,7
if questComplete then
desc = desc .. sformat("\n%s: %s", self:Colorize(L["Completed"], 1, .8, 0), self:Colorize(YES, 0, 1, 0))
if reset then
desc = desc .. sformat("\n%s: %s", self:Colorize(L["Reset"], 1, .8, 0), date("%x %I:%M:%S", reset))
desc = desc .. sformat("\n%s: %s", self:Colorize(L["Reset"], 1, .8, 0), date("%A, %B %d - %I:%M:%S %p", reset))
end
else
desc = desc .. sformat("\n%s: %s", self:Colorize(L["Completed"], 1, .8, 0), self:Colorize(NO, 1, 0, 0))
234,7 → 234,7
order = 3,
type = "toggle",
name = L["Quest Status Text"],
desc = L["Displays a quests status in text next to its name in the gossip window."],
desc = L["Displays a quest's state next to its name in the gossip window."],
get = getFunc,
set = function(...) setFunc(...); self:RefreshGossipOrQuestFrame(); end,
},
EasyDaily/turnin.lua
1,6 → 1,6
--[[
Desc:
Info: $Id: turnin.lua 38 2009-05-11 03:13:45Z draake $
Info: $Id: turnin.lua 40 2009-05-12 02:13:32Z draake $
]]
 
local _G = _G
68,7 → 68,7
return true
end
if self:GetPVar("stickyturnin") and self.tracker.gossip[title] ~= nil then
return self.tracker.gossip[title]
return ( not self.tracker.gossip.child ) and self.tracker.gossip[title]
end
local found, _, questType, questTag, _, enabled = self:GetQuestBaseInfo(title)
if ( not found ) then
113,7 → 113,7
local _, index, need = self:StrSplit(":", objString)
local count = self:CountContainerItem(index)
local floor = math.floor( count / need )
self:RawDebug(GetItemInfo(index), count, need, floor)
self:Maintenance(GetItemInfo(index), count, need, floor)
minimum = math.min( floor, minimum or math.huge )
end
if minimum and ( minimum > 0 ) then
268,10 → 268,9
-- NPC Tracking
local name, index, kind = self:UnitName("npc")
if name and index and kind then
self.log.start[title] = {}
self.log.start[title].name, self.log.start[title].index, self.log.start[title].type = name, index, kind
self.log.start[title].zone, self.log.start[title].x, self.log.start[title].y, self.log.start[title].dl = self:GetLocation()
self:ScheduleTimer(function() self.log.start[title] = nil; end, 10)
self.tracker.gossip.title, self.tracker.gossip.part = title, "start"
self.tracker.gossip.name, self.tracker.gossip.index, self.tracker.gossip.type = name, index, kind
self.tracker.gossip.zone, self.tracker.gossip.x, self.tracker.gossip.y, self.tracker.gossip.dl = self:GetLocation()
end
 
-- Auto Quest
283,6 → 282,8
end
end
 
self.tracker.gossip.child = true
 
end
 
-- Triggers on: Active/Repeatable
322,13 → 323,9
local title = GetTitleText()
 
-- NPC Tracking
local name, index, kind = self:UnitName("npc")
if name and index and kind then
self.log.finish[title] = {}
self.log.finish[title].name, self.log.finish[title].index, self.log.finish[title].type = name, index, kind
self.log.finish[title].zone, self.log.finish[title].x, self.log.finish[title].y, self.log.finish[title].dl = self:GetLocation()
self:ScheduleTimer(function() self.log.finish[title] = nil; end, 10)
end
self.tracker.gossip.title, self.tracker.gossip.part = title, "finish"
self.tracker.gossip.name, self.tracker.gossip.index, self.tracker.gossip.type = self:UnitName("npc")
self.tracker.gossip.zone, self.tracker.gossip.x, self.tracker.gossip.y, self.tracker.gossip.dl = self:GetLocation()
 
-- Auto Quest
if self:QuestEligibleForAdvancement(title) then
350,6 → 347,8
end
end
 
self.tracker.gossip.child = true
 
end
 
--------------------------------------------------------------------------------------------------
358,6 → 357,20
 
function EasyDaily:GossipOrQuestClosed()
if ( not QuestFrame:IsShown() ) and ( not GossipFrame:IsShown() ) then
-- NPC Tracking
local title, part = self.tracker.gossip.title, self.tracker.gossip.part
if title and part then
self.log[part][title] = {
name = self.tracker.gossip.name,
index = self.tracker.gossip.index,
type = self.tracker.gossip.type,
zone = self.tracker.gossip.zone,
x = self.tracker.gossip.x,
y = self.tracker.gossip.y,
dl = self.tracker.gossip.dl,
}
self:ScheduleTimer(function() self.log[part][title] = nil; end, 15)
end
self:ClearTracker("gossip")
end
end
420,7 → 433,7
iconType = "Available"
end
 
self:RawDebug(title, isActive, questType, questTag, self:QuestTagIsActive(questTag), iconColor, iconState, iconType)
self:Maintenance(title, isActive, questType, questTag, self:QuestTagIsActive(questTag), iconColor, iconState, iconType)
 
icon:SetTexture("Interface\\Addons\\EasyDaily\\Textures\\Gossip-Icons\\" .. iconColor .. iconState .. iconType)
 
579,7 → 592,7
GameTooltip:AddDoubleLine(textEnabled, textComplete)
 
local typeText = sformat("%s: %s", L["Type"], self:Colorize(self:TypeOptToTypeText(questType), 1, 1, 1))
local tagText = sformat("%s: %s (%s)", L["Tag"], self:Colorize(self:TagOptToTagText(questTag), 1, 1, 1), self:QuestTagIsActive(questTag) and self:Colorize(YES, 0, 1, 0) or self:Colorize(NO, 1, 0, 0))
local tagText = sformat("%s: %s (%s)", L["Tag"], self:Colorize(self:TagOptToTagText(questTag), 1, 1, 1), self:QuestTagIsActive(questTag) and self:Colorize(L["On"], 0, 1, 0) or self:Colorize(L["Off"], 1, 0, 0))
 
local cat1, cat2 = self:GetQuestCategoryInfo(title)
 
EasyDaily/locales/koKR.lua
22,7 → 22,7
-- L["Disable PvP Pop-up"] = ""
-- 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 status in text next to its name in the gossip window."] = ""
-- L["Displays a quest's state next to its name in the gossip window."] = ""
-- L["Done"] = ""
-- L["Enabled"] = ""
-- L["Enable/Disable debug mode."] = ""
EasyDaily/locales/enUS.lua
20,7 → 20,7
L["Disable PvP Pop-up"] = true
L["Disables the confirmation pop-up that appears when accepting a daily quest that flags you for pvp."] = true
L["Disables the confirmation pop-up that appears when completing a daily quest that requires gold."] = true
L["Displays a quests status in text next to its name in the gossip window."] = true
L["Displays a quest's state next to its name in the gossip window."] = true
L["Done"] = true
L["Enable/Disable debug mode."] = true
L["Enable/Disable the addon."] = true
EasyDaily/locales/esMX.lua
22,7 → 22,7
-- L["Disable PvP Pop-up"] = ""
-- 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 status in text next to its name in the gossip window."] = ""
-- L["Displays a quest's state next to its name in the gossip window."] = ""
-- L["Done"] = ""
-- L["Enabled"] = ""
-- L["Enable/Disable debug mode."] = ""
EasyDaily/locales/zhTW.lua
22,7 → 22,7
-- L["Disable PvP Pop-up"] = ""
-- 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 status in text next to its name in the gossip window."] = ""
-- L["Displays a quest's state next to its name in the gossip window."] = ""
-- L["Done"] = ""
-- L["Enabled"] = ""
-- L["Enable/Disable debug mode."] = ""
EasyDaily/locales/ruRU.lua
10,9 → 10,9
L["Auto-Select rewards for quests with more than one reward."] = "Автовыбор наград за задания с несколькими наградами."
L["Battleground"] = "Поле боя"
L["Complete"] = "Выполнено"
-- L["Completed"] = ""
L["Completed"] = "Выполнено"
L["Completed [%s] of [%s] dailies"] = "Выполнено [%s] из [%s] ежедневных заданий"
-- L["Continent"] = ""
L["Continent"] = "Континент"
L["Ctrl"] = "Ctrl"
L["Daily"] = "Ежедневно"
L["Daily Quest Discovered"] = "Обнаружено ежедневное задание"
22,47 → 22,47
L["Disable PvP Pop-up"] = "Отключить всплывание PvP"
L["Disables the confirmation pop-up that appears when accepting a daily quest that flags you for pvp."] = "Отключает всплывающий запрос подтверждения при попытке взятия ежедневного задания, отмечающего вас, как PvP-активного."
L["Disables the confirmation pop-up that appears when completing a daily quest that requires gold."] = "Отключает всплывающий запрос подтверждения, появляющийся при выполнении ежедневного задания, для которого требуется золото."
-- L["Displays a quests status in text next to its name in the gossip window."] = ""
-- L["Done"] = ""
-- L["Displays a quest's state next to its name in the gossip window."] = ""
L["Done"] = "Готово"
L["Enabled"] = "Включено"
L["Enable/Disable debug mode."] = "Включить/отключить режим отладки."
L["Enable/Disable the addon."] = "Включить/Отключить аддон."
L["Enables Auto Turn-in for %s tagged quests."] = "Включить автосдачу заданий, помеченных, как %s"
-- L["Enhanced Gossip Icons"] = ""
L["Enhanced Gossip Icons"] = "Улучшенные иконки беседы"
L["Force"] = "Принудительно"
L["General"] = "Общее"
-- L["Gossip/Quest Window"] = ""
L["Gossip/Quest Window"] = "Окно задания/беседы"
L["[Left-Click] to toggle the quest window"] = "[Левый клик] для открытия/закрытия окна заданий"
L["Minimap Icon"] = "Иконка у мини-карты"
L["Multiple Rewards"] = "Многочисленные награды"
L["None"] = "Отсутствует"
L["Note: The modifier 'None' refers to when no modifier is being held. Setting the modifier to 'Disable' disables the option."] = "Заметка: Модификатор 'Отсустствует' ссылается на отсутствие назначенного модификатора. Установка модификатора на 'Отключить' отключает эту опцию."
-- L["Off"] = ""
-- L["On"] = ""
-- L["Quest Confirmation Pop-ups"] = ""
-- L["Quest Enabled"] = ""
L["Off"] = "Выкл"
L["On"] = "Вкл"
L["Quest Confirmation Pop-ups"] = "Всплывания подтверждения задания"
L["Quest Enabled"] = "Задание включено"
L["Quest Rewards"] = "Награды за задания"
L["Quests"] = "Задания"
-- L["Quest Status Text"] = ""
L["Quest Status Text"] = "Текст статуса задания"
L["Quest Tags"] = "Метки задания"
L["Quick Info"] = "Быстрая инфа"
L["Repeatable"] = "Повторяющееся"
L["Repeatable Quest Discovered"] = "Обнаружено повторяющееся задание"
L["Replaces the default gossip icons with color coded versions."] = "Заменить стандартные иконки окна беседы на раскрашенные."
-- L["Reset"] = ""
L["Reset"] = "Сброс"
L["[Right-Click] to toggle the options menu"] = "[Правый клик] для открытия/закрытия меню настроек"
-- L["[Right-Click] to toggle this quest's state"] = ""
L["[Right-Click] to toggle this quest's state"] = "[Правый-Клик] переключает состояние заданий"
L["Selection Modifiers"] = "Модификаторы выбора"
L["Shift"] = "Shift"
L["Show an icon on the Minimap."] = "Отображать иконку у мини-карты."
L["Special"] = "Особые"
L["Suspend"] = "Приостановить"
-- L["Tag"] = ""
L["Tag"] = "Метка"
L["The [new day] begins in %s"] = "[Новый день] начнётся через %s"
L["Toggle this quest's state."] = "Переключение статуса данного задания."
-- L["Type"] = ""
L["Type"] = "Тип"
L["Use this modifier to Auto Turn-in %s quests."] = "Использовать этот модификатор для автосдачи %s заданий."
L["Use this modifier to forcibly Auto Turn-in any quest. Overrides all settings."] = "Использовать этот модификатор для принудительной автосдачи любого задания. Игнорирует все настройки."
L["Use this modifier to suspend the Auto Turn-in process."] = "Использовать этот модификатор для приостановки процесса автосдачи."
-- L["Zone"] = ""
L["Zone"] = "Зона"
 
EasyDaily/locales/esES.lua
22,7 → 22,7
-- L["Disable PvP Pop-up"] = ""
-- 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 status in text next to its name in the gossip window."] = ""
-- L["Displays a quest's state next to its name in the gossip window."] = ""
-- L["Done"] = ""
-- L["Enabled"] = ""
-- L["Enable/Disable debug mode."] = ""
EasyDaily/locales/frFR.lua
22,7 → 22,7
-- L["Disable PvP Pop-up"] = ""
-- 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 status in text next to its name in the gossip window."] = ""
-- L["Displays a quest's state next to its name in the gossip window."] = ""
-- L["Done"] = ""
L["Enabled"] = "Activé"
L["Enable/Disable debug mode."] = "Activer / désactiver le mode de débogage."
EasyDaily/locales/deDE.lua
22,7 → 22,7
-- L["Disable PvP Pop-up"] = ""
-- 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 status in text next to its name in the gossip window."] = ""
-- L["Displays a quest's state next to its name in the gossip window."] = ""
-- L["Done"] = ""
L["Enabled"] = "aktiviert"
-- L["Enable/Disable debug mode."] = ""
EasyDaily/locales/zhCN.lua
22,7 → 22,7
-- L["Disable PvP Pop-up"] = ""
-- 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 status in text next to its name in the gossip window."] = ""
-- L["Displays a quest's state next to its name in the gossip window."] = ""
-- L["Done"] = ""
-- L["Enabled"] = ""
-- L["Enable/Disable debug mode."] = ""
EasyDaily/tracking.lua
1,6 → 1,6
--[[
Desc:
Info: $Id: tracking.lua 38 2009-05-11 03:13:45Z draake $
Info: $Id: tracking.lua 40 2009-05-12 02:13:32Z draake $
]]
 
local _G = _G
177,36 → 177,29
tempLog[index] = self.log.quest[index]
tempLog[index].old = 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
 
if self.log.start.name then
tempLog[index].start = self.log.start
end
 
tempLog[index].obj = {}
 
end
local numObj = GetNumQuestLeaderBoards(i)
for k = 1, numObj, 1 do
tempLog[index].complete = isComplete
for k = 1, GetNumQuestLeaderBoards(i), 1 do
local objType, objName, objCurCount, objNeedCount, objText = self:GetLeaderBoardDetails(k, i)
if self.log.quest[index] and self.log.quest[index].obj[k] then
if objCurCount and self.log.quest[index].obj[k].cur and objCurCount > self.log.quest[index].obj[k].cur then
-- Objective update
local h = self:GetHandle("quest", index)
if h then
self:Debug(index, logName, objType, objName, self.log.quest[index].obj[k].cur, objCurCount, objNeedCount)
self:Maintenance(index, logName, objType, objName, self.log.quest[index].obj[k].cur, objCurCount, objNeedCount)
end
end
tempLog[index].obj[k] = self.log.quest[index].obj[k]
227,7 → 220,7
for index, v in pairs(self.log.quest) do
if ( not tempLog[index] ) then
-- Quest was present in last update, but is now missing; __Add logic for abandoning quests later
if v.complete then
if self.log.finish[v.name] then
self:RecordQuestComplete(v.name)
end
end
242,7 → 235,7
if ( not v.old ) then
if v.daily then
local h, isNew = self:GetHandle("quest", index, true)
if isNew then
if self.log.initialized and isNew then
self:Display(L["Daily Quest Discovered"], v.name)
end
h:SetVal("name", v.name)